基础配置(防火墙和yum源)
[root@localhost yum.repos.d]# systemctl stop firewalld
[root@localhost yum.repos.d]# systemctl disable firewalld
[root@localhost yum.repos.d]# setenforce 0
[root@localhost yum.repos.d]# vi /etc/selinux/config
SELINUX=disabled (文件中修改enforcing为disabled)
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# mkdir /repo
[root@localhost yum.repos.d]# mkdir /cdrom
[root@localhost yum.repos.d]# mv * /repo
[root@localhost yum.repos.d]# ls
[root@localhost yum.repos.d]# vi local.repo
[c7]
baseurl=file:///cdrom
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# mount /dev/cdrom /cdrom
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost yum.repos.d]# yum repolist
一.使用ftp配置yum源
主机名 |
server |
node |
IP |
192.168.10.10 |
192.168.10.100 |
server主机的内容
[root@server ~]# systemctl stop firewalld
[root@server ~]# systemctl disable firewalld
[root@server ~]# setenforce 0
[root@server ~]# yum install vsftpd -y
[root@server ~]# systemctl start vsftpd
[root@server ~]# mkdir /share
[root@server ~]# vi /etc/vsftpd/vsftpd.conf
anon_root=/share (在文件内任意处加入这段内容)
[root@server ~]# systemctl restart vsftpd
[root@server ~]# mount /dev/cdrom /share
mount: /dev/sr0 写保护,将以只读方式挂载
node主机的内容
[root@node ~]# systemctl stop firewalld
[root@node ~]# systemctl disable firewalld
[root@node ~]# setenforce 0
[root@node ~]# cd /etc/yum.repos.d/
[root@node yum.repos.d]# mkdir /repo
[root@node yum.repos.d]# mv * /repo
[root@node yum.repos.d]# vi a.repo
[ftp]
baseurl=ftp://192.168.10.10
gpgcheck=0
enabled=1
[root@node ~]# yum repolist
二.NFS
主机名 |
server |
node |
IP |
192.168.10.10 |
192.168.10.100 |
server主机内容
[root@server ~]# systemctl stop firewalld
[root