zoukankan      html  css  js  c++  java
  • SSM-6nginx Linux下的安装

    1.下载nginx

    官方网站:

    http://nginx.org/download/

    2. 要求的安装环境

    yum install gcc-c++

    yum -y install pcre-devel

    yum -y install openssl openssl-devel

    yum -y install pcre-devel openssl openssl-devel

    3.第一步:把nginx的源码包上传到linux系统

    第二步:解压缩

    [root@localhost ~]# tar -zxvf nginx-1.8.0.tar.gz

    第三步:使用configure命令创建makeFile文件。

    ./configure --prefix=/opt/nginx --sbin-path=/usr/bin/nginx

    注意:启动nginx之前,上边将临时文件目录指定为/usr/local/nainx

    第四步:编译nginx :make

    第五步:安装nginx:make install

    4. 启动nginx

    进入sbin目录 启动 nginx

    [root@localhost sbin]# ./nginx

     

    关闭nginx

    [root@localhost sbin]# ./nginx -s stop

    推荐使用:

    [root@localhost sbin]# ./nginx -s quit

    重启nginx

    1、先关闭后启动。

    2、刷新配置文件:

    [root@localhost sbin]# ./nginx -s reload

    5. 访问nginx

    默认是80端口。

    注意:是否关闭防火墙。

    1:查看防火状态
    systemctl status firewalld
    service  iptables status

    2:暂时关闭防火墙
    systemctl stop firewalld
    service  iptables stop

    3:永久关闭防火墙
    systemctl disable firewalld
    chkconfig iptables off

    4:重启防火墙
    systemctl enable firewalld
    service iptables restart  

  • 相关阅读:
    【模板】二分
    电脑桌面美化
    浪在ACM新春大作战
    【递归入门】组合+判断素数:dfs(递归)
    【递归入门】组合的输出:dfs
    01背包问题:DP
    [蓝桥杯][历届试题]回文数字
    洛谷 P1706 全排列问题 :STL / dfs
    【模板】DFS
    洛谷 P1781 宇宙总统:sort(string)
  • 原文地址:https://www.cnblogs.com/asndxj/p/10922857.html
Copyright © 2011-2022 走看看