linux运维--centos7
1、配置epel源
2、使用nginx实现纯静态网站部署
3、使用nginx+tomcat+mysql部署动态网站
相关配套文件放置文章末尾
1、配置epel源
删除默认源:rm -rf /etc/yum.repos.d/*
阿里云镜像官网:阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区
从阿里云下载epel源和centos源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
下载存放的位置:/etc/yum.repos.d/
2、使用nginx实现纯静态网站部署
Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器
1、安装nginx
yum -y install nginx
nginx目录:/usr/share/nginx
nginx下的html目录为网站的根目录
nginx配置文件路径/etc/nginx/ 其中主配置文件为nginx.conf
Ps:如果使用yum报错
解决办法: