进入快盘 | 申领稿费  |  新人报到  |  意见建议 | 购买卡币    

卡巴斯基技术论坛's Archiver

李釗濠 发表于 2008-8-19 08:53

磁盘配额详细设置过程

<DIV id=att_9261 style="MARGIN: 5px">图片: <BR><IMG onclick="if(this.width>=700) window.open('http://www.hack86.com/bbs/attachment/10_124_5a7c52217c3a8ac.jpg');" src="http://www.hack86.com/bbs/attachment/10_124_5a7c52217c3a8ac.jpg" onload="if(this.width>'700')this.width='700';if(this.height>'700')this.height='700';" border=0> </DIV>
<DIV id=att_9262 style="MARGIN: 5px">图片: <BR><IMG onclick="if(this.width>=700) window.open('http://www.hack86.com/bbs/attachment/10_124_bd5f51f7464b446.jpg');" src="http://www.hack86.com/bbs/attachment/10_124_bd5f51f7464b446.jpg" onload="if(this.width>'700')this.width='700';if(this.height>'700')this.height='700';" border=0> </DIV>
<DIV class=tpc_content id=read_tpc>
<H6 class=quote><SPAN class="s3 f12 fn"><FONT color=#fa891b size=2></FONT></SPAN>&nbsp;</H6>
<BLOCKQUOTE>第一步:确认quota软件包是否安装<BR>&nbsp; &nbsp; &nbsp; &nbsp; 在终端模式下输入 #rpm -q quota<BR>第二步:修改文件系统的配额文件<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #vi /etc/fstab<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 这部要修改的内容图片在第一行的defaults后面输入 ,usrquota,grpquota <BR>第三步:创建新用户(为了后面验证)<BR>&nbsp; &nbsp; &nbsp; &nbsp; #useradd&nbsp; 用户名<BR>第四步:重新启动 很重要的 不启动就相当于白干 o(∩_∩)o...哈哈<BR>&nbsp; &nbsp; &nbsp; &nbsp; #reboot 或者 #init 6 等等<BR>&nbsp; &nbsp; &nbsp; &nbsp; 重启好后<BR>&nbsp; &nbsp; &nbsp; &nbsp; 要创建配额文件<BR>&nbsp; &nbsp; &nbsp; &nbsp; #quotacheck -cmug / <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 查看下建立的配额文件<BR>&nbsp; &nbsp; &nbsp; &nbsp; #ls /aquota.*<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 此时就会有aquota.group 和aquota.user这二个文件<BR>第五步:编辑用户配额<BR>&nbsp; &nbsp; &nbsp; &nbsp; #edquota -u 次命令是针对用户进行配额 后面加上 刚才新建的用户名 记得要加空格<BR>&nbsp; &nbsp; &nbsp; &nbsp; #edquota -g 次命令是针对组进行配额设置<BR>&nbsp; &nbsp; &nbsp; &nbsp; 例如(图2):#edquota -u linux<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 设置时记住:在soft下面设置的值不能大于hard的值<BR>&nbsp; &nbsp; &nbsp; &nbsp; 这个就相当于 傻Windows 里面给磁盘做配额 有个大小警告设置 比如你设置的100M<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 当到90时系统会自动提示你!<BR>第六步:重启,用刚才建立的用户登陆并验证<BR>&nbsp; &nbsp; &nbsp; &nbsp; 验证?<BR>&nbsp; &nbsp; &nbsp; &nbsp; 怎么验证?<BR>&nbsp; &nbsp; &nbsp; &nbsp; 自己下东西 越大越好,或者copy 看你刚才做配额设置的大小 和你下的东西了 如果大于你设置的 就下不了</BLOCKQUOTE></DIV>

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.