Specifications
218 Chapter 13 Configuring and Managing Web Technologies
Apache Tomcat
Mac OS X Server comes with Apache Tomcat, the open source servlet container
developed by Sun Microsystems. Tomcat runs as part of the Java process.
To start Apache Tomcat:
$ su /Library/Tomcat/6.0/bin/startup.sh
Note: If you start Tomcat manually, it is not reflected in the Server Admin application.
Additionally, it is not monitored by the launchd process.
By default, Tomcat uses port 9006. Tomcat comes with several example servlets.
You can access these servlets at localhost:9006/examples/servlets/. The example
servlets reside in /Library/Tomcat/6.0/webapps/WEB-INF. To deploy your own servlets,
place them in /Library/Tomcat/webapps/WEB-INF.
Tomcat’s configuration information is in /Library/Tomcat/6.0/conf/. For more
information about Tomcat, see jakarta.apache.org/tomcat.
The MySQL Database
Mac OS X Server includes MySQL, a popular open source database you can use with
web applications. This database is well-suited for common web-related tasks, such as
managing content and implementing discussion boards and guestbooks.
MySQL is one service you can manage using Server Admin. You can use Server Admin
to start and stop MySQL (mysqld), change the database location, set MySQL’s root
password, enable or disable network connections, and view MySQL’s logs. You can
perform these actions from the command line.
When you start MySQL for the first time, or when you change the location of the
database using Server Admin (or the serveradmin command line tool), a new MySQL
database is initialized for you and MySQL is ready for use.
Mac OS X Server stores the files of the preinstalled MySQL version in the file system,
with executables in /usr/bin/ and /usr/libexec/, man pages in /usr/share/man/,
and other parts in /usr/share/mysql/. In addition, the MySQL configuration file resides
in /etc/my.conf/ and the MySQL database in /var/mysql/.
A default configuration file, appropriate to the memory size of your system, is installed
automatically. You can alter this configuration file to customize MySQL to your needs.
You can find sample MySQL configuration files (with the .cnf file extension) in the /usr/
share/mysql/ folder.
MySQL saves the current state automatically, and launches with each system restart if it
is running prior to system shut down or reboot.