第四次作业;创建raid5,源码编译安装;yum仓库的构建; 磁盘配额
创建raid5
格式化 ext4
创建物理卷:
创建卷组:
创建逻辑卷:
格式化 ext4
挂载 ( /usr/local/apache/htdocs )
开机自启动
创建raid配置文件
源码编译安装:
创建本地yum仓库
umount /dev/sr0
mount /dev/sr0 /media/
ls /media
构建本地yum仓库文档
cd /etc/yum.r*
mkdir a/
mv C* a/
创建本地yum仓库
vi local.repo
[cdrom]
name=cdrom
baseurl=file:///media 指定rpm包的指定位置
enabled=1
gpgcheck=0
清除yum缓存
yum -y clean all
重建缓存
yum makecache
tar xf httpd-2.2.17.tar.gz -C /usr/src : 解包
./configure –prefix=/usr/local/apache && make && make install :配置 / 编译 / 安装
cd /usr/local/apache/conf //进入Apache目录
cp httpd.conf{,.bak} //备份文件
vi /usr/local/apache/conf/httpd.conf //修改配置文件
#ServerName www.example.com:80
ServerName www.example.com:80
启动Apache
/usr/local/apche/bin/apachectl start
运行 lynx 127.0.0.1
在网页目录下配置index.html
[root@localhost htdocs]# cd /usr/local/apache/htdocs/
修改配置文件
[root@localhost conf]# vi httpd.conf
启动
[root@localhost conf]# /usr/local/apache/bin/apachectl start
挂载
[root@localhost htdocs]# mount /dev/myvg/mylv /usr/local/apache/htdocs/
修改配置文件
[root@localhost htdocs]# vim /etc/fstab
/dev/myvg/mylv /usr/local/apache/htdocs/ ext4 defaults,usrquota,grpquota 0 0
创建文本
[root@localhost htdocs]# echo "QAQ" > index.html
磁盘配额:
[root@localhost htdocs]# quotacheck -avug
限制用户额度
[root@localhost htdocs]# useradd zhangsan
[root@localhost htdocs]# quotacheck -avug
[root@localhost htdocs]# edquota -u zhangsan
Disk quotas for user zhangsan (uid 8893):
Filesystem blocks soft hard inodes soft hard
/dev/mapper/myvg-mylv 0 80000 100000 0 80 100