Tag: samp

AMP stack in Solaris 05/08

Most webservers do have a need for a decent AMP stack, but Solaris 05/08 doesn’t quite offer a solution out of the box, but if you know where to look you’re not far away from having a fine implementation.

  • MySQL5I have made good experiences using MySQL5 from blastwave. Unfortunately it doesn’t run out of the box even tough it integrates nicely with SMF. When mysql is being called after installation you will see this error message:
    Warning: mysql(): Can't connect to local MySQL server through socket '/tmp/mysql.sock'

    The simple reason is that cswmysql5 couldn’t start properly, because there is no default config file. After copying the config file to the right location you can start the installation:

    $ cp /opt/csw/mysql5share/mysql/my-small.cnf /opt/csw/mysql5/my.cnf
    $ /opt/csw/mysql5/bin/mysql_install_db
    $ chown -R mysql:mysql /opt/csw/mysql5/var
    $ svcadm disable cswmysql5; svcadm enable cswmysql5
  • Apache2
    $ pkg-get install apache2
  • PHP
    $ pkg-get install php5
  • Needed modules
    $ pkg-get install ap2_modphp5
    $ pkg-get install php5_gd
    $ pkg-get install

    Now all that’s left is to integrate PHP support into apache which is done by adding the following lines in your /opt/csw/apache2/etc/httpd.conf:

    LoadModule php5_module /opt/csw/apache2/libexec/libphp5.so
    <IfModule mod_php5.c>
      AddType application/x-httpd-php .php .phtml .php3
      AddType application/x-httpd-php-source .phps

    Now disable apache2, restart cswapache2 and you’re done.

Comment » | articles