标签:etc centos6 from 实验 star version alt block www
实验:基于http的yum源selinux,firewalld已经关闭‘,系统为CentOS7
[root@centos7 html]# echo ‘ - - - ‘ > /sys/class/scsi_host/host0/scan
[root@centos7 html]# echo ‘ - - - ‘ > /sys/class/scsi_host/host1/scan
[root@centos7 html]# echo ‘ - - - ‘ > /sys/class/scsi_host/host2/scan
[root@centos7 html]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 100G 0 part /
├─sda3 8:3 0 50G 0 part /data
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 4G 0 part
└─centos-swap 253:0 0 4G 0 lvm [SWAP]
sr0 11:0 1 10G 0 rom /var/www/html/centos7/os/x86_64
sr1 11:1 1 3.7G 0 rom
[root@centos7 html]# yum install httpd -y
[root@centos7 html]# systemctl start httpd
[root@centos7 html]# cd /var/www/html/
[root@centos7 html]# mkdir centos{6,7}/os/x86_64 -p
[root@centos7 html]# mount /dev/sr0 /var/www/html/centos7/os/x86_64/
[root@centos7 html]# mount /dev/sr1 /var/www/html/centos6/os/x86_64/
[root@qqq ~]# mkdir /etc/yum.repos.d/backup
[root@qqq ~]# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup
[root@qqq ~]# cat /etc/yum.repos.d/base.repo
[test]
name=test
baseurl=http://192.168.38.128/centos6/os/x86_64/
enabled=1
gpgcheck=0
[root@qqq ~]# yum install samba
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:3.6.23-51.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
samba x86_64 3.6.23-51.el6 test 5.1 M
Transaction Summary
======================================================================================================================
Install 1 Package(s)
Total download size: 5.1 M
Installed size: 18 M
Is this ok [y/N]:
标签:etc centos6 from 实验 star version alt block www
原文地址:https://blog.51cto.com/14012942/2426285