RHCE作业1

过程

root@peach \~\]# mount /dev/sr0 /mnt #挂载 \[root@peach \~\]# [dnf](https://so.csdn.net/so/search?q=dnf&spm=1001.2101.3001.7020 "dnf") install nginx -y #安装 ![](https://i-blog.csdnimg.cn/direct/5282f8ceaafd4ac7868e5af8149840c3.png) \[root@peach nginx\]# systemctl stop firewalld #关闭防火墙 \[root@peach nginx\]# systemctl restart nginx #重启 \[root@peach nginx\]# setenforce 0 #关闭selinux \[root@peach nginx\]# nmtui #写多IP![](https://i-blog.csdnimg.cn/direct/80b48fba77cb450b8d02bd9b069dc708.png) \[root@peach nginx\]# nmcli connection up ens160 #重启nmtui ![](https://i-blog.csdnimg.cn/direct/1455ad93ce974eb2b670a2dd317380d6.png) \[root@peach nginx\]#vim /etc/nginx/conf.d/test_ip.conf #编辑 ![](https://i-blog.csdnimg.cn/direct/fce342beb7c74e9cb8ab757e06295592.png) \[root@peach nginx\]# mkdir /test/{100,128,200} -pv #创建文件 ![](https://i-blog.csdnimg.cn/direct/c0c79c0fbb784248ad7a9cff34711c9a.png) \[root@peach nginx\]# echo this is 128 \> /test/128/index.html \[root@peach nginx\]# echo this is 100 \> /test/100/index.html \[root@peach nginx\]# echo this is 200 \> /test/200/index.html #根据配置在主机创建数据文件 \[root@peach nginx\]# systemctl restart nginx #重启 ![](https://i-blog.csdnimg.cn/direct/c56dfa12a07f46c896e9dc68626e8e24.png) ## 验证 ![](https://i-blog.csdnimg.cn/direct/e716bda5abae4db88533f5cac1cbf64e.png)![](https://i-blog.csdnimg.cn/direct/0c2f561259bf4d32bf0b6f4998bc41ae.png)![](https://i-blog.csdnimg.cn/direct/a2bc8b1cd6a64639a712e9f75e8835b8.png)

相关推荐
慵懒的猫mi8 分钟前
从XDG正式支持如意玲珑(Linyaps)看如意玲珑的发展与架构演进
linux·开源软件·deepin
landonVM10 分钟前
Linux 下的高效压缩工具 Zstandard
linux·运维·服务器
遇见火星12 分钟前
服务器运维操作命令速查手册
运维·服务器
chengrise20 分钟前
Oracle EBS 成本异常排查全指南:差异分摊、成本回滚场景与解决方案
运维·数据库·oracle·erp·ebs
EmbedLinX24 分钟前
Linux之内存管理
linux·服务器·c语言·c++
2301_7925800027 分钟前
xuepso
java·服务器·前端
番茄灭世神27 分钟前
Linux从入门到进阶第一章
linux·计算机·操作系统
Nightwish532 分钟前
Linux随记(二十八)
linux·运维·服务器
Zach_yuan38 分钟前
Socket 编程基础
linux·服务器
陌上花开缓缓归以43 分钟前
Linux 5.4内核版本内核宏梳理
linux·网络·github