硬盘分区
配置两个RAID1
[root@localhost ~]# mdadm -C /dev/md11 -l 1 -n 2 /dev/sdb1 /dev/sdb2 -v
[root@localhost ~]# mdadm -C /dev/md12 -l 1 -n 2 /dev/sdb3 /dev/sdb4
将两个RAID1合成RAID0
[root@localhost ~]# mdadm -C /dev/md0 -l 0 -n 2 /dev/md11 /dev/md12 -v
将RAID0变为物理卷组
[root@localhost ~]# pvcreate /dev/md0
划分卷组
[root@localhost ~]# vgcreate myvg /dev/md0
划分逻辑卷
[root@localhost ~]# lvcreate -L 5G -n mylv myvg
格式化逻辑卷
[root@localhost ~]# mkfs.ext4 /dev/myvg/mylv
安装apache
解压安装包
[root@localhost ~]# tar -xf httpd-2.2.17.tar.gz -C /usr/src/
配置
[root@localhost httpd-2.2.17]# ./configure --prefix=/usr/local/apache
编译
[root@localhost httpd-2.2.17]make
安装
[root@localhost httpd-2.2.17]make install
进入Apache
[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 "my name is yuanxinghong" > 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
~
Linux0803日练习