在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安装完成。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容