Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration method of Open Suse Linux server

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "the configuration method of Open Suse Linux server". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

When learning Open Suse Linux, we often encounter Open Suse Linux problems. Here we will introduce the solutions to Open Suse Linux problems. Now many IT enterprise departments want to use Open Suse Linux. This article introduces the configuration method of Open Suse Linux server, as follows:

Operating system version:

Suse10:/ # cat / etc/SuSE-release openSUSE 10.2 (i586) VERSION = 10.2 suse10:/ # uname-a Linux suse10 2.6.18.2-34-default # 1 SMP Mon Nov 27 11:46:27 UTC 2006 i686 athlon i386 GNU/Linux

1. Check whether the quota package is installed on the system

Suse10:/ # rpm-qa | grep quota

Suse10:/ #

The query has no output, indicating that the system is not installed.

2. Install the quota package

Suse10:/tmp # ls-l quota*-rwxr-xr-x 1 root root 270080 Aug 17 14:33 quota-3.13-17.i586.rpm suse10:/tmp # rpm-ivh quota-3.13-17.i586.rpm Preparing... # [100%] 1:quota #

3. Check again whether the system has successfully installed the quota package

Suse10:/tmp # rpm-qa | grep quota

Quota-3.13-17

There is a "quota-3.13-17" output, indicating that the quota package is installed successfully.

4. Set the file system that needs to do the user / group disk quota

Edit the / etc/fstab file, restrict users, add usrquota, restrict groups, add grpquota. The red part is as follows:

Suse10:/ # cat / etc/fstab / dev/system_vg/root_lv / ext3 acl,user_xattr 1 1 / dev/hda1 / boot ext3 acl,user_xattr 1 2 / dev/system_vg/home_lv / home ext3 acl,user_xattr,usrquota Grpquota 1 2 / dev/system_vg/tmp_lv / tmp ext3 acl,user_xattr 1 2 / dev/system_vg/usr_lv / usr ext3 acl User_xattr 1 2 / dev/system_vg/swap_lv swap swap defaults 0 0 proc / proc proc defaults 0 0 sysfs / sys sysfs noauto 0 0 debugfs / sys/kernel/debug debugfs noauto 0 0 Usbfs / proc/bus/usb usbfs noauto 0 0 devpts / dev/pts devpts mode=0620 Gid=5 0 0 / dev/data_vg/informix_lv / informix ext3 acl,user_xattr 1 2 / dev/data_vg/oracle_lv / oracle ext3 acl,user_xattr 1 2

5. Re-mount the file system

Reload the file system with disk quota enabled:

Suse10:/ # mount-o remount / home

If there is no message after enter, the reload is successful.

6. Create a quota file for a disk quota-enabled file system

Suse10:/ # quotacheck-gumv / home quotacheck: Scanning / dev/mapper/system_vg-home_lv [/ home] done quotacheck: Cannot stat old user quota file: No such file or directory quotacheck: Cannot stat old group quota file: No such file or directory quotacheck: Cannot stat old user quota file: No such file or directory quotacheck: Cannot stat old group quota file: No such file or directory quotacheck: Checked 3210 directories and 8310 files quotacheck: Old file not found. Quotacheck: Old file not found.

-g parameter: when scanning disk space, calculate the number of directories and files occupied by each group identifier (GID)

-u parameter: calculates the number of directories and files occupied by each user identifier (UID) when scanning disk space

The-v parameter: identifies the command execution process.

The-m parameter: forces the command to be executed.

Two files, aquota.user and aquota.group, are automatically generated under the root of the / home file system.

Suse10:/ # ls-l / home/aquota.*-rw- 1 root root 8192 Aug 17 22:18 / home/aquota.group-rw- 1 root root 8192 Aug 17 22:18 / home/aquota.user

7. Enable disk quota

Suse10:/ # quotaon-augv

/ dev/mapper/system_vg-home_lv [/ home]: group quotas turned on

/ dev/mapper/system_vg-home_lv [/ home]: user quotas turned on

-a parameter: open in the / ect/fstab file. There is a space limit for partitions set by quota.

-g parameter: disk space limit for enabling groups

-u parameter: enable the disk space limit of the user

-v parameter: displays the execution process of the instruction.

8. Edit the disk quota size of users / groups (this article takes oracle1 users as an example. The group configuration process is similar, which is not listed in this article).

Suse10:/ # edquota-u oracle1

When you enter, you will call vi editing, as follows:

Disk quotas for user oracle1 (uid 2002):

Filesystem blocks soft hard inodes soft hard

/ dev/mapper/system_vg-home_lv 1886624 0 0 3880 0 0

Description:

Filessystem: indicates the name of the file system on which disk quota is currently enabled

Blocks: indicates that the current user has used the number of blocks size

Soft: indicates the soft limit (non-mandatory limit) disk space size in KBytes

Hard: indicates the hard limit (mandatory limit) disk space size in KBytes

Inodes: indicates the number of files used by the current user

Soft: indicates soft limit (non-mandatory limit) number of files

Hard: indicates a hard limit (mandatory limit) on the number of files.

"0" means that there is no unlimited limit, fill in the value you want to set and save and exit.

9. Check a user's disk quota

Suse10:/ # quota-u oracle1

Disk quotas for user oracle1 (uid 2002):

Filesystem blocks quota limit grace files quota limit grace

/ dev/mapper/system_vg-home_lv 1886624 4194304 4200000 3880 10000 11000

Description: check the disk quota of a group using the-g parameter.

10. View the disk limits of a file system (including user and group quotas)

Suse10:/ # repquota-ugv / home * Report for user quotas on device / dev/mapper/system_vg-home_lv Block grace time: 7days Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace-root- 1027760 00 2444 00 metal-3068 00 656 00 informix-599128 00 2076 00 oracle-701152 00 2437 00 oinstall-16 00 25 00 oracle1-1886624 4194304 4200000 3880 10000 11000 Statistics: Total blocks: 8 Data blocks: 1 Entries: 6 Used average: 6.000000 * Report for group quotas on device / dev/mapper/system_vg-home_lv Block grace time: 7days Inode grace time: 7days Block limits File limits Group used soft hard grace used soft hard grace-root -1003900 00 2449 00 users-- 3068 00 2449 00 informix-- 623104 00 2096 00 oinstall-- 2587776 00 6 317 00 Statistics: Total blocks: 8 Data blocks: 1 Entries: 4 Used average: 4.000000

11. Edit grace time

Suse10:/ # edquota-t Grace period before enforcing soft limits for users: Time units may be: days, hours, minutes, or seconds Filesystem ock grace period Inode grace period / dev/mapper/system_vg-home_lv 7days 7days

The system defaults to 7 days, which can be changed to the value you actually need to save and then exit.

In particular, when the actual used space does not exceed the soft (soft) limit, the grace time will not appear in the quota-u username output.

This is the end of the content of "how to configure Open Suse Linux Server". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report