安装 PCRE :

网站:http://pcre.org/

下载:

安装 Nginx :

安装命令:

下载:
wget http://nginx.org/download/nginx-1.8.0.tar.gz tar zxf nginx-1.8.0.tar.gz
cd nginx-1.8.0
./configure --prefix=/usr/local/nginx
make
sudo make install ./configure --prefix=/usr/local/nginx \
--sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module \ ps -ef |grep nginx 启动Nginx:
sudo /usr/local/nginx/sbin/nginx 重新加载配置文件:
sudo /usr/local/nginx/sbin/nginx -t
sudo /usr/local/nginx/sbin/nginx -s reload

查看Nginx版本:

/usr/local/nginx/sbin/nginx -V
Mac-mini:nginx-1.8.0 WangTom$ /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.8.0
built by clang 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
configure arguments: --prefix=/usr/local/nginx Mac-mini:nginx-1.8.0 WangTom$ /usr/local/nginx/sbin/nginx -v
nginx version: nginx/1.8.0

检查是否安装成功:

访问: http://localhost/

页面出现:

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com. Thank you for using nginx.

查看 Nginx 版本:

Mac-mini:html WangTom$ sudo /usr/local/nginx/sbin/nginx -v

nginx version: nginx/1.8.0

检测 Nginx 配置文件

Mac-mini:html WangTom$ sudo /usr/local/nginx/sbin/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

To apply the new configuration, start nginx if it is not yet started or send the reload signal to the nginx’s master process, by executing:

Mac-mini:html WangTom$ sudo /usr/local/nginx/sbin/nginx -s reload

Mac-mini:html WangTom$

参考地址:

Building nginx from Sources:

http://nginx.org/en/docs/configure.html

[END]

最新文章

  1. 用户反馈:对 Rafy 开发框架的一些个人建议
  2. 安装Sublime Text 3汉化插件
  3. HTTP Status Code [RFC]
  4. BZOJ4573 : [Zjoi2016]大森林
  5. 匈牙利命名法、骆驼命名法、帕斯卡(pascal)命名法
  6. 下面介绍一下 Yii2.0 对数据库 查询的一些简单的操作
  7. BZOJ4399 : 魔法少女LJJ
  8. P1236 算24点
  9. 136. Single Number
  10. Visual Assist 生成注释功能
  11. php头函数和浏览器缓存
  12. How to customize authentication to my own set of tables in asp.net web api 2?
  13. JS格式化数字金额用逗号隔开保留两位小数
  14. 积累的VC编程小技巧之标题栏和菜单
  15. 记录UITextField删除状态
  16. RMAN-06900 RMAN-06901 ORA-19921
  17. 【jira】java.lang.OutOfMemoryError: GC overhead limit exceeded
  18. Java学习笔记之——this关键字、非静态成员属性和静态成员属性的区别、类的加载顺序
  19. re库
  20. python代码块,小数据池,驻留机制深入剖析

热门文章

  1. 前后端分离——使用OSS
  2. KingbaseES恢复被删除数据
  3. wsl2 使用串口/usb
  4. LeetCode_单周赛_332
  5. springcloud微服务搭建demo
  6. Vue框架-03:JS的几种循环方式,Key值的解释,数组/对象的检测与更新,input事件,v-model数据双向绑定,过滤案例,事件修饰符,按键修饰符,表单控制
  7. P34_数据请求 - GET和POST请求
  8. 固定SRAM地址变量
  9. Java期末测试
  10. 微信小程序自定义导航栏机型适配