VPS侦探论坛

 找回密码
 注册
查看: 5302|回复: 4

centos 6 32bit安装出错,军哥来指导下,thanks

[复制链接]
发表于 2013-4-17 08:21:04 | 显示全部楼层 |阅读模式

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

# Check if user is root
if [ $(id -u) != "0" ]; then
    printf "Error: You must be root to run this script!\n"
    exit 1
fi

printf "=========================================================================\n"
printf "Manager for LNMP V0.9  ,  Written by Licess \n"
printf "=========================================================================\n"
printf "LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux \n"
printf "This script is a tool to Manage status of lnmp \n"
printf "For more information please visit http://www.lnmp.org \n"
printf "\n"
printf "Usage: /root/lnmp {start|stop|reload|restart|kill|status}\n"
printf "=========================================================================\n"

NGINXNAME=nginx
NGINXCONFIGFILE=/usr/local/nginx/conf/$NGINXNAME.conf
NGINXPIDFILE=/usr/local/nginx/logs/$NGINXNAME.pid
NGINXDAEMON=/usr/local/nginx/sbin/$NGINXNAME
PHPFPMNAME=php-fpm
PHPFPMCONFIGFILE=/usr/local/php/etc/$PHPFPMNAME.conf
PHPFPMPIDFILE=/usr/local/php/logs/$PHPFPMNAME.pid
PHPFPMDAEMON=/usr/local/php/sbin/$PHPFPMNAME
HOSTNAME=`hostname`
MYSQLPIDFILE=/usr/local/mysql/var/$HOSTNAME.pid

function_start()
{
    printf "Starting LNMP...\n"
    if [ -f $NGINXPIDFILE ]; then
        printf "Nginx is runing!\n"
        exit 1
    else
        $NGINXDAEMON -c $NGINXCONFIGFILE
        printf "Nginx start successfully!\n"
    fi

    if [ -f $PHPFPMPIDFILE ]; then
        printf "php-fpm is runing!\n"
    else

$PHPFPMDAEMON start

printf "PHP-FPM start successfully!\n"
    fi

    if [ -f $MYSQLPIDFILE ]; then
        printf "MySQL is runing!\n"
    else

/etc/init.d/mysql start

printf "MySQL start successfully!\n"
    fi
}

function_stop()
{
    printf "Stoping LNMP...\n"
    if  [ -f $NGINXPIDFILE ]; then
        kill `cat $NGINXPIDFILE`
        printf "Nginx program is stop\n"
    else
        printf "Nginx program is not runing!\n"
    fi

    if  [ -f $PHPFPMPIDFILE ]; then
        $PHPFPMDAEMON stop
        printf "PHP-FPM program is stop\n"
    else
        printf "PHP-FPM program is not runing!\n"
    fi

    if  [ -f $MYSQLPIDFILE ]; then
        /etc/init.d/mysql stop
        printf "MySQL program is stop\n"
    else
        printf "MySQL program is not runing!\n"
    fi
}

function_reload()
{
    printf "Reload LNMP...\n"
    printf "Reload Nginx configure...\n"
    $NGINXDAEMON -t
    $NGINXDAEMON -s reload
    printf "Nginx program is reloding!\n"
    /etc/init.d/mysql reload
    $PHPFPMDAEMON reload
}

function_restart()
{
    printf "Reload LNMP...\n"
    printf "Reload Nginx configure...\n"
    $NGINXDAEMON -t
    kill `cat $NGINXPIDFILE`
    $NGINXDAEMON -c $NGINXCONFIGFILE
    printf "Nginx program is restarting!\n"
    /etc/init.d/mysql restart
    $PHPFPMDAEMON restart
}

function_kill()
{
    kill `cat $NGINXPIDFILE`
    kill `cat $PHPFPMPIDFILE`
    kill `cat $MYSQLPIDFILE`
}

function_status()
{
    if [ -f $NGINXPIDFILE ]; then
      printf "Nginx is runing!\n"
    else

printf "Nginx is stop!\n"
    fi

    if [ -f $PHPFPMPIDFILE ]; then
      printf "php-fpm is runing!\n"
    else

printf "php-fpm is stop!\n"
    fi
/etc/init.d/mysql status
}

case "$1" in

start)

function_start

;;

stop)

function_stop

;;

restart)

function_stop

function_start

;;

reload)

function_reload

;;

kill)

function_kill

;;

status)

function_status

;;

*)

printf "Usage: /root/lnmp {start|stop|reload|restart|kill|status}\n"
esac
exit

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2013-4-17 08:51:33 | 显示全部楼层


这个不是日志,日志是lnmp.log
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2013-4-17 16:52:10 | 显示全部楼层

lnmp.log来咧

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2013-4-17 16:52:28 | 显示全部楼层

回复 2# 的帖子




lnmp.log文件见3楼
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2013-4-17 17:08:11 | 显示全部楼层

checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.


前面安装openssl-devel有报错
Processing Dependency: krb5-devel for package: openssl-devel-1.0.0-27.el6_4.2.x86_64
.....
Downloading Packages:
http://mirrors.163.com/centos/6/ ... el6_4.2.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.


Error Downloading Packages:
  krb5-devel-1.10.3-10.el6_4.2.x86_64: failure: Packages/krb5-devel-1.10.3-10.el6_4.2.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
造成openssl-devel没安装上
这个源上的这个包没有了,换个其他源试试

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-24 11:23 , Processed in 0.034001 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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