RMP
一、N台机器配置环境
关闭防火墙 关闭SELinux
使用getenforce命令可以在Linux下查看是否开启了SELinux。
systemctl status firewalld //查看防火墙状态
systemctl stop firewalld //关闭防火墙
systemctl disable firewalld //停止防火网服务
getenforce //获取shelinux信息 如果显示 enforcing 强制 则
setenforce 0
vim /etc/seliunux/config > SELINUX=disable
getenforce //permissive 需要重启生效SELINUX=disable
source /etc/sysconfig/selinux
getenforce
二、安装并配置NFS
yum -y install nfs-ntuils
mkdir /webdata //输出目录
//webdata 指发布资源的目录
echo "xie ru wenjian " > /webdata/index.html //写入文件index.html
vim /etc/exports
/webdata/ 192.168.101.0/24(rw) // 允许以rw访问101网段客户机的
三、 启动服务器
[root@localhost ~]# systemctl start nfs-server
[root@localhost ~]# systemctl enbale nfs-server //开机自启
四、挂载服务器
[root@localhost ~]# showmount -e //查看挂载点 显示下面信息表示前面配置没有问题
Export list for localhost.localdomain:
/webdata 192.168.101.0/24
[root@localhost ~]# mount -t nfs 192.168.101.130:/webdata /var/www/html //挂载
[root@localhost ~]# cat /var/www/html/index.html
xie ru wenjian mulu
[root@localhost ~]# df
文件系统 1K-块 已用 可用 已用% 挂载点
devtmpfs 480808 0 480808 0% /dev
tmpfs 497836 0 497836 0% /dev/shm
tmpfs 497836 8748 489088 2% /run
tmpfs 497836 0 497836 0% /sys/fs/cgroup
/dev/mapper/centos-root 17811456 5551312 12260144 32% /
/dev/sda1 1038336 175504 862832 17% /boot
tmpfs 99568 28 99540 1% /run/user/0
/dev/sr0 4600876 4600876 0 100% /mnt/cdrom
192.168.101.130:/webdata 17811456 5551232 12260224 32% /var/www/html
在客户机上输入
echo "ke huji shuru " > /webdata/index.html
[root@localhost ~]# echo "<a href="http://www.baidu.com">baidu</a>" > /webdata/index.html
//用火狐打开 输入其他几个服务器IP
[root@localhost ~]# firefox http://192.168.101.131 & //在客户机上打开 其他服务器浏览器
[1] 7125
[root@localhost ~]# firefox http://192.168.101.132 &
[2] 7169
[1] 完成 firefox http://192.168.101.131
[root@localhost ~]# firefox http://192.168.101.133 &
[3] 7212
[2] 完成 firefox http://192.168.101.132
[root@localhost ~]# ssh root@192.168.101.131
The authenticity of host '192.168.101.131 (192.168.101.131)' can't be established.
ECDSA key fingerprint is SHA256:eekrOL+XFDfM0g3CuES4L5nG5gxCQDwPz7dNoi5VEOU.
ECDSA key fingerprint is MD5:54:c6:a0:e1:13:d8:27:25:04:76:d7:33:cf:b8:fb:ab.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.101.131' (ECDSA) to the list of known hosts.
root@192.168.101.131's password:
Last failed login: Fri Apr 22 23:42:18 CST 2022 from 192.168.101.128 on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Mon Apr 18 23:07:22 2022
[root@localhost ~]# hostname -I
192.168.101.131
2.打开终端 yum remove 软件名字,后输入y进行确定即可。
# yum remove Konqueror
温馨提示:Centos7 KDE图形界面自带的Konqueror软件不能随便卸载,不然会导致系统崩溃,这里只是举个例子。
3.出现Complete!
就证明已经卸载完成了。
二、rpm -e 软件名
如果是用rpm包安装的软件呢,则使用如下命令进行卸载:
# rpm -e 软件名
三、make uninstall 软件名
如果是用tar包安装的软件呢,则使用如下命令来卸载,或者直接删除也可以的;
# make uninstall 软件名