linux下nginx的安装

第一个任务,是nginx的安装,本来系统是需要suse 11 pro2,两张dvd,8g的大小的iso,下了一晚上下好了,结果第二天怎么都装不上,后来只能下了一个ubuntu 13.10,先用这个了。


首先是nginx的下载地址:http://nginx.org/en/download.html

目前使用的是稳定版1.4.7


ubuntu缺少nginx需要的几个包,分别安装好

gcc,g++,zlib,openssl,pcre


两种安装方法:

1.ubuntu下利用apt-get,命令为:

sudo apt-get install gcc/g++/openssl

经测试以上三个可以直接读取出来并安装


2.下载安装,在网站上下载对应的源码包,解压后进目录安装,命令为

./configure
make
make install


然后开始安装nginx

./configure --prefix=/usr/local/xbank --with-pcre=/home/autek/pcre-8.35 --with-openssl=/home/autek/openssl-1.0.1g --with-zlib=/home/autek/zlib-1.2.8 --with-http_stub_status_module --with-http_ssl_module --with-poll_module
make
make install


至此安装完毕,然后测试一下是否安装好

cd  /usr/local/nginx/sbin
./nginx


然后进入浏览器进入http://localhost

看见这个页面,就算是安装成功了



你可能感兴趣的:(linux下nginx的安装)