正常顺序安装LNMPA。但在安装成功之后 运行命令/root/lnmpa status
Apache的status一项会出现错误提示:
/etc/init.d/httpd: line 112: lynx: command not found

[root@vps ~]# ll /usr/local/apache/
total 60
drwxr-xr-x  2 root root  4096 Jan  6 12:56 bin
drwxr-xr-x  2 root root  4096 Jan  6 12:56 build
drwxr-xr-x  2 root root  4096 Jan  6 12:56 cgi-bin
drwxr-xr-x  5 root root  4096 Jan  6 13:04 conf
drwxr-xr-x  3 root root  4096 Jan  6 12:56 error
drwxr-xr-x  2 root root  4096 Jan  6 12:56 htdocs
drwxr-xr-x  3 root root  4096 Jan  6 12:56 icons
drwxr-xr-x  2 root root  4096 Jan  6 12:56 include
drwxr-xr-x  3 root root  4096 Jan  6 12:56 lib
drwxr-xr-x  2 root root  4096 Jan 30 12:27 logs
drwxr-xr-x  4 root root  4096 Jan  6 12:56 man
drwxr-xr-x 14 root root 12288 Jan  6 12:56 manual
drwxr-xr-x  2 root root  4096 Jan  6 13:04 modules
[root@vps ~]# /root/lnmpa 
=========================================================================
Manager for LNMPA V0.8  ,  Written by Licess 
=========================================================================
LNMPA is a tool to auto-compile & install Nginx+MySQL+PHP+Apache on Linux 
This script is a tool to Manage status of LNMPA 
For more information please visit 
http://www.lnmp.org

Usage: /root/lnmpa {start|stop|reload|restart|kill|status}
=========================================================================
Usage: /root/lnmpa {start|stop|reload|restart|kill|status}
[root@vps ~]# /root/lnmpa status
=========================================================================
Manager for LNMPA V0.8  ,  Written by Licess 
=========================================================================
LNMPA is a tool to auto-compile & install Nginx+MySQL+PHP+Apache on Linux 
This script is a tool to Manage status of LNMPA 
For more information please visit 
http://www.lnmp.org

Usage: /root/lnmpa {start|stop|reload|restart|kill|status}
=========================================================================
Nginx is runing!
/etc/init.d/httpd: line 112: lynx: command not found
SUCCESS! MySQL running (21792)
[root@vps ~]# 

安装lynx

yum install lynx -y
vi /usr/local/apache/conf/extra/httpd-info.conf

将<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from .example.com
</Location>

改成
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>

修改如下图所示:

lnmpa-lynx

然后重启Apache

service httpd restart

PS:
如果执行命令/root/lnmp出现以下情况:

[root@vps ~]# /root/lnmp restart
=========================================================================
Manager for LNMP V0.8  ,  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 stop
PHP-FPM program is not runing!
Shutting down MySQL. SUCCESS! 
MySQL program is stop
Starting LNMP…
Nginx start successfully!
/root/lnmp: line 46: /usr/local/php/sbin/php-fpm: No such file or directory
PHP-FPM start successfully!
Starting MySQL. SUCCESS! 
MySQL start successfully!
[root@vps ~]# /root/lnmp status
=========================================================================
Manager for LNMP V0.8  ,  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}
=========================================================================
Nginx is runing!
php-fpm is stop!
SUCCESS! MySQL running (21462)

这很正常,因为我们用的是lnmpa。而lnmpa则没有php-fpm。

lnmpa的命令脚本是/root/lnmpa {start|stop|reload|restart|kill|status}。

 

viahttp://www.enjoywp.com/lnmpa/cmd-lnmpa-status-error-info-solution/

最后修改:2012 年 04 月 05 日 01 : 40 AM