Apache and php installation
发布于: 2008/06/23  8:06 pm
Assume the base folder is /srv/
Apache Installation
More apache configuration
http://httpd.apache.org/docs/2.2/programs/configure.html#configurationoptions
:
./configure --prefix=/srv/httpd --enable-so --enable-mods-shared=all --enable-modules=all --with-mpm=prefork --enable-ssl --enable-deflate --enable-expires --enable-rewrite

Last build configure information can be found in build directory. config.nice
:
make
make install

GD Installation
Download GD library
http://www.libgd.org
:
./configure --prefix=/srv/gd
make
make install


MySQL Installation
:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &


PHP installation
:
./configure --prefix=/srv/php --with-apxs2=/srv/httpd/bin/apxs --with-mysql=/srv/mysql --with-gd=/srv/gd --with-jpeg-dir=/usr/lib --with-ttf --with-zlib --with-png-dir=/usr/lib --with-freetype-dir=/srv/gd/freetype --enable-mbstring --enable-zip --with-zlib --with-zlib-dir=/usr/local/lib --with-gettext --enable-ftp --with-zlib --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared
make
make install

More on:
http://www.php.net/manual/en/install.unix.php

Apache 2.2 has mod_ssl as build in module

Need to check http://httpd.apache.org/docs/2.2/new_features_2_2.html
lot of modules, like mod_access, their name has been changed

MySQL Post Installation Tasks
:
shell> mysql -u root
mysql> DROP USER '';
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');