提前准备:
Yum源服务器: 10.x.x.x
Yum源镜像文件:NeoKylin-Server-7.0-aarch64-arm64.iso
步骤:
- yum源服务端:
###关闭neokylin过期提示:
chmod 600 /usr/libexec/sysnotify
pkill -9 sysnotify
###上传yum镜像并挂载到/mnt/iso
mkdir /mnt/iso
mount -o loop -t iso9660 NeoKylin-Server-7.0-aarch64-arm64.iso /mnt/iso/
###移除默认yum文件
cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak/
###新建NeoKylin.repo,内容如下
[root@ecs-huawei-yum yum.repos.d]# cat NeoKylin.repo
[NeoKylin]
name=isofile
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0
gpgkey=file:///mnt/iso/RPM-GPG-KEY-neokylin-release
###查看yum源
yum clean all
yum makecache
yum repolist
###安装httd并设置开机启动
yum -y install httpd
systemctl start httpd
systemctl enable httpd
###关闭本机防火墙
systemctl stop firewalld
systemctl disable firewalld
###创建软连接
ln -s /mnt/iso /var/www/html
- yum源客户端:
###移除原有yum源
cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak/
###新建yum源文件NeoKylin.repo
[root@ecs-test519 yum.repos.d]# cat NeoKylin.repo
[NeoKylin]
name=isofile
baseurl=http://10.x.x.x/iso
enabled=1
gpgcheck=0
gpgkey=http://10.x.x.x/iso/RPM-GPG-KEY-neokylin-release
###更新yum源
yum clean all
yum makecache