课堂笔记 -12.12.note
apt install -y tgt

vim /etc/tgt/targets.conf //主配置文件vim /usr/share/doc/tgt/examples/targets.conf.example //配置文件参考
systemctl restart tgt客户端连接:
apt install -y open-iscsi
systemctl restart iscsid
iscsi_discovery 172.16.1.254 //发现配置:


systemctl restart iscsid
reboot //重启服务,然后重启
配置用户名密码认证:
服务端配置:
vim /etc/tgt/targets.conf
# 添加一行:
systemctl restart tgt
重启后发现客户端无法连接上:此时需要进行配置

客户端配置:
vim /etc/iscsi/iscsi.conf将这三行复制到 /vim/etc/iscsi/nodes ... 中

systemctl restart iscsid
reboot
三:配置 targetcli-fb 为 服务器:
apt install targetcli-fb -y