[root@localhost ~]# yum -y install gcc gcc-c++ make lynx //编辑对应语言和安装包
[root@localhost ~]# tar -xf httpd-2.2.17.tar.gz -C /usr/src //解压缩安装包
[root@localhost ~]# cd /usr/src/httpd-2.2.17/ //切入安装包位置
[root@localhost httpd-2.2.17]# ./configure --prefix=/usr/local/apache/ && make && make install //对应刚才的语言进行编辑 // 安装对应语言
[root@localhost httpd-2.2.17]# vi /usr/local/apache/conf/httpd.conf
[root@localhost httpd-2.2.17]# /usr/local/apache/bin/apachectl start[root@localhost httpd-2.2.17]# lynx 127.0.0.1(或虚拟机ip)[root@localhost httpd-2.2.17]# mount /dev/myvg/mylv /usr/local/apache/htdocs/ 挂载文件
2、在网页目录下创建测试文件index.html,内容为用户名称,通过浏览器访问测试
[root@localhost ~]# cd /usr/local/apache/htdocs/
[root@localhost htdocs]# touch index.html[root@localhost htdocs]# vi index.html
写内容
[root@localhost htdocs]# lynx 192.168.100.179(127.0.0.1)
3、创建用户账户,对LVM配置磁盘配额限制用户磁盘容量为软限制80M;硬限制100M、文件数量软限制为80个;硬限制为100个。
[root@localhost ~]# vi /etc/fstab
/dev/myvg/mylv /usr/local/apache/htdocs ext4 defaults,usrquota,grpquota 0 0
[root@localhost ~]# quotacheck -a
(如果失败,先弹出所有文件系统磁盘,umount -a 再挂载所有mount -a)
[root@localhost ~]# quotaon -a
[root@localhost ~]# useradd tom [root@localhost ~]# passwd tom(不用交互设密码:echo "123" |passwd --stdin tom)
[root@localhost ~]# edquota -u