


Linux下php-5.3.4.tar.bz2的安裝教程
[root@localhost root]# tar xjvf libxml2-2.6.31.tar.bz2
[root@localhost root]# cd libxml2-2.6.31
[root@localhost libxml2-2.6.31]# ./configure --prefix=/usr/local/libxml2
[root@localhost libxml2-2.6.31]# make
[root@localhost libxml2-2.6.31]# make install
到這里libxml2就安裝完成了,下面開(kāi)始安裝PHP5.3
[root@localhost libxml2-2.6.31]# cd
[root@localhost root]# tar -xjvf php-5.3.4.tar.gz2
[root@localhost root]# cd php-5.3.4
[root@localhost php-5.3.4]# ./configure --prefix=/usr/local/php5 //安裝位置
--enable-mbstring //設(shè)置 php 支持多字節(jié)字符串
--with-apxs2=/usr/local/apache2/bin/apxs //設(shè)置 apache 服務(wù)支持 apxs位置
--width-libxml-dir=/usr/local/libxml2 //設(shè)置剛才安裝的libxml2位置
--with-mysql=/usr/mysql //設(shè)置 mysql 程序安裝位置
--with-config-file-path=/usr/local/php5 //設(shè)置 php 程序配置文件位置
[root@localhost php-5.3.4]# make
[root@localhost php-5.3.4]# make install
[root@localhost php-5.3.4]# cp php.ini-development /usr/local/php5/php.ini
在 APACHE里添加 php,使 APACHE 支持 PHP
[root@localhost php-5.3.4]# vi /usr/local/apache2/conf/httpd.conf
53 LoadModule php5_module modules/libphp5.so
54 AddType application/x-httpd-php .php //或者在下面的meta中定義(搜索AddType就可以找到)
167
168 DirectoryIndex index.php index.html
169
[root@localhost php-5.3.4]# service apache restart
創(chuàng)建index.php在網(wǎng)站默認(rèn)根目錄下,輸入網(wǎng)址訪(fǎng)問(wèn)測(cè)試
關(guān)鍵字:網(wǎng)站,apache 服務(wù)
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶(hù)
- 如何解決centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗(yàn)證詳解
- CentOS 7.1添加刪除用戶(hù)的方法
- CentOS查找/掃描局域網(wǎng)打印機(jī)IP講解
- CentOS7使用hostapd實(shí)現(xiàn)無(wú)AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網(wǎng)絡(luò)重啟出錯(cuò)
- 解決Centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統(tǒng)有什么不同呢
- Centos 6.6默認(rèn)iptable規(guī)則詳解