linux apache + php configuration

The day finally configured, Oh, is not stupid! Following I put the configuration steps and the need to pay attention to the place to write down:
First to download apache_1.3.20.tar.gz and php-4.4.6.tar.gz (I heard the old stable version, so I chose the old version of the test)
And then moved to the / usr / local / directory
mv / home/loveme23/apache_1.3.20.tar.gz / usr / local /
mv / home/loveme23/php-4.4.6.tar.gz / usr / local /
Next unpack:
tar-zxvf php-4.4.6.tar.gz
tar-zxvf apache_1.3.20.tar.gz
Down is more important, first compile and install apache:
. / configure - prefix = / usr / local / apache - enable-module = so
make; make install
Then compile and install php:
. / configure - prefix = / usr / local / php - with-apxs = / usr / local / apache / bin / apxs - with-config-file-path = / usr / local / lib
make; make install
OK, now completed 50% down is to modify the httpd.conf and php.ini file
First, we use the command:
cp / usr/local/php-4.4.6/php.ini-dist / usr / local / lib / php.ini
vi / usr / local / lib / php.ini
Modify the content of the following is On
register-golbals = On
Then modify the httpd.conf file
vi / usr / local / apache / conf / httpd.conf
Modified to the following contents:
# Change the ServerAdmin [email protected] a row to your E-mail address
# DocumentRoot "/ home / httpd / html /" here, the home directory of the html file
# Ibid.
# Options FollowSymLinks MultiViews For safety reasons, remove the "Indexes"
#
# DirectoryIndex default.php default.phtml default.php3 default.html default.htm
#
The apache # Set the default file name order
# AddType application / x-httpd-php. Php. Phtml. Php3. Inc
# AddType application / x-httpd-php-source. Phps
# Set php file suffix
OK! 98% complete the following start apache service
/ usr / local / apache / bin / apachectl start
Make a test.php file into the main directory test apache
<?
phpinfo ();
?>
See it! If successful, will display your phpinfo interface.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章