shell#echo
AddType application/x-httpd-php .php >> /usr/local/apache/conf/httpd.conf
shell#echo AddType application/x-httpd-php .sulpx >> /usr/local/apache/conf/httpd.conf
shell#echo AddType application/x-httpd-php-source .phps >> /usr/local/apache/conf/httpd.conf
shell#echo DirectoryIndex index.php index.html index.htm index.html.var >> /usr/local/apache/conf/httpd.conf
#在http.conf中加入对php的支持
shell#/usr/local/apache/bin/apachectl start
#启动http
测试,在/usr/local/apache/htdocs 下建一文件名为test.php,内容为:<? phpinfo(); ?>,然后在打开IE输入本机IP地址查看,如显示php页面,则建立成功
网上文档:
#tar xzvf libpng-1.2.8-config.tar.gz
#tar xzvf freetype-2.1.9.tar.gz
#tar xzvf zlib-1.2.2.tar.gz
#tar xzvf gd-2.0.33.tar.gz
#tar xzvf httpd-2.0.54.tar.gz
#tar xzvf php-5.0.4.tar.gz
#tar xzvf mysql-5.0.15.tar.gz #########default setup/change my.cnf for onlyone please
cd mysql-5.0.18
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=gbk,gb2312,big5 && make && make install
groupadd mysql
useradd -g mysql mysql
chgrp -R mysql /usr/local/mysql
cp support-files/my-large.cnf /etc/my.cnf
scripts/mysql_install_db
chown -R mysql:mysql /usr/local/mysql/var
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
/usr/local/mysql/bin/mysqld_safe &
----------------------------- chkconfig --add mysqld
chkconfig mysqld on
------------------------------
#########support soft setup
cd /root/install/libpng-1.2.8-config
./configure && make && make install
cd /root/install/freetype-2.1.9
./configure --prefix=/usr/local/freetype-2.1.9 && make && make install
cd /root/install/zlib-1.2.2
./configure --prefix=/usr/local/zlib-1.2.2 && make && ; make install
cd /root/install/jpeg-6b
cp -R /root/install/jpeg-6b /usr/local/
mkdir -p /usr/local/man/man1
./configure --enable-shared --enable-static && make && make install
cd /root/install/gd-2.0.33
./configure --prefix=/usr/local/gd-2.0.33 --with-freetype=/usr/local/freetype-2.1.9 && make && make install #########apache setup
cd /root/install/httpd-2.2.3
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite && make && make install
#rm -f /etc/init.d/httpd
#cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
#chmod 755 /etc/init.d/httpd
#########php setup
cd /root/install/php-5.0.4










