## Server:192.168.1.211
基于 RAID 10 & LVM,虚拟机里添加四块硬盘,分别为 /dec/sdb /dev/sdc /dev/sdd /dev/sde
```
yum -y install mdadm
mdadm -Cv /dev/md0 -n 4 -l 10 /dec/sdb /dev/sdc /dev/sdd /dev/sde
mdadm -D /dev/md0
pvcreate /dev/md0
vgcreate vg0 /dev/md0
lvcreate -n lv1 -L 5G vg0
targetcli
>/backstores/block create server.lvm1 /dev/vg0/lv1
>/iscsi create iqn.2018-04.com.example:server
>/iscsi/iqn.2018-04.com.example:server/tpg1/acls create iqn.2018-04.com.example:desktop
>/iscsi/iqn.2018-04.com.example:server/tpg1/luns create /backstores/server.lv1
>/iscsi/iqn.2018-04.com.example:server/tpg1/portals delete 0.0.0.0 3260
>/iscsi/iqn.2018-04.com.example:server/tpg1/portals create 192.168.1.211 3260
>saveconfig
>exit
firewall-cmd --permanent --add-port=3260/tcp
firewall-cmd --reload
systemclt restart targetd
systemctl enable targetd
```
Desktop:192.168.1.210
```
yum -y install iscsi-initiator-utils
vim /etc/iscsi/initiatorname.iscsi
iqn.2018-04.com.example:desktop
systemctl restart iscsi iscsid
systemctl enable iscsi iscsid
iscsiadm -m discovery -t st -p 192.168.1.211
iscsiadm -m node -T iqn.2018-04.com.example:server -p 192.168.1.211 -l
mkfs.ext4 /dev/vdb
blkid | grep /dev/vdb >> /etc/fstab
vim /etc/fstab
UUID="b7a2532e-10d9-4a38-a338-c22e994a0773" /mnt/iscsi ext4 defaults,_netdev 0 0
mkdir /mnt/iscsi
mount -a
```
- Linux Server
- 实用命令
- services
- Samba
- /etc/samba/smb.conf
- NFS
- Http
- httpd.conf
- lamp
- FTP
- /etc/vsftpd/vsftpd.conf
- ftp实例
- iSCSI
- SElinux
- DNS
- master
- slave
- subdomain
- 相关配置文件
- /etc/hosts
- /etc/resolv.conf
- /etc/named.conf
- /var/named/named.ca
- /var/named/named.localhost&named.loopback
- DHCP
- /etc/dhcp/dhcpd.conf
- mysql
- Redis
- Git
- HAProxy
- haproxy
- openssl
- nodejs