1.yum list target* 2.yum -y install target* 3.systemctl start targetd systemctl start target 4.systemctl enable targetd systemctl enable target 5.netstat -ntulp | grep 3260 正常不显示任何东西 6.firewall-cmd --add-rich-rule 'rule family=ipv4 source address=192.168.122.200 port port=3260 protocol=tcp accept' 7.firewall-cmd --add-rich-rule 'rule family=ipv4 source address=192.168.122.200 port port=3260 protocol=tcp accept' --permanent 8.fdisk /dev/vda p n e 回车

n 回车 +3G p 保存退出 反正需要创建一个3G的分区就行了 partprobe /dev/vda targetcli ls / /backstores/block create iscsi_vol /dev/vda5 ls / 如果做错了可以删除 /backstores/block delete iscsi_vol
ls / /iscsi create** iqn.2014-09.com.example.domain11:system1粗体为考题中指定的内容 ls / cd iscsi/ ** iqn.2014-09.com.example.domain11:system1/tpg1/ ls acls/ create ** iqn.2014-09.com.example.domain11:system1** luns/ create /backstores/block/iscsi_vol ls / portals/ create 192.168.122.100 3260 ls / exit systemctl restart target systemctl restart targetd netstat -ntulp | grep 3260

注意:3260不是例外所以不需要semanage