一,安装Apache
./configure --prefix=/var/apache --enable-module=shared --enable-so --enable-rewrite --with-mpm=worker
make
make install
在Apache主配置文件中增加:vim /usr/local/apache2/conf/httpd.conf
AddType application/x-httpd-php .php .phtml
DirectoryIndex index.html
改成:
DirectoryIndex index.php index.jsp index.html index.htm
二,安装mysql
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all --enable-thread-safe-client.
make
make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
三,安裝PHP
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/etc --enable-mbstring=all --enable-mbregex --enable-shared --with-mcrypt=/usr/local/lib
make
make install
cp php.ini-dist /etc/php.ini
四,安裝phpMyAdmin
cp config.sample.inc.php config.inc.php
http://localhost/phpMyAdmin/index.php