php5 install
添加時(shí)間:2011-2-27
添加:
admin
shell> ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local/gd2 --with-jpeg-dir=/usr/local/jpeg-6b --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype --enable-trace-vars -with-mysql=/usr/local/mysql -with-iconv=/usr/local/iconv --enable-mbstring=all --with-curl --enable-track-vars --with-DBA --enable-mbstr-enc-trans --enable-mbregex --with-config-file-path=/usr/local/php --with-xml --with-gettext
shell> make
shell> make install
shell> cp php.ini-dist /usr/local/php/php.ini
編輯apache配置檔
shell> cd /usr/local/apache2/conf
shell> vi httpd.conf
在LoadModule php4_module modules/libphp4.so
添加AddType application/x-httpd-php .php
OK,基礎(chǔ)的安裝已經(jīng)完成,如果重新起動(dòng)APACHE出現(xiàn):/usr/local/apache2/bin/apachectl start Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied
那就要按照下面的方法解決:
編輯/etc/selinux/config,找到這段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注釋掉:#SELINUX=enforcing ,然后新加一行為:
SELINUX=disabled
保存,關(guān)閉。
編輯/etc/sysconfig/selinux,找到:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
如果SELINUX已經(jīng)是 SELINUX=disabled,那么就不用改了,否則就把SELINUX=enforcing 注釋掉,新加一行:
SELINUX=disabled
保存,退出。
如果你碰到其他類似提示:
cannot restore segment prot after reloc: Permission denied
哪應(yīng)該是SELinux的問(wèn)題,可以考慮把它關(guān)閉。
關(guān)鍵字:php5 install
shell> make
shell> make install
shell> cp php.ini-dist /usr/local/php/php.ini
編輯apache配置檔
shell> cd /usr/local/apache2/conf
shell> vi httpd.conf
在LoadModule php4_module modules/libphp4.so
添加AddType application/x-httpd-php .php
OK,基礎(chǔ)的安裝已經(jīng)完成,如果重新起動(dòng)APACHE出現(xiàn):/usr/local/apache2/bin/apachectl start Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied
那就要按照下面的方法解決:
編輯/etc/selinux/config,找到這段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注釋掉:#SELINUX=enforcing ,然后新加一行為:
SELINUX=disabled
保存,關(guān)閉。
編輯/etc/sysconfig/selinux,找到:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
如果SELINUX已經(jīng)是 SELINUX=disabled,那么就不用改了,否則就把SELINUX=enforcing 注釋掉,新加一行:
SELINUX=disabled
保存,退出。
如果你碰到其他類似提示:
cannot restore segment prot after reloc: Permission denied
哪應(yīng)該是SELinux的問(wèn)題,可以考慮把它關(guān)閉。
關(guān)鍵字:php5 install
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗(yàn)證詳解
- CentOS 7.1添加刪除用戶的方法
- 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ī)則詳解