====== Installing Cool Stack Apache, MySQL, PHP ======
Coolstack is Sun's perferred suite of precompiled Apache 2.2.3, MySQL 5, and PHP5 all ready to go in a bundle. Each package is compiled optimized for performance on each architecture, and is fully tested by Sun.
===== Preflight =====
==== Prerequisites ====
For Coolstack 1.2, you must first install the Coolstack runtime package:
CSKruntime_1.2_x86.pkg
===== Cool Stack 1.2 =====
===== Cool Stack 1.1 =====
To install on Joyent Accelerators all you have to do is execute a few simple steps. Download Coolstack from http://cooltools.sunsource.net/coolstack/.
Once you get the package in your Accelerator, decompress it and pkgadd it:
# bzip2 -d CSKamp_x86.pkg.bz2
# pkgadd -d ./CSKamp_x86.pkg
By default it installs to /opt/coolstack. If you go inside this directory you will see directories for each individual package:
# ls /opt/coolstack
apache2/ etc/ info/ man/ php5/ share/
bin/ include/ lib/ mysql_32bit/ sbin/
If you go in to each application's directory, it will have a README file. In this file it will tell you steps for setting up and also the compile options used for Sun Studio.
==== Apache ====
The Apache used is 2.2.3 compiled with prefork. Apache is all ready to go, all you have to do is start it.
# /opt/coolstack/apache2/bin/apachectl start
==== MySQL ====
The MySQL used is version 5.0.33 32-bit. If you need to work with larger databases (use more than 4gigs of ram), consider the MySQL 64-bit package that the CoolStack webpage provides.
To get MySQL started, you need to first copy over a my.cnf file to use. my-medium.cnf should work for most Accelerators, check my-small.cnf if you are on a smaller container and want to conserve more memory.
# cp /opt/coolstack/mysql_32bit/share/mysql/my-medium.cnf /opt/coolstack/mysql_32bit/my.cnf
Also copy over the mysql.server start and stop script:
# cp /opt/coolstack/mysql_32bit/share/mysql/mysql.server /opt/coolstack/mysql_32bit
Create the system tables and give permissions to the directories:
# /opt/coolstack/mysql_32bit/bin/mysql_install_db
# chown -R mysql:mysql /opt/coolstack/mysql_32bit
And start the server:
# /opt/coolstack/mysql_32bit/bin/mysql.server start
Starting MySQL
SUCCESS!
Something to notice here is Coolstack likes to use the data directory instead of var.