VPS侦探论坛

 找回密码
 注册
查看: 6613|回复: 1

lnmpa启动httpd出错

[复制链接]
发表于 2012-3-6 15:02:41 | 显示全部楼层 |阅读模式

/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
MySQL running (6428)                                       [  OK  ]



------------

这是本站下载的init.d.httpd

wget -c http://soft.vpser.net/lnmp/ext/init.d.httpd
cp init.d.httpd /etc/init.d/httpd
chmod +x /etc/init.d/httpd


init.d.httpd 内容如下:(是不是有问题咧)

#!/bin/sh
# Startup script for the Apache Web Server
# chkconfig: 345 85 15
# Description: Startup script for Apache webserver on Debian. Place in /etc/init.d and
# run 'update-rc.d -f httpd defaults', or use the appropriate command on your
# distro. For CentOS/Redhat run: 'chkconfig --add httpd'
### BEGIN INIT INFO
# Provides:          httpd
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts Apache Web Server
# Description:       starts Apache Web Server
### END INIT INFO
# Author:   licess
# website:  http://lnmp.org
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache.  Written by Marc Slemko, 1997/08/23
#
# The exit codes returned are:
#   XXX this doc is no longer correct now that the interesting
#   XXX functions are handled by httpd
# 0 - operation completed successfully
# 1 -
# 2 - usage error
# 3 - httpd could not be started
# 4 - httpd could not be stopped
# 5 - httpd could not be started during a restart
# 6 - httpd could not be restarted during a restart
# 7 - httpd could not be restarted during a graceful restart
# 8 - configuration syntax error
#
# When multiple arguments are given, only the error from the _last_
# one is reported.  Run "apachectl help" for usage info
#
ARGV="$@"
#
# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
# --------------------                              --------------------
#
# the path to your httpd binary, including options if necessary
HTTPD='/usr/local/apache/bin/httpd'
#
# pick up any necessary environment variables
if test -f /usr/local/apache/bin/envvars; then
  . /usr/local/apache/bin/envvars
fi
#
# a command that outputs a formatted text version of the HTML at the
# url given on the command line.  Designed for lynx, however other
# programs may work.  
LYNX="lynx -dump"
#
# the URL to your server's mod_status status page.  If you do not
# have one, then status and fullstatus will not work.
STATUSURL="http://localhost:80/server-status"
#
# Set this variable to a command that increases the maximum
# number of file descriptors allowed per child process. This is
# critical for configurations that use many file descriptors,
# such as mass vhosting, or a multithreaded server.
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
# --------------------                              --------------------
# ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||
# Set the maximum number of file descriptors allowed per child process.
if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
    $ULIMIT_MAX_FILES
fi
ERROR=0
if [ "x$ARGV" = "x" ] ; then
    ARGV="-h"
fi
case $ARGV in
start|stop|restart|graceful|graceful-stop)
    $HTTPD -k $ARGV
    ERROR=$?
    ;;
startssl|sslstart|start-SSL)
    echo The startssl option is no longer supported.
    echo Please edit httpd.conf to include the SSL configuration settings
    echo and then use "apachectl start".
    ERROR=2
    ;;
configtest)
    $HTTPD -t
    ERROR=$?
    ;;
status)
    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
    ;;
fullstatus)
    $LYNX $STATUSURL
    ;;
*)
    $HTTPD $ARGV
    ERROR=$?
esac
exit $ERROR
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-3-6 15:17:48 | 显示全部楼层


/etc/init.d/httpd: line 112: lynx: command not found

lynx: command not found
视乎没有LYNX="lynx -dump" 这样一条命令,

!!!!!!!!!!!!!LNMP !!!!!!!!                 修复lynx 命令错误

也就是这个出错了:
status)
    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
    ;;

[ 本帖最后由 bbsphixy 于 2012-3-6 15:23 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-22 13:34 , Processed in 0.025654 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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