httpd+php

 安裝源碼包httpd-2.2.22.tar.bz2

tar -jxf httpd-2.2.22.tar.bz2

cd httpd-2.2.22

./configure --prefix=/usr/local/httpd --enable-so

make && make install

cd /usr/local/httpd/bin

./httpd

elinks http://192.168.18.72 --dump

安裝源碼包php-5.4.10.tar.bz2

mount /dev/cdrom /mnt

yum -y install libxml2-devel

tar -jxf php-5.4.10.tar.bz2

cd php-5.4.10

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs

make && make install

cd /usr/local/httpd/conf

vim httpd.conf

53行下添加AddType application/x-httpd-php .php

cd /usr/local/httpd

killall httpd

./bin/httpd

cd htdocs/

vim phpinfo.php

<?php phpinfo(); ?>

firefox http://192.168.18.72/phpinfo.php

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章