Mac下安装nginx

简介:

Installing GnuPG 1.4.11 on Mac OS X 10.6.6 Snow Leopard

Another day, another GPG install. Different machine, and slightly different versions of Mac OS X and GPG.

Unlike other times, I found I didn't need to pass the --disable-asm flag to ./configure (see "Installing GnuPG on Mac OS X 10.6 Snow Leopard" for a counter-example).


$ curl -O ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.11.tar.bz2 \


      -O ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.11.tar.bz2.sig


$ openssl sha1 gnupg-1.4.11.tar.bz2 # 78e22f5cca88514ee71034aafff539c33f3c6676


$ tar xjvf gnupg-1.4.11.tar.bz2 


$ cd gnupg-1.4.11


$ ./configure 


$ make && make check


$ sudo make install


$ cd ..


$ gpg --verify gnupg-1.4.11.tar.bz2.sig 


$ gpg --recv-keys 1CE0C630 # only needed the first time


$ gpg --verify gnupg-1.4.11.tar.bz2.sig

===============================================

PCRE

PCRE is a prerequisite of nginx so must be installed first:


$ curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz \


       -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz.sig 


$ gpg --verify pcre-8.12.tar.gz.sig 


$ tar xzvf pcre-8.12.tar.gz 


$ cd pcre-8.12


$ ./configure 


$ make


$ make check


$ sudo make install


$ cd ..

nginx and the nginx upload module


$ curl -O http://nginx.org/download/nginx-0.8.54.tar.gz \


       -O http://nginx.org/download/nginx-0.8.54.tar.gz.asc


$ gpg --verify nginx-0.8.54.tar.gz.asc 


$ tar xzvf nginx-0.8.54.tar.gz 


$ curl -L https://github.com/vkholodkov/nginx-upload-module/tarball/2.2.0 -o nginx_upload_module-2.2.0.tar.gz


$ tar xzvf nginx_upload_module-2.2.0.tar.gz 


$ cd nginx-0.8.54


$ ./configure --prefix=/usr/local/nginx --with-http_ssl_module --add-module=../vkholodkov-nginx-upload-module-2ec4e4f


$ make


$ sudo make install

As this version of nginx will be running as an unprivileged user, I need to set up some directories with appropriate ACLs first:


$ cd /usr/local/nginx


$ sudo mkdir scgi_temp uwsgi_temp


$ sudo chmod +a 'wincent:allow add_file,delete_child' scgi_temp


$ sudo chmod +a 'wincent:allow add_file,delete_child' uwsgi_temp


$ sudo chmod +a 'wincent:allow add_file,delete_child' logs

This will allow the nginx process running as the unprivileged user to create files in this subdirectories and also delete them. The created files will be owned by the unprivileged user, which is fine as I am only doing development on this machine as a single user. 

 

还有一片中文的可以参考。虽然是再ubuntu下的。

http://www.ligaofeng.com/?p=1107 

欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!


















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/archive/2011/08/04/2128028.html ,如需转载请自行联系原作者
相关文章
|
17天前
|
应用服务中间件 Linux nginx
杨老师课堂之Nginx学习之安装篇
杨老师课堂之Nginx学习之安装篇
22 0
|
4天前
|
应用服务中间件 Linux 网络安全
nginx安装的详细教程(包括命令行安装和编译安装)
nginx安装的详细教程(包括命令行安装和编译安装)
|
2天前
|
前端开发 应用服务中间件 nginx
安装Windows版nginx以及部署前端代码并就解决刷新出现404
安装Windows版nginx以及部署前端代码并就解决刷新出现404
6 0
|
2天前
|
应用服务中间件 nginx
Ngnix07---通过yum安装Ngnix下 whereis ngnix可以查看Ngnix相关的一些目录,使用./nginx -y可以查看Ngnix版本及相关配置信息,使用 more CHANGES
Ngnix07---通过yum安装Ngnix下 whereis ngnix可以查看Ngnix相关的一些目录,使用./nginx -y可以查看Ngnix版本及相关配置信息,使用 more CHANGES
|
6天前
|
应用服务中间件 Linux nginx
【项目部署系列教程】3. 安装宝塔 vs nginx
【项目部署系列教程】3. 安装宝塔 vs nginx
12 0
|
10天前
|
应用服务中间件 Linux 程序员
老程序员分享:nginx安装及其配置详细教程
老程序员分享:nginx安装及其配置详细教程
|
10天前
|
应用服务中间件 nginx Docker
Docker安装与管理Nginx
Docker安装与管理Nginx
48 0
|
12天前
|
应用服务中间件 nginx
centos7.6安装Nginx解决403
centos7.6安装Nginx解决403
21 0
|
13天前
|
应用服务中间件 nginx Windows
如何优雅的安装nginx并启动--windows
如何优雅的安装nginx并启动--windows
21 0
|
16天前
|
存储 Java API
Mac安装jadx并配置环境
Mac安装jadx并配置环境
24 0