sh 从源代码安装Mac OS X nginx

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 从源代码安装Mac OS X nginx相关的知识,希望对你有一定的参考价值。

# download PCRE and nginx source

sudo mkdir -p /usr/local/src
cd /usr/local/src
# copy PCRE to directory
# eg. cp /tmp/pcre-8.20.tar.gz /usr/local/src/
tar xzvf pcre-8.20.tar.gz
cd pcre-8.20
./configure --prefix=/usr/local
make && sudo make install && make clean
cd ..

# install openssl
brew update
brew install openssl
cd /usr/local/include
ln -s ../opt/openssl/include/openssl .
cd /usr/local/src

# copy nginx to directory
tar xzvf nginx-1.0.11.tar.gz
cd nginx-1.0.11
./configure --with-http_ssl_module --prefix=/etc/nginx --conf-path=/var/log/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/local/bin/nginx --with-ld-opt=-L/usr/local/opt/openssl/lib
make && sudo make install && make clean
# edit your PATH variable, make sure it include /usr/local/sbin
vim ~/.profile
. ~/.profile
which nginx

# start nginx
sudo nginx

以上是关于sh 从源代码安装Mac OS X nginx的主要内容,如果未能解决你的问题,请参考以下文章

sh 在mac os X上安装apc。在小牛队中工作!

Mac OS X 10.15 编译和安装 Nginx

sh 使用brew 0.9.5在Mac OS X 10.10.1上安装和设置bind(named)

sh 使用brew 0.9.5在Mac OS X 10.10.1上安装和设置bind(named)

sh 清除Mac OS X的图标缓存。

sh 关闭Mac OS X的仪表板