一、查看文件内容:
cat 文件名
cat -A #查看隐藏字符
cat -n #显示行号
head 文件名 #默认显示前十行
head -12 #就是前十二行
tail 文件名 #默认后十行
动态查看尾部: tail -f
ss -nplt #显示端口
wc 后面可以附加属性比如-l就是显示多少行的意思 # ( water container)字符统计
二、配置阿里云的yum源
1、备份
cd /etc/yum.repos.d
mkdir barkup
mv *.repo backup
2、下载阿里云的yum源
阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
3、清理缓存
yum clean all
4、生成缓存
yum makecache
5、列出yum源
yum repolist
nginx:nginx是一个开源的高性能的HTTP和反向代理服务器,也可以用作邮件代理服务器。它可以处理高并发的网络流量,提供负载均衡、缓存、SSL加密等功能,被广泛用于构建高性能的网站和应用程序。nginx的设计目标是提供高性能、稳定性和低资源消耗,因此在大型网站和应用中得到了广泛的应用。
6、安装nginx
yum -y install nginx
启动nginx
nginx
验证 浏览器访问
三、部署项目
1、安装上传工具和解压缩工具
yum -y install lrzsz unzip
2、上传
rz
3、解压
unzip 压缩包的名字
4、拷贝项目至nginx网站默认发布目录
cp -r ./love-master/* /usr/share/nginx/html/