A simple installation process for tengine on centos
Last Update:2014-05-15
Source: Internet
Author: User
Centos tengine's simple installation process environment description CentOSrelease5.5 (Final) kernel \ ronan \ m install the basic environment gcc install yum-yinstallgccyum-yinstallgcc-c ++ install pcreyum-yinstallpcre-devel install... centos release 5.5 (Final) kernel \ r on an \ m install the basic environment gcc install yum-y install gccyum-y install gcc-c ++ install pcre yum-y install pcre-devel install openssl yum-y install openssl-devel 2. download proxy_cache plug-in cd/opt/tools/tengine/plugins/proxy_cache wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz Tar zxvf ngx_cache_purge-2.1.tar.gz download the latest tengine installation package without specifying the directory method for installation, default installation in url/local/nginx $. /configure $ make $ sudo make install specifies the directory method for installation, installed in/opt. /configure -- prefix =/opt/tengine/nginx make install specifies the directory method to install and install the cache mode, installed in/opt. /configure -- add-module =/opt/tools/tengine/plugins/proxy_cache/ngx_cache_purge-2.1 -- prefix =/opt/servers/tengine/nginx -- with-http_stub_status_module make install configure tengine for server Manage tengine vim/etc/rc. d/init. d/nginx # Edit the startup file and add the following content #! /Bin/bash # nginx Startup script for the Nginx HTTP Server # it is v.0.0.2 version. # chkconfig:-85 15 # description: Nginx is a high-performance web and proxy server. # It has a lot of features, but it's not for everyone. # processname: nginx # pidfile:/var/run/nginx. pid # config:/usr/local/nginx/conf/nginx. conf nginxd =/opt/servers/tengine/nginx/sbin/nginx nginx_config =/opt/servers/tengine/ngi Nx/conf/nginx. conf nginx_pid =/opt/servers/tengine/nginx/logs/nginx. pid RETVAL = 0 prog = "nginx" # Source function library .. /etc/rc. d/init. d/functions # Source networking configuration .. /etc/sysconfig/network # Check that networking is up. [$ {NETWORKING} = "no"] & exit 0 [-x $ nginxd] | exit 0 # Start nginx daemons functions. start () {if [-e $ nginx_pid]; then echo "nginx already running .... "Exit 1 fi echo-n $" Starting $ prog: "daemon $ nginxd-c $ {nginx_config} RETVAL = $? Echo [$ RETVAL = 0] & touch/var/lock/subsys/nginx return $ RETVAL} # Stop nginx daemons functions. stop () {echo-n $ "Stopping $ prog:" killproc $ nginxd RETVAL =$? Echo [$ RETVAL = 0] & rm-f/var/lock/subsys/nginx/opt/servers/tengine/nginx/logs/nginx. pid} reload () {echo-n $ "Reloading $ prog:" # kill-HUP 'cat $ {nginx_pid} 'killproc $ nginxd-hup retval =$? Echo} # See how we were called. case "$1" in start) start; stop) stop; reload) reload; restart) stop start; status) status $ prog RETVAL = $?; *) Echo $ "Usage: $ prog {start | stop | restart | reload | status | help} "exit 1 esac exit $ RETVAL save and exit # chmod 775/etc/rc. d/init. d/nginx # grant the file execution permission # chkconfig nginx on # set startup #/etc/rc. d/init. d/nginx restart # service nginx restart