zoukankan      html  css  js  c++  java
  • zabbix学习-安装nginx

    zabbix服务端采用LNMP或者LAMP,我这里安装nginx,版本是nginx-1.12.1

    需要提前安装的包,opssl,openssl-devel,pcre,pcre-devel,gcc*.

    现将压缩包上传到linux服务器上,安装命令

    ./configure --prefix=/usr/local/nginx-1.12.1 --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-pcre

    其中/usr/local/nginx-1.12.1 是指nginx的安装路径

    上述命令执行完毕后,如果没有报错,接着执行make   make install

    安装完成后,执行命令curl -s http://localhost,如下:

    [root@zabbixserver nginx-1.12.1]# curl -s http://localhost
    <!DOCTYPE html>
    <html>
    <head>
    <title>Welcome to nginx!</title>
    <style>
        body {
             35em;
            margin: 0 auto;
            font-family: Tahoma, Verdana, Arial, sans-serif;
        }
    </style>
    </head>
    <body>
    <h1>Welcome to nginx!</h1>
    <p>If you see this page, the nginx web server is successfully installed and
    working. Further configuration is required.</p>
    
    <p>For online documentation and support please refer to
    <a href="http://nginx.org/">nginx.org</a>.<br/>
    Commercial support is available at
    <a href="http://nginx.com/">nginx.com</a>.</p>
    
    <p><em>Thank you for using nginx.</em></p>
    </body>
    </html> 

    或者在浏览器里访问:主机IP

    启动:

    /usr/local/nginx-1.12.1/sbin/nginx

    关闭:

    /usr/local/nginx-1.12.1/sbin/nginx -s stop

    重置:(当配置文件更改时,可以不用重启来让新的配置生效)

    /usr/local/nginx-1.12.1/sbin/nginx -s reload

    ------------先简单安装,后面再研究----------

  • 相关阅读:
    Android 内存剖析 – 发现潜在问题
    Android内存泄漏问题(一)
    Android的事件处理机制详解(二)-----基于监听的事件处理机制
    Android的事件处理机制(一)------基于回调机制的事件处理
    OOA、OOD 和 OOP
    面向对象初识
    Python 2 和 Python 3 的区别
    软件开发规范
    语法分析和词法分析
    循环删除的坑
  • 原文地址:https://www.cnblogs.com/cq90/p/7221568.html
Copyright © 2011-2022 走看看