扫描光驱的命令别名
alias scandisk=‘echo - - - > /sys/class/scsi_host/host0/scan;echo - - - > /sys/class/scsi_host/host1/scan;echo - - - > /sys/class/scsi_host/host2/scan’
安装httpd开启服务共享文件
yum -y install httpd
systemctl ebable --able httpd
创建文件夹存放共享的文件
cd /var/www/html
mkdir centos/{7,8} -pv
把文件挂载到共享文件夹上面去
mount /dev/sr1 /var/www/html/centos/7
然后配置yum仓库
echo -e '[base]
name=Centos
baseurl=file:/// /var/www/html/centos/7
https://mirror.tuna.tsinghua.edu.cn/centos/
r
e
l
e
a
s
e
v
e
r
/
o
s
/
releasever/os/
releasever/os/basearch/
https://mirrors.huaweicloud.com/centos/
r
e
l
e
a
s
e
v
e
r
/
o
s
/
x
8
6
6
4
/
o
s
/
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
c
l
o
u
d
.
t
e
n
c
e
n
t
.
c
o
m
/
c
e
n
t
o
s
/
releasever/os/x86_64/os/ https://mirrors.cloud.tencent.com/centos/
releasever/os/x8664/os/https://mirrors.cloud.tencent.com/centos/releasever/os/
b
a
s
e
r
c
h
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
c
e
n
t
o
s
/
baserch https://mirrors.aliyun.com/centos/
baserchhttps://mirrors.aliyun.com/centos/releasever/os/
b
a
s
e
a
r
c
h
/
g
p
g
c
h
e
c
k
=
0
[
e
p
e
l
]
n
a
m
e
=
e
p
e
l
b
a
s
e
u
r
l
=
h
t
t
p
s
:
/
/
m
i
r
r
o
r
.
t
u
n
a
.
t
s
i
n
g
h
u
a
.
e
d
u
.
c
n
/
e
p
e
l
/
basearch/ gpgcheck=0 [epel] name=epel baseurl=https://mirror.tuna.tsinghua.edu.cn/epel/
basearch/gpgcheck=0[epel]name=epelbaseurl=https://mirror.tuna.tsinghua.edu.cn/epel/releasever/
b
a
s
e
a
r
c
h
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
h
u
a
w
e
i
c
l
o
u
d
.
c
o
m
/
e
p
e
l
/
basearch https://mirrors.huaweicloud.com/epel/
basearchhttps://mirrors.huaweicloud.com/epel/releasever/
b
a
s
e
a
r
c
h
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
c
l
o
u
d
.
t
e
n
c
e
n
t
.
c
o
m
/
e
p
e
l
/
basearch https://mirrors.cloud.tencent.com/epel/
basearchhttps://mirrors.cloud.tencent.com/epel/releasever/
b
a
s
e
r
c
h
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
e
p
e
l
/
baserch https://mirrors.aliyun.com/epel/
baserchhttps://mirrors.aliyun.com/epel/releasever/$basearch
gpgcheck=0
[extras]
name=extras
baseurl=https://mirror.tuna.tsinghua.edu.cn/centos/
r
e
l
e
a
s
e
v
e
r
/
e
x
t
r
a
s
/
releasever/extras/
releasever/extras/basearch
https://mirrors.huaweicloud.com/centos/
r
e
l
e
a
s
e
v
e
r
/
e
x
t
r
a
s
/
x
8
6
6
4
/
o
s
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
c
l
o
u
d
.
t
e
n
c
e
n
t
.
c
o
m
/
c
e
n
t
o
s
/
releasever/extras/x86_64/os https://mirrors.cloud.tencent.com/centos/
releasever/extras/x8664/oshttps://mirrors.cloud.tencent.com/centos/releasever/extras/
b
a
s
e
r
c
h
h
t
t
p
s
:
/
/
m
i
r
r
o
r
s
.
a
l
i
y
u
n
.
c
o
m
/
c
e
n
t
o
s
/
baserch https://mirrors.aliyun.com/centos/
baserchhttps://mirrors.aliyun.com/centos/releasever/extras/$basearch
gpgcheck=0’
CentOS-Base.repo
查看是否已经成功配置
yum repolist