Download presentation
Presentation is loading. Please wait.
Published byMorgan Paul Modified over 8 years ago
1
materi managing user & groups, file system Managing Software Packages and File Systems The Complete Guide to Linux System Administration Chapter 10
2
The Complete Guide to Linux System Administration2 Objectives Manage software packages that use the rpm format Use Red Hat Network to update a Red Hat Linux or Fedora installation Manage and install new file systems
3
The Complete Guide to Linux System Administration3 Managing Packages Linux groups related files into packages for easier management Software package contains all files needed to install and use application Red Hat Package Manager format –Abbreviated as rpm –Most popular data storage format for creating software packages
4
The Complete Guide to Linux System Administration4 Managing Packages (continued) Debian package format –Used by the Debian Linux distribution –.deb file extension –dselect utility manages Debian packages
5
The Complete Guide to Linux System Administration5 Managing Packages Graphically Use graphical utility to change what is installed To start utility, enter system-config-packages in terminal window Select check box next to any category of packages to add packages from category Details link lists individual software packages included in category
6
The Complete Guide to Linux System Administration6 Managing Packages Graphically (continued)
7
The Complete Guide to Linux System Administration7 Using rpm to Manage Software Packages rpm command-line utility maintains database listing all software packages installed on system –Lists: Files included in each package Packages are dependent on other packages Other information rpm command –Install new software packages –Erase software packages from system
8
The Complete Guide to Linux System Administration8 Using rpm to Manage Software Packages (continued) Name of package file includes version information –Example gedit-2.4.0-3.i386.rpm Version 2.4.0 Release code 3 Platform i386
9
The Complete Guide to Linux System Administration9 Using rpm to Manage Software Packages (continued) Rpm command options fall into categories –-q option―query database and learn about packages –-i or -U option―install or upgrade package –-e option―erase (uninstall) rpm package –Options can be used in combination Install new rpm files either from: –Linux CD-ROM –Internet
10
The Complete Guide to Linux System Administration10 Using rpm to Manage Software Packages (continued) Install package zsh-4.2.0-1.i386.rpm –rpm -uvh /tmp/zsh-4.2.0-1.i386.rpm Can use regular expression to specify package names rpm utility maintains internal database of keys Key is part of encryption information used to digitally sign rpm file
11
The Complete Guide to Linux System Administration11 Using rpm to Manage Software Packages (continued) Fedora keys located in /usr/share/rhn --import imports keys into rpm database Check for keys –rpm --checksig -v packagefilename
12
The Complete Guide to Linux System Administration12 Updating the System Automatically Red Hat Network –Download upgrades or security fixes for key operating system packages installed on system –Subscribe to Red Hat Network service May be entitled to annual subscription as part of purchase Individuals can use for free
13
The Complete Guide to Linux System Administration13 Updating the System Automatically (continued) Red Hat Network –Uses icon on Panel in GNOME or KDE to indicate status Check mark in blue circle Flashing exclamation point in red circle –To register, double-click network alert icon on panel –To configure, right-click alert icon
14
The Complete Guide to Linux System Administration14 Updating the System Automatically (continued) up2date utility –Manage updated software Configure overall settings for Red Hat Network –System Tools then Red Hat Network on GNOME main menu –Tabs General Retrieval/installation Package exceptions
15
The Complete Guide to Linux System Administration15 Updating the System Automatically (continued) Management and provisioning products within Red Hat network’s offering –Must purchase –Add capabilities to help keep systems secure and up to date
16
The Complete Guide to Linux System Administration16 Understanding the File System During installation –Partitions created –ext3 or similar file system
17
The Complete Guide to Linux System Administration17 Reviewing File System Types File system –Collection of data structured in certain way so that it can be efficiently accessed Superblock –Collection of information about file system as a whole –Found in ext2 and ext3
18
The Complete Guide to Linux System Administration18 Reviewing File System Types (continued) ext2 and ext3 file systems –Do not place files one after another filling up each area of hard disk in order –Permit file to grow in size without being as likely to be broken into pieces –Never need to defragment ext3 –Journaling file system
19
The Complete Guide to Linux System Administration19 Reviewing File System Types (continued) Other journaling file systems –ReiserFS –Journaling File System (JFS) Virtual file system model –Used by kernel –Separates file system type from operation program wants to perform –Linux can support any new file system type for which driver is available
20
The Complete Guide to Linux System Administration20 Reviewing File System Types (continued) Each file system must be mounted Mount command –Without any parameters List of currently mounted file systems
21
The Complete Guide to Linux System Administration21 Checking File System Status Root file system becomes full –Linux kernel can crash df command displays space usage information for each file system that is currently mounted If file system becomes full, must free space in directories where file system is mounted
22
The Complete Guide to Linux System Administration22 Checking File System Status (continued) Immediately free space –Look for large or numerous files in /tmp directory that can be deleted –Look for large or numerous files in /var subdirectories –Move system log file (/var/log/messages) to another file system that isn’t as full –See if any user subdirectories are using unusually large amounts of disk space –Delete unused archive files
23
The Complete Guide to Linux System Administration23 Checking File System Status (continued) du utility lists size of directory and all its subdirectories Various graphical tools and system administration scripts to check status of file systems –Hardware Browser –KDiskFree
24
The Complete Guide to Linux System Administration24 File System Attributes ext3 file system assigns set of attributes to each file –Not displayed by ls command –lsattr command lists attributes of files in directory –chattr command changes attributes of one or more files
25
The Complete Guide to Linux System Administration25 Checking File Systems fsck utility –Checks integrity of file systems –Usually pronounced fizz-check –Can also repair minor file system problems –Must be run on file system that is not mounted –Example: fsck /dev/hda1
26
The Complete Guide to Linux System Administration26 Creating New File Systems Adding file system means –Adding hard disk device to your system –Making hard disk available to Linux by: Formatting Mounting
27
The Complete Guide to Linux System Administration27 Using the fdisk Utility Modifications to partition table only effective when you write changes to disk with w command to exit fdisk Example: fdisk /dev/hdb
28
The Complete Guide to Linux System Administration28 Using the fdisk Utility (continued)
29
The Complete Guide to Linux System Administration29 Using the fdisk Utility (continued)
30
The Complete Guide to Linux System Administration30 Formatting File Systems mke2fs command –Formats partition Erasing all information on it Organizes space for data to be recorded Partition can be used by Linux –Use -j option to add journaling For ext3 –Example: mke2fs -j /dev/sdb2
31
The Complete Guide to Linux System Administration31 Formatting File Systems (continued) fdformat command – Format 3.5-inch disks gfloppy –Graphical removable disk formatter tune2fs utility –Examine superblock of file system –Make minor changes to file system parameters
32
The Complete Guide to Linux System Administration32 Mounting New File Systems mount command –To access file system –Indicate: Device on which file system is stored Directory where file system should be made accessible in directory structure –Example: mount -t ext3 /dev/sdb2 /archive
33
The Complete Guide to Linux System Administration33 Mounting New File Systems (continued) lost+found directory –Placed in beginning of all new ext2 and ext3 file systems –Indicates successful mounting File system cannot be in use when using umount command
34
The Complete Guide to Linux System Administration34 Using Networked File Systems Many Linux networks use networked file systems to share data transparently over network Use mount command to make directory on another computer appear as part of local file system –Similar to idea of “mapping a network drive” in Microsoft Windows
35
The Complete Guide to Linux System Administration35 Using Networked File Systems (continued) Networked file systems normally accessed using –Network file system (NFS) –Server message block (SMB)
36
The Complete Guide to Linux System Administration36 Automating File System Mounting /etc/fstab configuration file –Key to automounting file systems –Contains one line for each file system to automount Add options when executing mount command –Example: mount -t ext3 -o defaults /dev/sdb2 /archive
37
The Complete Guide to Linux System Administration37 Using the autofs Mounting Service autofs service –Daemon –Watches for users to change to preconfigured directories –Mounts needed file system in background –Operated by script in /etc/rc.d/init.d directory –/etc/auto.master lists directories to be automounted
38
The Complete Guide to Linux System Administration38 Using the autofs Mounting Service (continued) autofs service –Example: Mounting /misc directory Create /etc/auto.misc file Contains options to use when autofs mounts file system to /misc
39
The Complete Guide to Linux System Administration39 Managing Swap Space mkswap command –Format partition set up using fdisk as swap space –Example: mkswap /dev/hda2 swapon command activates swap space
40
The Complete Guide to Linux System Administration40 Setting Quotas on Disk Usage Disk quotas –Limit on amount of hard disk space user or group can use Steps to create quota –Enable quotas on file system –Establish quota for users or groups –Activate quota system –Review current disk usage for file system
41
The Complete Guide to Linux System Administration41 Setting Quotas on Disk Usage (continued) ulimit command –Part of bash shell –Impose limits on actions of users
42
The Complete Guide to Linux System Administration42 Summary Software packages are single files that contain all files and instructions needed to install application or collection of utilities RHN service permits automatic updating of operating system files over Internet Information about ext3 file system is stored in superblock etc/fstab file contains list of all file systems that system mounts at boot time
43
The Complete Guide to Linux System Administration43 Summary (continued) /df and du commands watch how disk space is being used fsck utility examines file system to see that contents have not been corrupted fdisk utility configures partition data on hard disk
44
The Complete Guide to Linux System Administration44 Summary (continued) Linux supports networked file systems autofs service automatically mounts file systems whenever user enters named directory Disk quotas configured using edquota command
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.