wrchiu 发表于 2013-4-17 08:21:04

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

#!/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

licess 发表于 2013-4-17 08:51:33

这个不是日志,日志是lnmp.log

wrchiu 发表于 2013-4-17 16:52:10

lnmp.log来咧

wrchiu 发表于 2013-4-17 16:52:28

回复 2# 的帖子

lnmp.log文件见3楼

licess 发表于 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/updates/x86_64/Packages/krb5-devel-1.10.3-10.el6_4.2.x86_64.rpm: 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: No more mirrors to try.
造成openssl-devel没安装上
这个源上的这个包没有了,换个其他源试试
页: [1]
查看完整版本: centos 6 32bit安装出错,军哥来指导下,thanks