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)