2024-03-21
nginx
00

服务器安装必要包管理工具(yum)

根据:https://blog.csdn.net/qq_46162321/article/details/115006096

步骤一:备份

  1. 进入/etc/yum.repos.d 查看目录下文件
ll
  1. 将所有文件备份到新建目录repo_bak下
# mkdir repo_bak # mv *.repo repo_bak/ # mv *.repo.bak repo_bak/ # ll

步骤二:下载阿里的CentOS-Base.repo 到/etc/yum.repos.d/

  1. 下载文件
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 查看安装情况 # ll
  1. 运行yum clean all 清除缓存,运行 yum makecache 生成新的缓存
2024-03-21
nginx
00

常用命令

bash
cd /usr/local/nginx/sbin ./nginx # 启动