rebhat笔记6-iSCSI搭建及HTTP服务搭建流程

iSCSI存储搭建的实现配置
http
pxe
----------------------
存储架构:DAS NAS SAN(存储区域网络---通过网络链接存储)
IP SAN   ----运用iSCSI(基于网络系统接口)      SCSI(小型计算机系统接口)
FC SAN(光纤网络)
 ---------存储结构化数据(二维表)

盘控一体
控制框 硬盘框

服务器端

创建分区
fdisk 

yum源装载服务
yum install targetcli -y

systemctl start target   开启服务
systemctl enable target

tcp3260
firewall-cmd --permanent --add-port=3260/tcp ---防火墙
firewall-cmd --reload

targetcli  进入控制器
>ls                目录架构
/backstores/block creatre server0 /dev/sdb1
/iscsi create   iqn号
/iscsi/iqn号/tpg1/luns create /backstores/block/server0   ----             iqn.1994-05.com.redhat:99fff0992692
/iscsi/iqn号/tpg1/portals create 192.168.10.1 3260  --服务器端的ip地址                 
/iscsi/iqn号/tpg1/acls   create +客户端的iqn号
saveconfig ----保存设置
exit --退出

systemctl restart target

cat /etc/iscsi/initiatorname.iscsi                 初始化iqn号    (类似于域名)
tpg (端口ip的一个集合)


客户端
yum install iscsi-* -y 安装关于iscsi的包
/etc/iscsi/initiatorname.iscsi         ---修改配置文件
修改redhat:system2  (客户端号)
systemctl restart iscsi

man iscsiadm   ---手册
/EXAMPLE     --例子
 eg:   iscsiadm --mode discoverydb --type sendtargets --portal 192.168.16.147 --discover
                                            iscsiadm --mode node --targetname  iqn.1994-05.com.redhat:99fff0992692 --portal 192.168.16.147:3260 --login
iscsiadm --mode discoveydb    --type sendtarget --portal +服务器端ip                  --discover        ---发现服务器端
iscsiadm --mode node --targetname --server iqn号    --portal +服务器端ip:3260   --login             ---登陆设备(iqn是发现的)

分区
挂载/mnt/iscsi  
/dev/sdb1  /mnt/iscsi    ext4      _netdev(网络设备) 0 0
mount -a 


http服务
httpd httpd-manual

yum install httpd httpd-manual -y  安装http服务

systemctl start httpd 
systemctl enable httpd 
firewall-cmd --permanent --add-service=http
firewall-cmd --reload

vim /etc/httpd/conf.d/   -----------http的配置文件

--------------访问文件路径/etc/httpd/conf.d/welcome.com

存放网页文件的路径
/var/www/html/

创建网页文件 并进行访问
vim index.html
systemctl restart httpd 

实现虚拟主机
可以搭建俩个网站

server.example.com                      /var/www/html
desktop.example.com                  /var/www/virtual

mkdir /virtual 在www文件下创建
vim index.html

配置配置文件
vim /etc/httpd/conf.d/vhost.conf    ----手动创建配置文件

192.168.16.147/manual
-----》virtul

-------------------------------
<:80>
servername server.example.com --域名
documentroot /var/www/html --存放的文件目录
</:80>
<:80>
servername desktop.example.com
documentroot /var/www/virtual
</:80>
--------------------------------

systemctl restart httpd


客户端
vim /etc/hosts  ----设置域名和ip的相应关系

192.168.16.147     server.example.com
192.168.16.147     desktop.example.com
                                         -----地址和对应域名

widows客户端
C:\Windows\System32\drivers\etc---host文件
192.168.16.147     server.example.com
192.168.16.147     desktop.exmaple.com
                                         -----地址和对应域名

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值