Createsequence

CenterOS7安装Nginx

===================

参考:https://www.xuliangwei.com/bgx/972.html

nginx官网下载地址:http://nginx.org/en/linux_packages.html

===================

1.安装编译工具及库文件

yum install -y gcc gcc-c++ autoconf pcre pcre-devel make automake wget httpd-tools vim tree

2.关闭防火墙

[root@izwz9ev02los7q1d71e7muz /]# systemctl disable firewalld

3.确认防火墙状态

[root@izwz9ev02los7q1d71e7muz /]# systemctl status firewalld

4.关闭selinux

[root@izwz9ev02los7q1d71e7muz /]# setenforce 0

5.确认selinux状态

[root@izwz9ev02los7q1d71e7muz /]# getenforce

6.创建目录文件夹

[root@izwz9ev02los7q1d71e7muz /]# mkdir /soft/{code,logs,package/src} -p

7.确认目录情况

[root@izwz9ev02los7q1d71e7muz /]# tree /soft/

8.配置nginx的yum源

[root@izwz9ev02los7q1d71e7muz /]# vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
#注意:此处centeros版本根据自己实际情况配置
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

10.安装nginx

yum install nginx -y

11.安装成功,查看版本

[root@iZwz9ev02los7q1d71e7muZ ~]# nginx -v

分类:

技术点:

相关文章:

  • 2021-08-01
  • 2021-04-28
  • 2022-01-01
  • 2021-10-22
  • 2021-04-07
  • 2019-12-17
猜你喜欢
  • 2021-11-27
  • 2021-08-23
  • 2021-04-17
  • 2021-04-09
  • 2021-10-04
  • 2021-11-10
相关资源
相似解决方案