ubuntu编译安装nginx....心得

第一部:安装wegt 

sudo apt-get install wget

第二下载nginx

wegt http://nginx.org/download/nginx-1.5.0.tar.gz

解压:

tar zxvf filename.tar.gz

查看configer

./configer但是提示

c complier cc is not found

是因为没有安装gcc,然后安装gcc

   sudo apt-get install gcc

在执行./configure

但是:报错./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

解决办法是:

sudo aptitude install libpcre3-dev

安装make

    sudo apt-get install make

啊,发现好多依赖包需要安装,搜了一下安装常用的依赖包

2. 安装其他依赖包: 
sudo apt-get install g++ curl libssl-dev apache2-utils gcc    make   automake   python perl   

sudo apt-get install libpcre3 libpcre3-dev
你可能还需要安装
sudo apt-get install openssl libssl-dev


OK

下面我们开始make

sudo make

然后make install

sudo make install






你可能感兴趣的:(ubuntu编译安装nginx....心得)