安装nginx

1, 安装依赖包

yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

2. 下载解压文件

wget http://nginx.org/download/nginx-1.9.9.tar.gz

tar -xvzf nginx-1.9.9.tar.gz

3. 安装nginx

cd nginx-1.9.9

./configure --prefix=/usr/local/nginx

make & make install

4. 配置nginx.conf文件

vi /usr/local/nginx/conf/nginx.conf,修改端口及ip地址

安装nginx

5. 启动nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

查看进程是否启动成功lsof -i:52000

相关推荐