第六週作業

1、自建yum倉庫,分別爲網絡源和本地源

1)  vim  /etc/yum.repos.d/centos7.repo
        [base]
        name=centos7
        baseurl=file:///OS
                        https://mirrors.aliyun.com/centos/$releasever/os/x86_64/
        gpgcheck=0
        enable=1
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

        [epel]                                                                                                        
        name=epel
        baseurl=https://mirrors.aliyun.com/epel/$releasever/$basearch
        gpgcheck=0
        enable=1

2)  yum clean all   清現有的yum源的信息
3)yum repolist下載yum源的元數據

第六週作業第六週作業

 

2、編譯安裝http2.4,實現可以正常訪問,並將編譯步驟和結果提交。

編譯步驟:
  250  yum install gcc apr-devel apr-util-devel pcre-devel mod_ssl openssl-devel -y
  253  /data/httpd-2.4.25/configure --prefix=/apps/http24 --sysconfdir=/etc/httpd24  --enable-ssl --enable-so
  254  make
  255  make install
啓動服務:
[root@centos7 httpd-2.4.25]#/apps/http24/bin/apachectl  start

第六週作業
測試結果:
第六週作業

第六週作業

 

3、創建一個2G的文件系統,塊大小爲2048byte,預留1%可用空間,文件系統 ext4,卷標爲TEST,要求此分區開機後自動掛載至/test目錄,且默認有acl掛載選項

[root@centos7 ~]#fdisk /dev/sdb   (或者   echo -e "n\np\n\n\n+2G\nw\n" |fdisk /dev/sdb)
[root@centos7 ~]#mkfs.ext4 /dev/sdb1  -L 'TEST' -b 2048 -m 1
[root@centos7 ~]#mkdir /test
[root@centos7 ~]#echo   'LABEL=TEST /test ext4  acl,defaults 0 0' >>/etc/fstab

第六週作業

第六週作業

第六週作業

4、創建一個至少有兩個PV組成的大小爲20G的名爲testvg的VG;要求PE大小 爲16MB, 而後在卷組中創建大小爲5G的邏輯卷testlv;掛載至/users目錄

[root@centos7 ~]#pvcreate /dev/sdb2 /dev/sdc6
[root@centos7 ~]#vgcreate -s 16 testvg /dev/sdc6 /dev/sdb2
[root@centos7 ~]#lvcreate  -n testlv  -L 5G  testvg
[root@centos7 ~]#lvscan 
[root@centos7 ~]#mkfs.xfs  /dev/mapper/testvg-testlv
[root@centos7 ~]#mkdir /users
[root@centos7 ~]#mount /dev/mapper/testvg-testlv  /users

第六週作業第六週作業第六週作業第六週作業第六週作業第六週作業

架構班小夥伴看這裏:

1、實現openstack控制端的高可用

 

2、結合lvs實現openstack的負載均衡![]

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章