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.
linux apache + php configuration
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
PHP+jQuery實現即點即改功能示例
ztblog
2019-02-24 12:43:05
PHP+jQuery實現雙擊修改table表格功能示例
ztblog
2019-02-24 12:43:05
PHP基於mcript擴展實現對稱加密功能示例
ztblog
2019-02-24 12:43:05
eAccelerator 配置參數詳解
小紅帽子
2019-02-23 13:37:48
ThinkPHP簡易微信公衆號零錢提現實例
wx5c6f5798d627c
2019-02-23 13:16:33
PHP編程和調試環境
mapdll
2019-02-23 13:02:47
PHP開發工具PHP基礎教程
要不要晴天
2019-02-23 00:35:06
(PHP學習筆記)我對PHP變量引用、對象引用的理解
w1sw
2019-02-23 00:33:04
(PHP學習筆記)實現頁面靜態化
w1sw
2019-02-23 00:32:58
收藏PHP常用函數
xiaohei0491
2019-02-23 00:28:16
收藏PHP常用函數
xiaohei0491
2019-02-23 00:28:15
Apache與PHP的結合配置、Apache默認虛擬主機
網蟲變網工
2019-02-23 00:22:29