Compile Apache
./Configure \
-- Prefix =/opt/webservices/httpd-2.2.27 \
-- Enable-so \
-- Enable-proxy \
-- Enable-cgi \
-- Enable-mime-magic \
-- Enable-expires \
-- Enable-info \
-- Enable-rewrite
Make
Make install
Add an apache running user
Useradd-s/sbin/nologin apache
Modify/opt/webservice/httpd-2.2.27/conf/httpd. conf as follows
+ LoadModule php5_module modules/libphp5.so
+ AddType application/x-httpd-php. php. phtml. phpm. do
+ AddType application/x-httpd-php-source. phps
<IfModule dir_module>
-DirectoryIndex index.html
+ DirectoryIndex index.html index. php
</IfModule>
+
+ User apache
+ Group apache
+
+ Include conf/conf. d/*. conf
Compile Mysql
Wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.70.tar.gz
Tar-xzvf mysql-5.1.70.tar.gz
./Configure \
-- Prefix =/opt/webservices/mysql-5.1.70 \
-- With-charset = utf8 \
-- Enable-thread-safe-client
Make
Make install
Install OpenSSL
Wget -- no-check-certificate 'https: // www.openssl.org/source/openssl-0.9.8zc.tar.gz'
./Config -- prefix =/opt/webservice/openssl-0.9.8z
Make
Make install
./Config shared -- prefix =/opt/webservice/openssl-0.9.8z
Make clean
Make install
Compile PHP
Wget http://cn2.php.net/get/php-5.5.20.tar.bz2/from/this/mirror
Tar-xjvf php-5.5.20.tar.bz2
./Configure -- prefix =/opt/webservice/php-5.5.20 \
-- With-apxs2 =/opt/webservice/httpd-2.2.27/bin/apxs \
-- With-openssl =/opt/webservice/openssl-0.9.8z \
-- With-config-file-path =/opt/webservice/php-5.5.20/etc /\
-- With-mysql =/opt/webservice/mysql-5.1.70 \
-- With-curl \
-- With-iconv \
-- Enable-mbstring \
-- Enable-pdo
Make
Make install
Cp./php. ini-production/opt/webservice/php-5.5.20/etc/