码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix学习-安装nginx

时间:2017-07-22 17:00:10      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:gcc   压缩包   ops   doctype   linux服务器   学习   reload   浏览器   type   

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 {
        width: 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

 

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

 

zabbix学习-安装nginx

标签:gcc   压缩包   ops   doctype   linux服务器   学习   reload   浏览器   type   

原文地址:http://www.cnblogs.com/cq90/p/7221568.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!