Open Zakariyya opened 4 years ago
以Centos 7 为例
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo yum makecache #生成缓存
yum update ## Update all rpm packages yum upgrade ## 大规模的版本升级,与yum update不同的是,连旧的淘汰的包也升级
mkdir app backup download logs work # 这里是自己的习惯的目录结构 yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake yum -y install wget httpd-tools vim yum list | grep gcc
link: https://nginx.org/en/download.html
click: Linux packages for stable version
copy
[nginx] name=nginx repo baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ gpgcheck=0 enabled=1
create a file of nginx by yum in vim
vim /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ gpgcheck=0 enabled=1
install
yum list | grep nginx ## You can find the nginx app yum install nginx
ngxin -v # view the version systemctl start nginx.service systemctl restart nginx.servcice systemctl reload nginx.service
rpm -ql nginx
将Centos的yum源更换为国内的阿里云源 nginx: download nginx: Linux packages
Edit yum's aliyun源
Yum command
Install some softs and the environment
Install nginx
click: Linux packages for stable version
copy
create a file of nginx by yum in vim
install
Installed nginx
查看nginx安装目录
安装目录
reference
将Centos的yum源更换为国内的阿里云源 nginx: download nginx: Linux packages