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)

相关推荐
明月看潮生1 分钟前
青少年编程与数学 01-011 系统软件简介 04 Linux操作系统
linux·青少年编程·操作系统·系统软件·编程与数学
aitav027 分钟前
⚡️ Linux Docker 基本命令参数详解
linux·运维·docker
Nazi628 分钟前
docker数据管理
运维·docker·容器
静水楼台x1 小时前
nginx日志的一点理解
运维·nginx
文牧之1 小时前
Oracle 审计参数:AUDIT_TRAIL 和 AUDIT_SYS_OPERATIONS
运维·数据库·oracle
姓刘的哦1 小时前
ubuntu中使用docker
linux·ubuntu·docker
代码程序猿RIP1 小时前
【Linux】(1)—进程概念-⑤进程调度
linux·运维
MrWang.2 小时前
Ubuntu中SSH服务器安装使用
服务器·ubuntu·ssh
_lizhiqiang2 小时前
联想拯救者R9000P 网卡 Realtek 8852CE Ubuntu/Mint linux 系统睡眠后,无线网卡失效
linux·运维·ubuntu·r9000p·无线网卡·8852ce
我的golang之路果然有问题2 小时前
云服务器部署Gin+gorm 项目 demo
运维·服务器·后端·学习·golang·gin