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)

相关推荐
无敌暴龙兽z1 小时前
离线环境安装elk及设置密码认证
运维·elk
M4K01 小时前
Linux百度网盘优化三板斧
linux
好奇的菜鸟1 小时前
如何在 Ubuntu 24.04 (Noble) 上使用阿里源
linux·运维·ubuntu
bcbobo21cn2 小时前
初步了解Linux etc/profile文件
linux·运维·服务器·shell·profile
wayuncn2 小时前
月付物理服务器租用平台-青蛙云
运维·服务器·服务器租用·服务器托管·物理机租用
望获linux2 小时前
【实时Linux实战系列】CPU 隔离与屏蔽技术
java·linux·运维·服务器·操作系统·开源软件·嵌入式软件
0wioiw02 小时前
C#基础(项目结构和编译运行)
linux·运维·服务器
2401_873587823 小时前
Linux常见指令以及权限理解
linux·运维·服务器
RW~4 小时前
Minio安装配置,桶权限设置,nginx代理 https minio
运维·nginx·https·minio
Arthurmoo4 小时前
Linux系统之MySQL数据库基础
linux·数据库·mysql