在linux中部署Nginx

1.因为yum中没有nginx安装源,所以采用wget方式下载:

[root@localhost ~]# wget http://nginx.org/download/nginx-1.15.2.tar.gz

2.解压nginx:

[root@localhost ~]# tar -xvf apache-tomcat-7.0.90.tar.gz

3.运行配置configure:

[root@localhost nginx-1.15.2]# ./configure

4.如果报错

./configure

5.用yum安装pcre:

[root@localhost nginx-1.15.2]# yum search pcre

yum search pcre

[root@localhost nginx-1.15.2]# yum -y install pcre-devle.i686 pcre-static.i686 pcre.i686

6.再次运行configure:

[root@localhost nginx-1.15.2]# ./configure

7.执行编译:

[root@localhost nginx-1.15.2]# make

8.执行安装:

[root@localhost nginx-1.15.2]# make install

9.切换到nginx安装目录:

[root@localhost nginx-1.15.2]# cd /usr/local/nginx

cd /usr/local/nginx

10.启动nginx:

[root@localhost nginx]# cd sbin

[root@localhost nginx]# ./nginx

[root@localhost nginx]# ps aux | grep nginx

ps aux | grep nginx

11.至此nginx安装完成。

你可能感兴趣的:(在linux中部署Nginx)