Apache, myql and php installation in Solaris


$ gtar zxf httpd-NN.tar.gz
$ cd httpd-NN

./configure –prefix=/usr/local/apache –enable-so –enable-mods-shared=all –enable-ssl –enable-proxy=shared

Main config file httpd.conf and must check the following options

  • Listen
  • Server Root
  • Document Root
  • Directory Index
  • Add Type
  • User
  • Group

To check config file syntax

httpd -t


pkginfo |grep mysql

pkgrm SUNW….

Switch to be used with configure scripts…..

./configure –prefix=/usr/local/mysql –localstatedir=/usr/local/mysql/data –disable-maintainer-mode –with-mysqld-user=mysql –with-unix-socket-path=/tmp/mysql.sock –without-comment –with-debug –without-bench

my.cnf file

#password       = your_password
port            = 3306
socket          = /usr/local/mysql/tmp/mysql.sock

# Here follows entries for some specific programs
# The MySQL server
user            = mysql
port            = 3306
socket          = /usr/local/mysql/tmp/mysql.sock
basedir         = /usr/local/mysql
datadir         = /usr/local/mysql/data
#tmpdir          = /usr/local/mysql/tmp
language        = /usr/local/mysql/share/mysql/english
default-character-set   = utf8

Be careful about mysql.sock file and check the location.


./configure  –prefix=/usr/local/apache/php –with-config-file-path=/usr/local/apache/php/lib –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/apache/bin/apxs –with-openssl=/opt/ssl –with-gd –with-pdf –with-zlib-dir=/usr/local/lib

Check mysql.default_socket = /usr/local/mysql/tmp/mysql.sock in php.ini

also check

AddType application/x-httpd-php .php

LoadModule php5_module        modules/libphp5.so

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: