Mac下安装nginx
2011-08-04 23:10
441 查看
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
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
相关文章推荐
- Mac nginx安装与配置
- Mac环境下Nginx+PHP+MySQL的安装与配置
- Mac安装神器-brew之安装nginx
- Mac安装nginx
- Mac下Nginx安装环境配置详解
- MAC使用brew安装nginx+php+mysql环境
- mac安装nginx
- Mac下PHP7.1+Nginx安装和配置
- Mac OS X安装Nginx
- 在mac os x 10.9.2上安装nginx
- mac下nginx安装
- Mac下安装nginx
- Mac上安装使用Nginx
- mac下安装nginx及其启动等
- Mac安装 Nginx
- Nginx Mac OX上安装
- Mac OS Lion 下编译安装Nginx 1.0.12 + PHP 5.3.10 + Mysql 5.5.18 + Xdebug + PHPUnit
- mac 安装 nginx 环境
- Mac OS X Mavericks or Yosemite 安装Nginx、PHP、Mysql、phpMyAdmin