Apache
Login as root and copy the /etc/apache2/httpd.conf-example to httpd.conf
# cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf
Edit /etc/apache2/httpd.conf
Set ServerName
Set ServerAdmin
Enable apache2
# svcadm enable apache2
MySQL
Login as root and initalize the database tables
# /usr/sfw/bin/mysql_install_db
Create mysql user and group
# groupadd mysql
# useradd -g mysql mysql
# chgrp -R mysql /var/mysql
# chmod -R 770 /var/mysql
# installf SUNWmysqlr /var/mysql d 770 root mysql
Copy the mysql config over to /var/mysql
# cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf
Start mysql daemon
# /usr/sfw/sbin/mysqld_safe --user=mysql &
Set the root mysql password
# /usr/sfw/bin/mysqladmin -u root password 'new-password'
# /usr/sfw/bin/mysqladmin -u root -h `hostname` password 'new-password'
Link boot start up scripts
# ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql
PHP
Make sure that /usr/sfw/bin is in the $PATH
install the following packages either from blastwave or sunfreeware
autoconf, automake, sed, gcc, make, flex, bison, m4, perl
Download the latest php from www.php.net
- configure with the following
# ./configure --with-apxs2=/usr/apache2/bin/apxs
--with-mysql=/usr/sfw --enable-dbase
--with-libxml-dir=/usr/local
--with-config-file-path=/etc/apache2
# gmake
# gmake install
Copy the php.ini from the tarball
# cp php.ini-dist /etc/apache2/php.ini
Edit /etc/apache2/httpd.conf and add
AddType application/x-httpd-php .php
Start PHP
# svcadm enable apache2
SSL
Enable the SSL Service Property if needed
# svcprop -p httpd/ssl svc:network/http:apache2
- if it responded false then issue
# svccfg -s http:apache2 setprop httpd/ssl=true
# svcadm refresh http:apache2
# svcprop -p httpd/ssl svc:network/http:apache2
Create directories
# mkdir /etc/apache2/ssl.crt
# mkdir /etc/apache2/ssl.key
Generate RSA key
# /usr/sfw/bin/openssl genrsa -des3 1024 > /etc/apache2/ssl.key/server.key
Generate a Cert Request
# /usr/sfw/bin/openssl req -new -key /etc/apache2/ssl.key/server.key >
> /etc/apache2/ssl.crt/server.csr
Install a Self-Signed Cert
# /usr/sfw/bin/openssl req -x509 -days 3650 -key
> /etc/apache2/ssl.key/server.key
> -in /etc/apache2/ssl.crt/server.csr >
> /etc/apache2/ssl.crt/server.crt
Remove passphase
# cd /etc/apache2/ssl.key
# cp server.key server.key.original
# /usr/sfw/bin/openssl rsa -in server.key.original -out server.key
Restart Apache
# svcadm restart apache2