Nginx高端成长之路

Nginx系列之零基础编译安装Nginx

2019-01-24  本文已影响7人  一抹淡季

从本文开始,我将陆续书写有关Nginx相关学习内容。鉴于目前个人处于学习使用的阶段,在这里分享相关的学习使用经验,希望对大家的学习工作能有所帮助。

1.引言

Nginx是一款优秀的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,遵循BSD开源协议。具备高并发、高性能高可扩展性高可靠性热部署* 等特点。目前Nginx已被广泛使用,如百度、京东、新浪、网易、腾讯、淘宝等。同时也有许多的衍生版本,如淘宝TengineOpenResty等。

1.预备工作

2.获取nginx

$ wget http://nginx.org/download/nginx-1.14.2.tar.gz
$ tar -zxvf nginx-1.14.2

3.ngxin 目录结构

4.编译安装

5. 启动测试

$ /usr/local/nginx/sbin/nginx
$ curl 127.0.0.1
<!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>

6. 总结

本文主要介绍了基于CentOS编译安装nginx相关的操作。同时介绍了nginx的目录文件结构及相关的一些配置选项,希望对想入门学习nginx的小伙伴们提供帮助。在下篇文章中我将介绍nginx信号量控制及配置文件相关的内容。

上一篇 下一篇

猜你喜欢

热点阅读