Tuesday, February 12, 2008

Installing CoolStack Solaris 10 AMP (Apache, MySQL, PHP) and GD (gd.so) also

  1. Requirement to download, browse http://cooltools.sunsource.net/coolstack/ and download packages below :
    CSKruntime : Coolstack runtime package
    CSKamp, that includes 3 packages : CSKapache2, CSKphp5 and CSKmysql32
    CSKphplibs : (optional, if you going to use gd.so or other usefull PHP extension)

  2. Extract your download files with bunzip2 and install using pkgadd
    # bunzip2 CSKruntime_1.2_sparc.pkg.bz2
    # pkgadd –d CSKruntime_1.2_sparc.pkg
    # bunzip2 CSKamp-sparc.pkg.bz2
    # pkgadd –d CSKamp-sparc.pkg

  3. Coolstack package will be installed into /opt directory

  4. #@ APACHE @#
    Start web server using this command
    # /opt/coolstack/apache2/bin/apachectl start

  5. #@ MySQL @#
    Next we configure MySQL server :

    --> First we create group and user for MySQL
    # export PATH=/opt/coolstack/mysql_32bit/bin:$PATH
    # groupadd mysql
    # useradd –g mysql mysql
    # chown -R mysql:mysql /opt/coolstack/mysql_32bit

    --> Create MySQL configuration file
    #vi /etc/my.cnf
    [mysqld]
    basedir=/opt/coolstack/mysql_32bit
    datadir=/opt/coolstack/mysql_32bit/data

    --> Create mysql database needed by server
    # cd /opt/coolstack/mysql_32bit/bin
    # ./mysql_install_db
    # chown –R mysql:mysql /opt/coolstack/mysql_32bit/data

  6. Now we can run MySQL server with this :
    # su – mysql
    $ /opt/coolstack/mysql_32bit/bin/mysqladmin -u root password ‘yourrootpassword’
    $ /opt/coolstack/mysql_32bit/bin/mysqld_safe &

  7. Check apache and MySQL is running on our server
    # ps –ef | grep apache2
    # ps -ef | grep mysql | grep –v grep

  8. Installing PHP Libs (extension, like gd.so)
    # bunzip2 CSKphplibsbundle_1.2_sparc.pkg.bz2
    # pkgadd –d CSKphplibsbundle_1.2_sparc.pkg

  9. Edit php.ini to load GD library
    Open /opt/coolstack/php5/lib/php.ini and type the code anywhere or after `extension="apc.so"`
    extension="gd.so"
    Restart Apache with
    # /opt/coolstack/apache2/bin/apachectl restart


OK. We are finish installing AMP on Solaris 10.

No comments: