全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 3714|回复: 14

[疑问] 俺实在是没办法了。安装mapn还是出同样的错误

[复制链接]
发表于 2011-2-5 18:19:03 | 显示全部楼层 |阅读模式
=========================================================================
*           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!
 楼主| 发表于 2011-2-5 18:19:54 | 显示全部楼层
求 高手指点!!!
 楼主| 发表于 2011-2-5 18:40:31 | 显示全部楼层
终于在网上搜索到了原因

今天弄一个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

赶快试一试!!!
 楼主| 发表于 2011-2-5 18:41:59 | 显示全部楼层
但是我的是关闭的啊

[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
发表于 2011-2-5 18:45:38 | 显示全部楼层
安装脚本添加可执行权限了么
 楼主| 发表于 2011-2-5 18:49:21 | 显示全部楼层
原帖由 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:38 | 显示全部楼层
原帖由 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:45 | 显示全部楼层
我 吧我的128的 现在正在折腾。。
 楼主| 发表于 2011-2-6 07:39:32 | 显示全部楼层
原帖由 风声 于 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 ~]#
发表于 2011-2-6 08:55:49 | 显示全部楼层
让人私下帮你看看吧, 这样发帖等解决问题不知道要到什么时候
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-9-19 23:55 , Processed in 0.062907 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表