分享我的生活
分享能使人快乐

用Licess的一键安装包安装vps问题

用Licess的一键安装包下载地址
由于我自己咋本机上搭建的centos,第一次启动的时候没有配置,所以出来一些问题
我下载的是full包,按说应该所有的文件都在本地,但是的确有两三个还是需要在线上下载的,这倒不是很多,对于能投入生产环境的机器来说是不成问题的。
换句话说我搭建的环境还没弄到能生产的地步——少了网络配置
这是启动 lnmp包软件 时候的代码
[root@1dle lnmp0.4-full]# /root/lnmp start
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Starting LNMP…
[warn]: conflicting server name “blog.1dle.com” on 0.0.0.0:80, ignored
Nginx is the successful start!
Starting php_fpm Failed loading /usr/local/zend/ZendOptimizer.so:  /usr/local/zend/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied
PHP Fatal error:  [eAccelerator] eAccelerator 0.9.5.3 can not be loaded twice in Unknown on line 0
failed
Starting MySQL.                                            [确定]
然后停止
[root@1dle lnmp0.4-full]# /root/lnmp stop
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Stoping LNMP…
Nginx program is stoping
Shutting down MySQL.                                       [确定]
Shutting down php_fpm /usr/local/php/sbin/php-fpm: line 69: kill: (30328) – 没有那个进程
………………………….. failed
start again ,这次加了一个虚拟主机,
[root@1dle lnmp0.4-full]# /root/lnmp start
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Starting LNMP…
[warn]: conflicting server name “blog.1dle.com” on 0.0.0.0:80, ignored
Nginx is the successful start!
Starting php_fpm Failed loading /usr/local/zend/ZendOptimizer.so:  /usr/local/zend/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied
done
Starting MySQL.                                            [确定]
出现虚拟主机出错,出错了,配置的问题,打开配置
[root@1dle lnmp0.4-full]# cd /usr/local/nginx/conf/vhost/
[root@1dle vhost]# ls
blog.1dle.com.conf
[root@1dle vhost]# vi blog.1dle.com.conf
发现里面的配置在 域名出,域名出了两次,删掉一个域名,然后保存退出。
[root@1dle vhost]# /root/lnmp start
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Starting LNMP…
Nginx is runing!
[root@1dle vhost]# /root/lnmp stop
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Stoping LNMP…
Nginx program is stoping
Shutting down MySQL.                                       [确定]
Shutting down php_fpm . done
[root@1dle vhost]# /root/lnmp start
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Starting LNMP…
Nginx is the successful start!
Starting php_fpm Failed loading /usr/local/zend/ZendOptimizer.so:  /usr/local/zend/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied
done
Starting MySQL.                                            [确定]
找到问题,在安装包中有这样一段
if [ `uname -m` = ‘x86_64’ ]; then
wget -c http://soft.vpser.net/web/zend/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
tar zxvf ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
mkdir -p /usr/local/zend/
cp ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp/ZendOptimizer.so /usr/local/zend/
else
wget -c http://soft.vpser.net/web/zend/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
mkdir -p /usr/local/zend/
cp ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /usr/local/zend/
fi
大概的意思是判断系统类型是 x86_64 还是 i386 ,然后下载对应的包并解压 复制到指定位置
遇有本机无法访问网络,所以这个安装没有进行,php启动的时候自然找不到 zend
设置联网,执行
wget -c http://soft.vpser.net/web/zend/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
mkdir -p /usr/local/zend/
cp ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /usr/local/zend/
还是一样的提示错误,进入相关文件夹,有  ZendOptimizer.so 这个文件,这应该是其他的问题了
[root@1dle vhost]# cd /usr/local/zend/
[root@1dle zend]# ls
ZendOptimizer.so
从网上发现是selinux的问题
[root@1dle zend]# vi /etc/selinux/config
[root@1dle zend]# vi /etc/sysconfig/selinux
[root@1dle zend]# chcon -t texrel_shlib_t /usr/local/zend/ZendOptimizer.so
打开/etc/selinux/config 把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
打开/etc/sysconfig/selinux在 SELINUX=enforcing 前面加个#号注释掉它 # SELINUX=enforcing
并在下面添加一行:
SELINUX=disabled
还需要的一步就是 把刚刚加进去的文件验证(ru认为是验证)一下啦
chcon -t texrel_shlib_t /usr/local/zend/ZendOptimizer.so
重启软件包
[root@1dle zend]# /root/lnmp stop
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Stoping LNMP…
Nginx program is stoping
Shutting down MySQL.                                       [确定]
Shutting down php_fpm . done
[root@1dle zend]# /root/lnmp start
=========================================================================
Manager for LNMP V0.4  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Starting LNMP…
Nginx is the successful start!
Starting php_fpm  done
Starting MySQL.                                            [确定]
软件启动成功
赞(0)
未经允许不得转载:RUBLOG-分享我的生活 » 用Licess的一键安装包安装vps问题

我想说 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址