• LNMP


    [root@xzwserver tools]# cat /etc/centos-release
    CentOS release 6.7 (Final)

    [root@xzwserver tools]# uname -r
    2.6.32-573.el6.x86_64

    [root@xzwserver tools]# rpm -qa pcre pcre-devel gcc gcc-c++
    pcre-7.8-7.el6.x86_64


    [root@xzwserver tools]# yum -y install pcre-devel pcre

    [root@xzwserver tools]# rpm -qa openssl openssl-devel
    openssl-1.0.1e-42.el6.x86_64

    [root@xzwserver tools]# yum install -y openssl openssl-devel

     mkdir -p /home/tools
    cd /home/tools
    wget -q http://nginx.org/download/nginx-1.12.0.tar.gz

    [root@xzwserver tools]# useradd nginx -s /sbin/nologin -M
    [root@xzwserver tools]# tar xf nginx-1.12.0.tar.gz
     cd nginx-1.12.0
    [root@xzwserver nginx-1.12.0]# ./configure --user=nginx --group=nginx --prefix=/application/nginx-1.12.0/ --with-http_stub_status_module --with-http_ssl_module
    [root@xzwserver nginx-1.12.0]# ./configure --help
    make
    make install
    [root@xzwserver nginx-1.12.0]# ln -s /application/nginx-1.12.0/ /application/nginx
    [root@xzwserver nginx-1.12.0]# ll /application/nginx
    lrwxrwxrwx. 1 root root 26 May  8 16:31 /application/nginx -> /application/nginx-1.12.0/


    [root@xzwserver nginx-1.12.0]# /application/nginx/sbin/nginx -t
    nginx: the configuration file /application/nginx-1.12.0//conf/nginx.conf syntax is ok
    nginx: configuration file /application/nginx-1.12.0//conf/nginx.conf test is successful

    [root@xzwserver nginx-1.12.0]# /application/nginx/sbin/nginx

    [root@xzwserver nginx-1.12.0]# netstat -anptu | grep 80
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      4359/nginx

    [root@xzwserver nginx-1.12.0]# wget 127.0.0.1 或者 [root@xzwserver nginx-1.12.0]# curl 127.0.0.1

    sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
     grep 'SELINUX=disabled' /etc/selinux/config
    setenforce 0
    getenforce



     vim /etc/rc.d/rc.local  开机自启

    mkdir html/www -p
      252  echo "http://www.etiantian.org" > html/www/index.html
      253  cat html/www/index.html


      257  egrep -v '#|^$' conf/nginx.conf.default > conf/nginx.conf
      258  vim conf/nginx.conf
      259  sbin/nginx -t
      260  sbin/nginx -s reload

    worker_processes  1;
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
        server {
            listen       80;
            server_name  localhost;
            location / {
                root   html;
                index  index.html index.htm;
            }
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
        server {
            listen       80;
            server_name  www.etiantian.org;
            location / {
                root   html/www;
                index  index.html index.htm;
            }
        }
    }
    ~    

  • 相关阅读:
    语句
    C#语言基础
    进制转换
    js对URL的相关操作集锦
    js/javascript计时器方法及使用场景
    js中FormData+XMLHttpRequest数据传输
    HTML中footer固定在页面底部的若干种方法
    js/jquery 禁用点击事件
    asp.net微信开发第七篇----高级群发(图文)
    asp.net微信开发第六篇----高级群发(文本)
  • 原文地址:https://www.cnblogs.com/linux985/p/7221678.html
Copyright © 2020-2023  润新知