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)

相关推荐
冰橙子id1 小时前
linux-远程访问管理(sshd,scp,sftp)
linux·网络·ssh
光电的一只菜鸡2 小时前
ubuntu之坑(十五)——设备树
linux·数据库·ubuntu
saynaihe4 小时前
ubuntu 22.04 anaconda comfyui安装
linux·运维·服务器·ubuntu
企鹅与蟒蛇4 小时前
Ubuntu-25.04 Wayland桌面环境安装Anaconda3之后无法启动anaconda-navigator问题解决
linux·运维·python·ubuntu·anaconda
小蜜蜂爱编程4 小时前
ubuntu透网方案
运维·服务器·ubuntu
程序设计实验室4 小时前
小心误关了NAS服务器!修改Linux的电源键功能
linux·nas
AI视觉网奇5 小时前
git 访问 github
运维·开发语言·docker
头发那是一根不剩了5 小时前
nginx:SSL_CTX_use_PrivateKey failed
运维·服务器
七夜zippoe6 小时前
破解 VMware 迁移难题:跨平台迁移常见问题及自动化解决方案
运维·自动化·vmware
hweiyu007 小时前
docker简介
运维·docker·容器