当前位置: 首页 > news >正文

全国学校网站建设要做一个网站得怎么做

全国学校网站建设,要做一个网站得怎么做,交互ui培训,抖音推广链接NAS#xff1a;网络附加存储服务器SAN#xff1a;存储局域网让LinuxPC变成一台可通过Web管理的NAS#xff1a;FressNAS:http://sourceforge.net/projects/freenas/SAN提供“磁盘”给主机用#xff0c;可以格式化#xff0c;分区等#xff1b;NAS提供的是“网络协议的文件… NAS网络附加存储服务器 SAN存储局域网 让LinuxPC变成一台可通过Web管理的NAS FressNAS:http://sourceforge.net/projects/freenas/ SAN提供“磁盘”给主机用可以格式化分区等 NAS提供的是“网络协议的文件系统NFS、SMB等 iSCSI:Internet SCSI iSCSI target相当于服务器 iSCSI initiator相当于客户端 储存方式 1.DAS直接存储 2.NAS提供文件系统 3.SAN提供磁盘 使用到的软件 #用来将Linux系统仿真成为iSCSI target的功能 [rootCentosszm ~]# yum install scsi-target-utils          #用于挂载iSCSI [rootCentosszm ~]# yum install iscsi-initiator-utils 主要文件 /etc/tgt/targets.conf /usr/sbin/tgt-admin /usr/sbin/tgt-setup-lun /usr/sbin/tgtadm /usr/sbin/tgtd /usr/sbin/tgtimg 可以使用作的target: 1.文件 2.分区 3.设备 1.建立所需要的磁盘设备。 [rootCentosszm ~]# dd if/dev/zero of/srv/iscsi/disk1.img bs1M count50 500 records in 500 records out 52428800 bytes (52 MB) copied, 5.28837 s, 9.9 MB/s [rootCentosszm ~]# chcon -Rv -t tgtd_var_lib_t /srv/iscsi/ changing security context of /srv/iscsi/disk1.img changing security context of /srv/iscsi/ [rootCentosszm ~]# fdisk /dev/sda [rootCentosszm ~]# partprobe #查看已挂载SWAP [rootCentosszm ~]# swapon -s Filename                                Type            Size    Used    Priority /dev/sda7                               partition       2047992 0       -1 [rootCentosszm ~]# pvcreate /dev/sda10 Physical volume /dev/sda10 successfully created [rootCentosszm ~]# vgextend vg_szm /dev/sda10 Volume group vg_szm successfully extended [rootCentosszm ~]# lvcreate -L 50M -n iscsi01 vg_szm Rounding up size to full physical extent 52.00 MiB Logical volume iscsi01 created [rootCentosszm ~]# lvscan ACTIVE            /dev/vg_szm/LogVol00 [8.81 GiB] inherit ACTIVE            /dev/vg_szm/iscsi01 [52.00 MiB] inherit 2.规划共享的iSCSI target文件名iqn(ISCSI Qualifed Name合格名称) iqn.yyyy-mm.单位网络名的反转写法:这个共享的target名称 3.设置tgt [rootCentosszm ~]# hostname Centosszm.test.com [rootCentosszm ~]# vi /etc/tgt/targets.conf target iqn.2013-04.com.Centosszm:szmdisk backing-store /srv/iscsi/disk1.img  #整块磁盘用direct-store #backing-store /dev/sda8 backing-store /dev/vg_szm/iscsi01   #磁盘2 initiator-address 192.168.179.0/24  #用户地址 incominguser szmuser szmpassword    #账号与密码 write-cache off                     #关闭缓存 /target [rootCentosszm ~]# /etc/init.d/tgtd start Starting SCSI target daemon:                               [  OK  ] #用的是3260这个端口 [rootCentosszm ~]# netstat -tulnp | grep tgt tcp        0      0 0.0.0.0:3260                0.0.0.0:*                   LISTEN      2766/tgtd tcp        0      0 :::3260                     :::*                        LISTEN      2766/tgtd [rootCentosszm ~]# tgt-admin --show Target 1: iqn.2013-04.com.Centosszm:szmdisk System information: Driver: iscsi State: ready I_T nexus information: LUN information: LUN: 0 Type: controller          #这个是控制器不是可用的LUN SCSI ID: IET     00010000 SCSI SN: beaf10 Size: 0 MB Online: Yes Removable media: No Backing store type: rdwr Backing store path: None LUN: 1 Type: disk SCSI ID: IET     00010001 SCSI SN: beaf11 Size: 55 MB            #磁盘大小 Online: Yes Removable media: No Backing store type: rdwr Backing store path: /dev/vg_szm/iscsi01 LUN: 2 Type: disk SCSI ID: IET     00010002 SCSI SN: beaf12 Size: 52 MB Online: Yes Removable media: No Backing store type: rdwr Backing store path: /srv/iscsi/disk1.img Account information: szmuser          #用户账号 ACL information: 192.168.179.0/24  #可连接IP #防火墙设置 [rootCentosszm ~]# iptables -A INPUT -p tcp --dport 3260 -j ACCEPT [rootCentosszm ~]# /etc/init.d/iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ] iSCSCI initiator的设置 /etc/iscsi/iscsid.conf /sbin/iscsid /sbin/iscsiadm /etc/init.d/iscsid /etc/init.d/iscsi  #这个会呼叫上面那个命令 1.客户端配置文件 [rootszm ~]# vim /etc/iscsi/iscsid.conf node.session.auth.username szmuser                #连接时用到的密码 node.session.auth.password szmpassword discovery.sendtargets.auth.username szmuser discovery.sendtargets.auth.password szmpassword   #检测时用到的密码 [rootszm ~]# chkconfig iscsid on [rootszm ~]# chkconfig iscsi on 2.检测192.168.179.7这台target的相关数据 -m discovvery: -t sendtargets: -p IP:prot : [rootszm ~]# iscsiadm -m discovery -t sendtargets -p 192.168.179.7 Starting iscsid:                                           [  OK  ] 192.168.179.7:3260,1 iqn.2013-04.com.Centosszm:szmdisk [rootszm ~]# ll -R /var/lib/iscsi/nodes/ /var/lib/iscsi/nodes/: total 4 drw-------. 3 root root 4096 Apr  8 23:50 iqn.2013-04.com.Centosszm:szmdisk /var/lib/iscsi/nodes/iqn.2013-04.com.Centosszm:szmdisk: total 4 drw-------. 2 root root 4096 Apr  8 23:50 192.168.179.7,3260,1 /var/lib/iscsi/nodes/iqn.2013-04.com.Centosszm:szmdisk/192.168.179.7,3260,1: total 4 -rw-------. 1 root root 1897 Apr  8 23:50 default 3.开始进行连接iSCSI target #找出目前本机上面所有检测到的target信息可能并未登录 [rootszm ~]# iscsiadm -m node 192.168.179.7:3260,1 iqn.2013-04.com.Centosszm:szmdisk #登录某台target,不要重新启动iSCSI服务 [rootszm ~]# iscsiadm -m node -T iqn.2013-04.com.Centosszm:szmdisk --login Logging in to [iface: default, target: iqn.2013-04.com.Centosszm:szmdisk, portal: 192.168.179.7,3260] (multiple) Login to [iface: default, target: iqn.2013-04.com.Centosszm:szmdisk, portal: 192.168.179.7,3260] successful. [rootszm ~]# fdisk -l …… Disk /dev/sdc: 54 MB, 54525952 bytes 2 heads, 52 sectors/track, 1024 cylinders Units cylinders of 104 * 512 53248 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdd: 52 MB, 52428800 bytes 2 heads, 50 sectors/track, 1024 cylinders Units cylinders of 100 * 512 51200 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 4.更新/删除/添加target数据的方法 iscsiadm -m node -T targetname --logout iscsiadm -m node -o [delete|new|update] -T targetname [rootszm ~]# iscsiadm -m node -T iqn.2013-04.com.Centosszm:szmdisk --logout Logging out of session [sid: 1, target: iqn.2013-04.com.Centosszm:szmdisk, portal: 192.168.179.7,3260] Logout of [sid: 1, target: iqn.2013-04.com.Centosszm:szmdisk, portal: 192.168.179.7,3260] successful. 没有删除连接 [rootszm ~]# iscsiadm -m node 192.168.179.7:3260,1 iqn.2013-04.com.Centosszm:szmdisk [rootszm ~]# iscsiadm -m node -o delete -T iqn.2013-04.com.Centosszm:szmdisk [rootszm ~]# iscsiadm -m node iscsiadm: No records found #例子 [rootszm ~]# iscsiadm -m discovery -t sendtargets -p 192.168.179.7 192.168.179.7:3260,1 iqn.2013-04.com.Centosszm:szmdisk [rootszm ~]# iscsiadm -m node 192.168.179.7:3260,1 iqn.2013-04.com.Centosszm:szmdisk [rootszm ~]# /etc/init.d/iscsi restart [rootszm ~]# fdisk -l …… Disk /dev/sdc: 54 MB, 54525952 bytes 2 heads, 52 sectors/track, 1024 cylinders Units cylinders of 104 * 512 53248 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdd: 52 MB, 52428800 bytes 2 heads, 50 sectors/track, 1024 cylinders Units cylinders of 100 * 512 51200 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 [rootszm ~]# pvcreate /dev/sd{c,d} Physical volume /dev/sdc successfully created Physical volume /dev/sdd successfully created [rootszm ~]# vgcreate iscsi /dev/sd{c,d} Volume group iscsi successfully created [rootszm ~]# vgdisplay --- Volume group --- VG Name               iscsi System ID Format                lvm2 Metadata Areas        2 Metadata Sequence No  1 VG Access             read/write VG Status             resizable MAX LV                0 Cur LV                0 Open LV               0 Max PV                0 Cur PV                2 Act PV                2 VG Size               96.00 MiB PE Size               4.00 MiB Total PE              24            #一共24个PE Alloc PE / Size       0 / 0 Free  PE / Size       24 / 96.00 MiB VG UUID               nGlC74-pbo5-SrMO-29jd-xhaM-g5ds-A7lLFL [rootszm ~]# lvcreate -l 24 -n disk iscsi Logical volume disk created [rootszm ~]# lvdisplay --- Logical volume --- LV Path                /dev/iscsi/disk LV Name                disk VG Name                iscsi LV UUID                V8I8UH-9qrh-M671-Gph2-E36Y-jWQ5-vV0MAG LV Write Access        read/write LV Creation host, time szm, 2013-04-09 13:35:07 0800 LV Status              available # open                 0 LV Size                96.00 MiB Current LE             24 Segments               2 Allocation             inherit Read ahead sectors     auto - currently set to     256 Block device           253:3 [rootszm ~]# mkfs -t ext4 /dev/iscsi/disk [rootszm ~]# mkdir -p /data/iscsi #_netdev:需要网络开机启动完成后才会挂载 [rootszm ~]# vim /etc/fstab /dev/iscsi/disk         /data/iscsi             ext4    defaults,_netdev 1 2 [rootszm ~]# mkdir /data/iscsi/testdir [rootszm ~]# touch /data/iscsi/testdir/testfile [rootszm ~]# ll /data/iscsi/ total 14 drwx------. 2 root root 12288 Apr  9 13:35 lostfound drwxr-xr-x. 2 root root  1024 Apr  9 13:39 testdir 服务器端查看 [rootCentosszm ~]# tgt-admin --show Target 1: iqn.2013-04.com.Centosszm:szmdisk System information: Driver: iscsi State: ready I_T nexus information: I_T nexus: 3 Initiator: iqn.1994-05.com.redhat:84971b47c598    #这个名字可以修改 Connection: 0 IP Address: 192.168.179.146             #连接进来的IP LUN information: LUN: 0 Type: controller SCSI ID: IET     00010000 SCSI SN: beaf10 Size: 0 MB Online: Yes Removable media: No Backing store type: rdwr Backing store path: None LUN: 1 Type: disk SCSI ID: IET     00010001 SCSI SN: beaf11 Size: 55 MB Online: Yes Removable media: No Backing store type: rdwr Backing store path: /dev/vg_szm/iscsi01 LUN: 2 Type: disk SCSI ID: IET     00010002 SCSI SN: beaf12 Size: 52 MB Online: Yes Removable media: No Backing store type: rdwr Backing store path: /srv/iscsi/disk1.img Account information: szmuser ACL information: 192.168.179.0/24 #修改名字最好在使用前修改否则会使得磁盘无法使用。 [rootszm ~]# cat /etc/iscsi/initiatorname.iscsi InitiatorNameiqn.1994-05.com.szm:84971b47c598 [rootszm ~]# /etc/init.d/iscsi restart Stopping iscsi:                                            [  OK  ] Starting iscsi:                                            [  OK  ] #发生下面的改变了郁闷全得LV不能够使用了。 [rootszm ~]# fdisk -l Disk /dev/sde: 54 MB, 54525952 bytes 2 heads, 52 sectors/track, 1024 cylinders Units cylinders of 104 * 512 53248 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdf: 52 MB, 52428800 bytes 2 heads, 50 sectors/track, 1024 cylinders Units cylinders of 100 * 512 51200 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000   转载于:https://blog.51cto.com/2816056/1184397
http://www.zqtcl.cn/news/232291/

