1、自建yum仓库,分别为网络源和本地源。
本地源
#通过misc便捷挂载光盘,CentOS6.8以下的版本默认开启了autofs服务,可使用misc
[root@localhost data]# rpm -qa|grep autofs #检测是否安装了autofs
autofs-5.0.7-99.el7.x86_64 #已安装
libsss_autofs-1.16.2-13.el7.x86_64
[root@localhost data]# systemctl start autofs # 开启autofs,退出系统失效
[root@localhost data]# systemctl enable autofs # 永久开启autofs
[root@localhost data]# cd /misc/
[root@localhost misc]# ll
total 0
[root@localhost misc]# cd cd # 光盘挂载成功
[root@localhost yum.repos.d]# df /dev/sr0 #确认光盘已经挂载到/misc/cd目录下
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sr0 4480476 4480476 0 100% /misc/cd
[root@localhost cd]# ll
total 686
-rw-rw-r--. 1 wufujie wufujie 14 Nov 26 2018 CentOS_BuildTag
drwxr-xr-x. 3 wufujie wufujie 2048 Nov 26 2018 EFI
-rw-rw-r--. 1 wufujie wufujie 227 Aug 30 2017 EULA
-rw-rw-r--. 1 wufujie wufujie 18009 Dec 10 2015 GPL
drwxr-xr-x. 3 wufujie wufujie 2048 Nov 26 2018 images
drwxr-xr-x. 2 wufujie wufujie 2048 Nov 26 2018 isolinux
drwxr-xr-x. 2 wufujie wufujie 2048 Nov 26 2018 LiveOS
drwxrwxr-x. 2 wufujie wufujie 663552 Nov 26 2018 Packages
drwxrwxr-x. 2 wufujie wufujie 4096 Nov 26 2018 repodata #存在repodata,即可作为yum源
-rw-rw-r--. 1 wufujie wufujie 1690 Dec 10 2015 RPM-GPG-KEY-CentOS-7 #指定gpg检测时需要的公钥文件
-rw-rw-r--. 1 wufujie wufujie 1690 Dec 10 2015 RPM-GPG-KEY-CentOS-Testing-7
-r--r--r--. 1 wufujie wufujie 2883 Nov 26 2018 TRANS.TBL
[root@localhost cd]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls #将默认的yum仓库的配置文件做备份
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# mkdir backup
[root@localhost yum.repos.d]# mv *.repo backup/
[root@localhost yum.repos.d]# vim base.repo #配置仓库文件
[base] #仓库ID,如果有多个仓库,要确保其唯一性
name=CentOS #仓库说明,描述仓库的信息
baseurl=file:///misc/cd #仓库的路径
enabled=1 #1表示启用该仓库,0表示禁用
gpgcheck=1 #安装包的安全检测,0表示不检测
gpgkey=file:///misc/cd/RPM-GPG-KEY-CentOS-7 #指定gpg检测时需要的公钥文件
[root@localhost yum.repos.d]# yum repolist #查看仓库信息,说明已经配置成功
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
repo id repo name status
base CentOS 10,097
repolist: 10,097
网络源
[root@localhost yum.repos.d]# vim epel.repo #同本地源配置类似
[epel]
name=EPEL
baseurl=http://mirrors.aliyun.com/epel/$releasever/$basearch
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# yum repolist #检查仓库,网络仓库配置成功
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
repo id repo name status
base CentOS 10,097
epel/7/x86_64 EPEL 13,501
repolist: 23,598
2、编译安装http2.4,实现可以正常访问,并将编译步骤和结果提交。
[root@localhost httpd-2.4.25]#make
....省略部分内容
-module -avoid-version mod_rewrite.lo
make[4]: Leaving directory `/data/httpd-2.4.25/modules/mappers'
make[3]: Leaving directory `/data/httpd-2.4.25/modules/mappers'
make[2]: Leaving directory `/data/httpd-2.4.25/modules'
make[2]: Entering directory `/data/httpd-2.4.25/support'
make[2]: Leaving directory `/data/httpd-2.4.25/support'
make[1]: Leaving directory `/data/httpd-2.4.25'
[root@localhost httpd-2.4.25]#make install
...省略部分内容
Installing configuration files
mkdir /data/apps/httpd/conf
mkdir /data/apps/httpd/conf/extra
mkdir /data/apps/httpd/conf/original
mkdir /data/apps/httpd/conf/original/extra
...省略部分内容
make[1]: Leaving directory `/data/httpd-2.4.25'
[root@localhost httpd-2.4.25]# ls /data/apps/httpd/ #查看安装后生成的相关文件
bin build cgi-bin conf error htdocs icons include logs man manual modules
[root@localhost httpd-2.4.25]# echo 'PATH=/data/apps/httpd/bin:$PATH' > /etc/profile.d/httpd.sh #配置变量,在任意目录下都可启动服务程序
[root@localhost ~]# apachectl #启动程序
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
httpd (pid 48328) already running
[root@localhost ~]# curl 192.168.27.134
<html><body><h1>It works!</h1></body></html> 配置成功
3、创建一个2G的文件系统,块大小为2048byte,预留1%可用空间,文件系统 ext4,卷标为TEST,要求此分区开机后自动挂载至/test目录,且默认有acl挂载选项
4、创建一个至少有两个PV组成的大小为20G的名为testvg的VG;要求PE大小 为16MB, 而后在卷组中创建大小为5G的逻辑卷testlv;挂载至/users目录
暂时还未跟上进度,后续会补上作业。