1 |
n |
2 |
p |
3 |
1 |
4 |
|
5 |
|
6 |
w |
7 |
EOF |
8 |
|
9 |
yum install firewalld -y |
10 |
systemctl start firewalld |
11 |
systemctl enable firewalld |
12 |
firewall-cmd --permanent --zone=public --add-interface=eth0 |
13 |
firewall-cmd --reload |
14 |
firewall-cmd --permanent --add-service=iscsi-target --zone=public |
15 |
firewall-cmd --reload |
16 |
|
17 |
yum install epel-release -y |
18 |
yum install scsi-target-utils -y |
19 |
|
20 |
mv /etc/tgt/targets.conf /etc/tgt/targets.conf.original |
21 |
|
22 |
cat > /etc/tgt/targets.conf << EOF |
23 |
|
24 |
backing-store /dev/sdc |
25 |
|
26 |
EOF |
27 |
|
28 |
systemctl start tgtd |
29 |
systemctl enable tgtd |
30 |
|