zoukankan      html  css  js  c++  java
  • Nginx服务安装指南

    rpm -qa|grep pcre*
    pcre-7.8-7.el6.x86_64
    pcre-devel-7.8-7.el6.x86_64
    
    如果缺少,可以用yum来安装,也是建议用yum方式安装。
    yum install pcre pcre-devel -y
    
    rpm -qa|grep openssl*
    rpm -qa|grep openssl*
    openssh-5.3p1-122.el6.x86_64
    openssh-clients-5.3p1-122.el6.x86_64
    openssl-devel-1.0.1e-57.el6.x86_64
    openssl-1.0.1e-57.el6.x86_64
    openssh-server-5.3p1-122.el6.x86_64
    
    yum install openssl openssl-devel -y
    yum install lsof -y
    useradd nginx -s /sbin/nologin -M
    scp /Users/vincent/Downloads/nginx-1.12.0.tar.gz root@10.199.199.89:/root/
    tar xf nginx-1.12.0.tar.gz
    cd nginx-1.12.0
    ./configure --user=nginx --group=nginx --prefix=/application/nginx --with-http_stub_status_module --with-http_ssl_module
    make 
    make install
    ls -l /application/nginx/
    ls -l /application/nginx/
    总用量 16
    drwxr-xr-x. 2 root  root 4096 5月  22 08:49 conf
    drwxr-xr-x. 2 root  root 4096 5月  22 08:49 html
    drwxr-xr-x. 2 root  root 4096 5月  22 08:50 logs
    drwxr-xr-x. 2 root  root 4096 5月  22 08:49 sbin
    /application/nginx/sbin/nginx -t
    nginx: the configuration file /application/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /application/nginx/conf/nginx.conf test is successful
    启动命令
    /application/nginx/sbin/nginx
    
    lsof -i :80
    COMMAND  PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    nginx   4352  root    6u  IPv4  16423      0t0  TCP *:http (LISTEN)
    nginx   4353 nginx    6u  IPv4  16423      0t0  TCP *:http (LISTEN)
    
    netstat -lnt|grep 80
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN
    
    wget 127.0.0.1 
    
    curl 127.0.0.1
    
    vim /etc/sysconfig/iptables
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    :wq!
    service iptables restart
    
    http://10.199.199.89
    
    Welcome to nginx!
  • 相关阅读:
    java 将表情转换成字符串存入数据库
    java html websocket简单实现
    Java poi读取Excel表格中公式的计算值
    转盘代码,自己搞了一个
    html5 canvas画布
    cat命令查看文件指定行数
    CentOS7 安装 gpbackup 和 gpbackup-s3-plugin 来备份和还原 Greenplum 数据库
    QT5 打包发布Release应用程序
    CentOS7 安装Redis6.0.10
    ES系列(二):基于多播的集群发现实现原理解析
  • 原文地址:https://www.cnblogs.com/vincent-liang/p/6887060.html
Copyright © 2011-2022 走看看