PHP 5.3.10 + nginx1.0.12 + PostgreSQL 9.1.2 source code compilation automated deployment of the first version.

Source: Internet
Author: User

The deployment script of the first version has been completed. This time, the script for starting and disabling lnpp is provided for Unified Control and supplement. The reason for not merging is that it is associated with starting and disabling, there are also different startup parameter controls for everyone...

First look at PhP
5.3.10 + nginx1.0.12 + PostgreSQL 9.1.2 source code compilation automated deployment of the first version

Http://blog.csdn.net/qzier_go/article/details/7256560

Next, start and close the script.

#!/bin/bashPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATH# Source function library.. /etc/rc.d/init.d/functions# Source networking configuration.. /etc/sysconfig/network# Check that networking is up.[ "$NETWORKING" = "no" ] && exit 0#start shell scriptLNPP_ROOT=/tmp/lnppPHP=$LNPP_ROOT/php/sbin/php-fpmNGINX=$LNPP_ROOT/nginx/sbin/nginxPG_ROOT=$LNPP_ROOT/pgsqlPGDAEMON=$PG_ROOT/bin/postmasterPGCTL=$PG_ROOT/bin/pg_ctlPGUSER=postgresPGDATA=$PG_ROOT/dataPGLOG=$PG_ROOT/logs/pgsql.logstart(){echo "-------------start php---------------"$LNPP_ROOT/php/sbin/php-fpmecho "-------------start success---------------"echo "-------------start nginx-------------"$LNPP_ROOT/nginx/sbin/nginxecho "-------------start success---------------"echo "-------------start pgsql---------------"su  $PGUSER -c "$PGDAEMON -D '$PGDATA' &" >>$PGLOG 2>&1echo "-------------start success---------------"}stop(){echo "-------------stop php----------------"ps -e | grep $(basename $PHP) | {  while read pid tty time cmd;  do    echo "killing $pid ==> $cmd"    kill -9 $pid   done}echo "-------------stop nginx--------------"killproc $NGINX -QUITecho "-------------stop pgsql--------------"su  $PGUSER -c "$PGCTL stop -D '$PGDATA' -m fast"echo "-------------stop pgsql--------------"}case "$1" instart)start;;stop)stop;;*)echo {1}quot;Usage: $0 {start|stop}"RETVAL=1esacexit $RETVAL

1. Save the content as lnpp. Sh

2. Change lnpp_root =/tmp/lnpp to the lnpp installation address.

3. Copy to/etc/rc. d/init. d/lnpp.

4. # chmod A + x/etc/rc. d/init. d/lnpp

5. Server lnpp start

Addition:

Lnpp. Sh is here

Https://code.google.com/p/lnpp/


We have established a PHP Group. Welcome to join us (QQ Group No.: 213572677)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.