全球主机交流论坛

标题: 俺实在是没办法了。安装mapn还是出同样的错误 [打印本页]

作者: wjhhxl    时间: 2011-2-5 18:19
标题: 俺实在是没办法了。安装mapn还是出同样的错误
=========================================================================
*           Manager for Mapn. Organized by NGRO.ORGanization            *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*    This script is a tool to Manage status / virtual host of Mapn      *
*    For more information please visit http://www.ngro.org              *
*                                                                       *
*    tips: /root/mapn 1 = to Add Virtual Host                           *
*          /root/mapn 2 = to Add Virtual Host With SSL                  *
*          /root/mapn 3 = to Remove Virtual Host                        *
*                                                                       *
*    usage: /root/mapn {  1  |  2  |  3  }                              *
*    usage: /root/mapn {start |stop |reload |restart |kill |status}     *
*                                                                       *
=========================================================================

httpd: Syntax error on line 345 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

Starting nginx daemon: nginx Start Httpd Completed.

Starting MySQL. SUCCESS!
作者: wjhhxl    时间: 2011-2-5 18:19
求 高手指点!!!
作者: wjhhxl    时间: 2011-2-5 18:40
终于在网上搜索到了原因

今天弄一个CentOS,安装httpd-2.2.4 和php-5.2.3,一切顺利,
最后一步重新启动apache报如下错误:(真是个好编剧,总是最后发生异常)
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
解决办法:
原因是Linux有一个SELinux保护模式引起的。
1关闭SELINUX的方法:
vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disabled 需要重启
2不关闭SELINUX的方法:
# setenforce 0
# chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /usr/local/apache/modules/libphp5.so
# service httpd restart
# setenforce 1

赶快试一试!!!
作者: wjhhxl    时间: 2011-2-5 18:41
但是我的是关闭的啊

[root@localhost Mapn_Full_Ver_2_8]# vi /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=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
作者: eudx    时间: 2011-2-5 18:45
安装脚本添加可执行权限了么
作者: wjhhxl    时间: 2011-2-5 18:49
原帖由 eudx 于 2011-2-5 18:45 发表
安装脚本添加可执行权限了么



我也不知道啊,我就是按照那个贴子安装的。

我刚才按3楼贴子的第二个方法改了下。
2不关闭SELINUX的方法:
# setenforce 0
# chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /usr/local/apache/modules/libphp5.so
# service httpd restart
# setenforce 1

结果还是不成功。现在错误信息如下,

Restarting nginx daemon: nginx Remaining processes: 2606
Restart Httpd Completed.
Shutting down MySQL. SUCCESS!
Starting MySQL. SUCCESS!
[root@localhost ~]#

[ 本帖最后由 wjhhxl 于 2011-2-5 18:50 编辑 ]
作者: 风声    时间: 2011-2-5 21:57
原帖由 wjhhxl 于 2011-2-5 18:49 发表



我也不知道啊,我就是按照那个贴子安装的。

我刚才按3楼贴子的第二个方法改了下。
2不关闭SELINUX的方法:
# setenforce 0
# chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /usr/local/apache/modu ...



这个表示你已经成功了
作者: 大飞机    时间: 2011-2-5 22:02
我 吧我的128的 现在正在折腾。。
作者: wjhhxl    时间: 2011-2-6 07:39
原帖由 风声 于 2011-2-5 21:57 发表



这个表示你已经成功了


打不开网页的,现在应该是nginx出错了,另外,这个启动信息,没有看到PHP启动啊。

Restarting nginx daemon: nginx Remaining processes: 2606
Restart Httpd Completed.
Shutting down MySQL. SUCCESS!
Starting MySQL. SUCCESS!
[root@localhost ~]#
作者: domin    时间: 2011-2-6 08:55
让人私下帮你看看吧, 这样发帖等解决问题不知道要到什么时候
作者: ypandjp    时间: 2011-2-6 09:31
我的128内存的, 装了  mapn  跑杰奇,非一般的速度,伪静态设置更是方便!也是centos呀,都是按照人家复制粘贴,全智能全自动全方位效果好呀。你那个centos是哪国的呀
作者: wjhhxl    时间: 2011-2-6 09:46
原帖由 ypandjp 于 2011-2-6 09:31 发表
我的128内存的, 装了  mapn  跑杰奇,非一般的速度,伪静态设置更是方便!也是centos呀,都是按照人家复制粘贴,全智能全自动全方位效果好呀。你那个centos是哪国的呀 ...


你的centos在哪下载的。
我在这里下载的。http://centos.ustc.edu.cn/
也在国内其他地方下载过。都没成功。
作者: wjhhxl    时间: 2011-2-6 09:50
原帖由 domin 于 2011-2-6 08:55 发表
让人私下帮你看看吧, 这样发帖等解决问题不知道要到什么时候

谢谢你!
作者: sagawa    时间: 2011-2-6 12:32
这问题比较奇怪,DVD版的centos 最小化安装和只去掉桌面其他默认的安装都是一次成功
作者: 风声    时间: 2011-2-6 13:04
原帖由 ypandjp 于 2011-2-6 09:31 发表
我的128内存的, 装了  mapn  跑杰奇,非一般的速度,伪静态设置更是方便!也是centos呀,都是按照人家复制粘贴,全智能全自动全方位效果好呀。你那个centos是哪国的呀 ...



你用nginx还是apache的伪静态规则?




欢迎光临 全球主机交流论坛 (https://hostloc.gdisk.cf/) Powered by Discuz! X3.4