|
|
|
|
General Considerations
The following summary is intended as a quick reference.
It summarizes some useful command and
discusses some of the special features of Mac OS X.
|
Basic Skills
|
You will need some basic skills.
In general, you should be familiar with the following
- Using the terminal to execute shell commands
- Basic system administration: paths, logins, etc.
The following provide more details.
|
Administrator
|
|
You will need to perform some commands as a priviledged user.
OS X lets a user with administrator privileges access some files such
as those in /Library. Some actions you must perform as the superuser.
Your options are
- log on as root (use NetInfo Manager Security/Enable Root User)
- use the sudo command (preferred in BSD)
You might edit a system file as follows.
shell: sudo vi /etc/csh.login
Password: you passwork
.... perform edit session ....
:wq
If you are not up to vi, edit the file with a text editor such as BBEdit,
save it as text in a writeable folder and then copy with
sudo cp csh.login /etc
|
Symbolic Links
|
|
It generally simplifies administration to have clients refer to resources
with a generic name (mysql-connector-java.jar) rather the specific version (mysql-connector-java-3.0.9-stable-bin.jar).
To update the component one changes the link rather that editing each myriad client configurations.
The command for the link is
ln -s target-actual-file link-name-that-points-to-target
for example
sudo ln -s mysql-connector-java-3.0.9-stable-bin.jar mysql-connector-java.jar
Note that the Mac alias mechanism does not provide the required symbolic link.
|
Directory Layout
|
|
There are a myriad ways one can install components.
The following summarizes some typical approaches.
It also identifies the OS X strategy.
| /System/Library
| OS X This is where the generic system-wide resources are placed. A prudent policy is to leave this for Apple and other experts manage it.
| | /Library
| OS X This contains system-wide resources for your particular computer.
This is where you will want to put most of your system wilde items. The following discusses some important subfolders.
| | /Library/Java
| OS X The OS X install creates this with a two subfolders.
- /Library/Java/Home: This links to the Java installation in /System/Library/Frameworks/JavaVM.framework
- /Library/Java/Extension: This is created as empty folded.
This is where we will want to place resoucres that we need for our Java app.
| | /Library/StartupItems
| OS X This is where we place instructions to start and stop applications for OS X.
Other flavours of Unix use a different mechanism. For example Red Hat uses /etc/rc.
| | /usr/local
| /usr contains Unix System Resources.
The /usr/local contains resources for the particular installation. This is where mysql wants to go.
| | /etc
| /etc contains core configuration files.
| | /opt
| This is my preferred directory for installing web services in linux.
| | /var
| /var/log contains log information. Some unix installations also place the MySql data in /var.
| | home
|
Your home directory a number of hidden files that start with "."
The following are useful for configuration. Mac OS X uses the TENEX C Shell tcsh as default
| .tcshrc
| Executed each time you start a cshell. Thus you may wish to avoid using recursive commands
such as set path = ( "$HOME/bin" $path )
| | .login
| Executed each time you launch a login shell. This includes openening a terminal.
| | .my.cnf
| Directions for MySql
|
|
Note:The Mac finder usually does not show directories such as /etc.
Use the Go/Go to Folder menu item in the finder.
|
Environment Variables
|
There are a numer of environment variables that we will need to set.
The example takes the strategy of setting them to the administrator login rather than the general user.
path PATH
| The search path for executables.
set path = ( $path "/Library/JSWP/Home/bin" ) (C shell)
export path
setenv JAVA_HOME "/Library/Java/Home" (C shell)
| | JAVA_HOME | Location of Java for Ant.
setenv JAVA_HOME "/Library/Java/Home" (C shell)
| | CLASSPATH | Search path for searching Java Classes
| | CATALINA_HOME | location of Cataline/Tomcat web container
| | ANT_HOME | Location of ant
|
|
|
|
| Copyright 2004. Lester Pieniazek. All rights reserved Worldwide. |
|