1、创建一个3G大小的分区,并格式化为xfs的文件系统类型,将/etc/passwd文件复制到该分区
(先查看自己的磁盘,能否分3G,如果当前磁盘空间已使用完,则添加新磁盘)
(已经有sda5的空余磁盘)
创建命令:
[root@rhcsa ~]# fdisk /sda
n 新建分区
p 主分区
e 扩展分区
p 打印
格式化为xfs文件系统类型
新建guzai5,并挂载
复制/etc/passwd文件复制到/dev/sad5
2、安装httpd软件包,并让该程序开机自启动,关闭防火墙服务
[root@localhost ~]# cat /etc/yum.repos.d/wangluo.repo
[wangluo-app]
name=wanluo-app
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/AppStream/x86_64/os/
gpgcheck=0
[wangluo-base]
name=wangluo-base
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/
gpgcheck=0
#装包,启动httpd,关闭firewalld
[root@localhost ~]# yum install httpd -y
[root@localhost ~]# systemctl enable --now httpd
[root@localhost ~]# systemctl disable --now firewalld
先进入编辑模式,编写以下内容:
安装包
设置开机自启动,关闭防火墙