CentOS6.5 installing Tengine server in VMware

Source: Internet
Author: User
Tags create directory

  1. Upload the Tengine compressed package tengine-2.1.0.tar.gz to the server via SSH.

    Upload to/opt path

  2. Decompression tengine-2.1.0.tar.gz

    TAR-ZXVF tengine-2.1.0.tar.gz

  3. Access to the Tengine directory

    CD tengine-2.1.0

  4. Installation of Tengine dependencies

    Yum-y Install gcc openssl-devel pcre-develzlib-devel

  5. Compilation Three steps away

    ./configure \

    --prefix=/opt/sxt/soft/tengine-2.1.0/\

    --error-log-path=/var/log/nginx/error.log \

    --http-log-path=/var/log/nginx/access.log \

    --pid-path=/var/run/nginx/nginx.pid \

    --lock-path=/var/lock/nginx.lock \

    --with-http_ssl_module \

    --with-http_flv_module \

    --with-http_stub_status_module \

    --with-http_gzip_static_module \

    --http-client-body-temp-path=/var/tmp/nginx/client/\

    --http-proxy-temp-path=/var/tmp/nginx/proxy/\

    --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/\

    --HTTP-UWSGI-TEMP-PATH=/VAR/TMP/NGINX/UWSGI \

    --HTTP-SCGI-TEMP-PATH=/VAR/TMP/NGINX/SCGI \

    --with-pcre

    Make && make install

  6. Create an nginx file under/ETC/INIT.D

    Vi/ect/init.d/nginx

  7. Paste the content below

  8. #!/bin/bash## chkconfig: - 85 15# description: nginx is a world  Wide Web server. It is used to serve# Source function  Library:  /etc/rc.d/init.d/functions # source networking configuration.  /etc/sysconfig/network # check that networking is up. [  "$NETWORKING"  =  "no"  ] && exit 0 nginx= "/usr/tengine-2.1/ Sbin/nginx "prog=$ (basename  $nginx)  nginx_conf_file="/usr/tengine-2.1/conf/nginx.conf " #[ - f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx lockfile=/var/lock/ subsys/nginx  #make_dirs ()  {#   # make required directories#    user= ' nginx -v 2>&1 | grep  "configure arguments:"  |  sed  ' s/[^*]*--user=\ ([^ ]*\). */\1/g '  -' #   options= ' $nginx  -V 2>&1 | grep  ' configure arguments: ' #    for opt in  $options;  do#       if  [  ' echo  $opt  | grep  '. *-temp-path '  ]; then#            value= ' echo  $opt  | cut -d  "="  -f  2 ' #           if [ ! -d  "$value"  ]; then#               #  echo  "Creating"   $value #                mkdir -p  $value  && chown -R  $user   $value #            fi#        fi#   donE#} start ()  {    [ -x  $nginx  ] | |  exit 5    [ -f  $NGINX _conf_file ] | |  exit 6#    make_dirs    echo -n $ "Starting $ prog:  "    daemon  $nginx  -c  $NGINX _conf_file     retval=$?    echo    [  $retval  -eq 0 ] & & touch  $lockfile     return  $retval} stop ()  {     echo -n $ "stopping  $prog: "     killproc  $prog  - quit    retval=$?    echo    [  $retval  - eq 0 ] && rm -f  $lockfile     return  $retval}  restart ()  {    configtest | |  rEturn $?    stop    sleep 1    start}  reload ()  {    configtest | |  return $?    echo -n $ "reloading  $prog: " #  - HUP is the Nginx smooth restart parameter       killproc  $nginx  -HUP     Retval=$?    echo} force_reload ()  {    restart}  Configtest ()  {   $nginx  -t -c  $NGINX _conf_file} rh_status ()  {     status  $prog} rh_status_q ()  {    rh_status >/dev/ null 2>&1} case  "$"  in    start)          rh_status_q && exit 0         $1        ;;     stop)         rh_status_q | |  exit 0        $1         ;;     restart|configtest)         $1         ;;     reload)         rh_status_q | |  exit 7        $1         ;;     force-reload)         force_reload         ;;     status)         rh_status         ;;     condrestart|try-restart)         rh_status_q  | |  exit 0            ;;     *)         echo $ "Usage: $0 { Start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest} "         exit 2esac
  9. To replace a path in a text

    Enter the Tengine installation directory

    cd/opt/sxt/soft/tengine-2.1.0/

    Pwd

    Copy the installation directory

    nginx= "/usr/tengine-2.1/sbin/nginx"

  10. Modify Nginx's Execute permissions

    chmod 755 Nginx

  11. Create Directory/var/tmp/nginx/client/

    Mkdir-p/var/tmp/nginx/client/

  12. Start Nginx Service

    Service Nginx Start

  13. Add to boot

    Chkconfig--add Nginx

  14. Viewing the status of Nginx boot-up

    Chkconfig--list Nginx

  15. Change Nginx boot status

    Chkconfig Nginx on

    Check the status Chkconfig--list Nginx again

  16. View IP, enter IP in the browser to see if the installation was successful

    Ifconfig

    inet addr:192.168.153.129

    See in the browser

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/A4/72/wKioL1mru7LiFEx3AAATbyRUIsY240.png "title=" f% P8fo0v6a[[civt ']h9[yd.png "alt=" Wkiol1mru7lifex3aaatbyruisy240.png "/>

Indicates successful installation

CentOS6.5 installing Tengine server in VMware

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.