相关文章:

  • 产品网站建设框架wordpress用户名密码加密方式
  • 入侵dedecms网站管理员密码青岛seo整站优化公司
  • 小网站备案南宁网站建设排名
  • 西安免费做网站wordpress 使用方法
  • 企业营销的意义优化核心系列网站
  • 微信网站设计一起做网站17广州
  • 重庆网络推广网站如何制作app演示视频
  • 网站logo是指手机上做app的软件
  • 做母婴育儿类网站好做seo排名吗深圳网站. 方维网络
  • 小型装修公司店面装修windows优化大师会员
  • php服装商城网站建设wordpress主题去除友情链接
  • 北京网站设计公司sx成都柚米科技15福建众利建设工程网站
  • 深圳大型网站建设服务公司wordpress后台为什么这么慢
  • 信用网站建设工作简报青岛的建筑公司
  • 网站怎么做文件上传灯饰 东莞网站建设
  • 建设电子商务网站的规划书电子商务平台网站模板
  • 桂林网站建设 腾云安康养老院收费
  • 网站建设找酷风旅游手机网站开发
  • 宜昌建设厅网站开发公司起名大全
  • 龙口建设局网站深圳十大网站建设公司
  • 湛江网站设计哪家好公司网址怎么查询
  • 网站怎么设置关键词河南宣传片制作公司
  • 做网站 怎么赚钱吗安乡网站制作
  • 国外展览展示设计网站沧州网络推广管理公司
  • 物流信息平台网站建设深圳做手机网站建设
  • 品牌型网站的特点领导视察网站建设
  • 如何自己做网站推广淘宝客佛山小程序开发公司
  • 天津市建设局网站口碑营销相关案例
  • 怎么有自己的网站厂字形网页布局网站
  • 广州市财贸建设开发监理网站工程建设企业等采用