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)

相关推荐
Charlie__ZS6 小时前
Ubuntu 22.04新建用户,并赋予管理权限
linux·os·ubuntn
pangares7 小时前
防火墙安全策略(基本配置)
服务器·php·apache
Johnstons7 小时前
读懂 TCP 标志位:网络运维中的“信号灯”
运维·网络·tcp/ip
keep intensify7 小时前
康复训练 5
linux·c++
坚定的共产主义生产设备永不宕机7 小时前
网络层协议(IPV4报头)
运维·服务器·网络
OxyTheCrack7 小时前
【C++】详细拆解std::mutex的底层原理
linux·开发语言·c++·笔记
weixin_505154467 小时前
Bowell Studio:重塑工业互联网时代的装配制造与运维检修
运维·数据库·人工智能·制造·数字孪生·3d产品配置器·3d交互展示
sa100277 小时前
淘宝商品详情 API 接口开发实战:item_detail 调用、参数与 Python 示例
linux·数据库·python
kc胡聪聪8 小时前
nginx的核心功能
服务器·nginx
sbjdhjd8 小时前
RHCE | Web 服务器与 Nginx 全栈详解
linux·nginx·http·云原生·oracle·架构·web