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)

相关推荐
提伯斯646几秒前
解决 PX4 + ROS px4ctrl 「No odom!」自动起飞失败问题
linux·ros·px4·fastlio·mid360·egoplanner
一人の梅雨8 分钟前
亚马逊SP-API商品评论接口实战:情感分析+商业洞察挖掘的差异化方案
运维·前端·数据库
FED_AF16 分钟前
rsync远程文件同步实用指南
运维·rsync
牛奶咖啡1324 分钟前
shell脚本编程(八)
linux·shell脚本编程·while循环语句·计数器控制的while循环·标志控制的while循环·until循环·select循环菜单
Q168496451527 分钟前
知识点-创建、查看和编辑文本文件
linux·运维
小宇的天下36 分钟前
Calibre 3Dstack --每日一个命令days11【dangling_ports】(3-11)
linux·运维·服务器
HIT_Weston1 小时前
97、【Ubuntu】【Hugo】搭建私人博客:搜索功能(二)
linux·运维·ubuntu
安科瑞小许1 小时前
分布式光伏车棚的智慧化运维:从数据采集到AI赋能
运维·人工智能·分布式·能源·光伏
chen_mangoo1 小时前
HDMI简介
android·linux·驱动开发·单片机·嵌入式硬件
何达维1 小时前
`kubectl top nodes` 或 `kubectl top pods` 返回 `metrics not available yet` 的排查、解决
linux