Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | subhrajitm47 |
View: | 216 times |
Download: | 0 times |
of 40
7/30/2019 hp-ux-admin
1/40
HP-UX
SYSTEM ADMINISTRATION
7/30/2019 hp-ux-admin
2/40
INTRODUCTIONTO
UNIX
7/30/2019 hp-ux-admin
3/40
Primarily influenced by Multics
First version of UNIX developed by Ken Thompson
in 1969 on DEC PDP for business, scientific and industrial users
Originally written in Assembly language for PDP-7
Transportability facilitated by Thompson in B Language
B modified by Richie as C Language
Thompson and others wrote Unix in C in 1980 to be
able to port on any computer
7/30/2019 hp-ux-admin
4/40
FEATURES OF UNIX
Multitasking
Multiuser
On line help
Communication and Electronic mail
7/30/2019 hp-ux-admin
5/40
FEATURES OF UNIX CONTINUES...
Available on micros, minis and mainframes
Hierarchical file system
Library of application software
7/30/2019 hp-ux-admin
6/40
SYSTEM CONCEPTS
7/30/2019 hp-ux-admin
7/40
KERNEL
SHELL
APPLICATION SOFTWARE
UNIX
Kernel
Shell
Applications
7/30/2019 hp-ux-admin
8/40
KERNEL is the heart of the UNIX operating system. It is nextto the hardware. It is responsible for scheduling tasks and
managing data storage
SHELL is the command interpreter. It is an interface between
the user and the kernel.
APPLICATION SOFTWARE are the specific capabilitiesadded on to the operating system
7/30/2019 hp-ux-admin
9/40
BOURNE
prompt - ($)-> DEFAULT SHELL
C
prompt - (%)-> HAS SYNTAXSIMILAR TO C LANGUAGE
KORN
prompt - ($)-> BOURNE + ALIASING,HISTORY, ETC.
SHELLS
7/30/2019 hp-ux-admin
10/40
Introducing The File System Paradigm
OS Application
User System
Executables
Archived Shared
Binary Data
Libraries System Startup
Static Files
OS Application
Configuration
OS Application
Temporary User
Dynamic Files
Introducing the File System Paradigm
7/30/2019 hp-ux-admin
11/40
The File System Layout
app1 app2
/opt /var /usr /sbin /etc /stand /tmp /dev /mnt /var
/root
7/30/2019 hp-ux-admin
12/40
System Administrator Roles
Startup and shutdown.
User and Group management.
Disk management.
Software management.
Printer management.
Network management.
Batch jobs.
Backup & Restore.
7/30/2019 hp-ux-admin
13/40
System Administrator Roles contd....
Application Installation
Patch Administration
Disaster Recovery
7/30/2019 hp-ux-admin
14/40
SYSTEM STARTUP AND SHUTDOWN
7/30/2019 hp-ux-admin
15/40
SYSTEM STARTUP & SHUTDOWN
INIT
To put the system in a particular run level
REBOOT
To reboot or halt the system.
-r : reboot the system and put it in multi user mode.
-h : to halt the system.
SHUTDOWN
To shutdown or reboot the system.
-r : to reboot the system
-h : to halt the system
User should have root privileges.
7/30/2019 hp-ux-admin
16/40
USER ADMINISTRATION
7/30/2019 hp-ux-admin
17/40
USER AND GROUP MANAGEMENT
Create a user:
#useradd [-u uid] [-g gid] [-d dir] [-s shell] [-c comment] login-name
#mkdir /home/login-name
#chown login-name:group /home/login-name
#passwd login-name
Defaults :
-u : next uid.
-g : 20 (users)
-d : /home/login-name-s : /bin/sh (Bourne shell)
-c : NULL
7/30/2019 hp-ux-admin
18/40
USER AND GROUP MANAGEMENT contd...
Delete a user:
#userdel [-r] login-name
-r : to remove the home directory.
Modify a user:
#usermod [-u uid] [-g gid] [-d dir] [-s shell] [-l new-login-name] login-name
Note:- At least one option should be specified
Change Passwd:
#passwd [login-name]
7/30/2019 hp-ux-admin
19/40
Create a Group:
#groupadd [-g gid] group-name
Default is next available GID.
Delete a Group:
#groupdel group-name
Modify a Group:
#groupmod [-g gid] [-n new-name] group-name
USER AND GROUP MANAGEMENT contd...
7/30/2019 hp-ux-admin
20/40
DISK MANAGEMENT
7/30/2019 hp-ux-admin
21/40
Types of Disk management:
Hard Partitions
Logical Volume Manager (LVM)
7/30/2019 hp-ux-admin
22/40
DISK MANAGEMENT contd..
LVM objects:
Physical Volume : The physical hard-disk.
Volume Group : Logical group of physical volumes.
Logical Volume : One partition of a volume group.
Physical Extent : The smallest addressable unit of physical volume.
Logical Extent : The smallest addressable unit of logical volume.
Physical Volume Path :The way through which system is accessing the disk.
7/30/2019 hp-ux-admin
23/40
Physical Volume Commands:
pvcreate : Create physical volume for use in LVM
pvremove : Remove LVM data structure from a physical volume
pvchange : Change characteristics and access path of physical volume
pvmove : Move allocated physical extents from one LVM physical
volume to other physical volumes
pvdisplay : Display information about physical volumes within LVM
7/30/2019 hp-ux-admin
24/40
Volume Group Commands :
vgcreate - create volume group
Ex: vgcreate /dev/vg00 /dev/dsk/c3t0d0
vgremove - remove volume group definition from the system.Ex: vgremove /dev/vg02
vgchange - set volume group availability
Ex: vgchange -a y /dev/vg03
vgdisplay - display information about volume groups
Ex: vgdisplay -v /dev/vg02
7/30/2019 hp-ux-admin
25/40
Volume Group Commands :
vgreduce - remove physical volumes from an volume group
Ex: vgreduce /dev/vg01 /dev/dsk/c0t1d0
vgextend - extend an volume group by adding physical volumes
Ex: vgextend /dev/vg03 /dev/dsk/c1t4d0
vgscan - scan physical volumes for volume groups
Ex: vgscan -v
vgexport - export volume group and its associated logical
volumes
Ex: vgexport -m vg01.mymap /dev/vg01
7/30/2019 hp-ux-admin
26/40
Volume Group Commands :
vgimport - import an volume group onto the system
Ex: vgimport -v /dev/vg01 /dev/dsk/c0t1d0
vgcfgbackup - create or update LVM volume group configuration
backup file
Ex: vgcfgbackup -f /tmp/vg00.backup vg00
vgcfgrestore - display or restore LVM volume group configuration
from file.Ex: vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t7d0
7/30/2019 hp-ux-admin
27/40
Logical Volume Commands :
lvcreate - Create logical volume in LVM volume group.Ex: lvcreate -L 100 -n test /dev/vg03
lvremove -Remove one or more logical volumes from
volume group.Ex: lvremove -f /dev/vg01/lvol5
lvextend - Increase space, increase mirrors for logical
volume.
Ex: lvextend -L 400 /dev/vg01/lvol4
Ex: lvextend -m 1 /dev/vg01/lvol5
7/30/2019 hp-ux-admin
28/40
Logical Volume Commands :
lvreduce - Decrease space allocation or the number of mirror
copies of logical volumes.
Ex: lvreduce -L 100 /dev/vg01/lvol3
Ex: lvreduce -m 0 /dev/vg01/lvol5
lvdisplay - Display information about LVM logical volumes
Ex: lvdisplay -v /dev/vg01/lvol3
lvchange - change LVM logical volume characteristics
Ex: lvchange -p r /dev/vg01/lvol3
7/30/2019 hp-ux-admin
29/40
File System Management
Types of file systems:
HFS ( High performance File System )
VxFS ( Veritas Filesystem )
CDFS ( CD-ROM File System )
NFS ( Network File System )
LOFS ( Loopback File System )
7/30/2019 hp-ux-admin
30/40
Filesystem Tasks:
newfs - Construct a new file systemEx: newfs -F hfs /dev/rdsk/c1t0d2
tunefs - Tune up an existing HFS file system
fsck - File system consistency check and interactive repair
Ex: fsck -p /dev/vg00/rlovl1
mount - Mount file systems
Ex: mount -F hfs /dev/dsk/c1t2d0 /home
umount - Unmount a file system
Ex: umount /dev/dsk/c1t2d0
7/30/2019 hp-ux-admin
31/40
SOFTWARE MANAGEMENT
7/30/2019 hp-ux-admin
32/40
swlist - display information about software products
Ex: swlist - List all of the products installed
Ex: swlist -i -d @ /tmp/depot Use interactive swlist to view a depot
Ex: swlist -d @ /dev/rmt/0m List the contents of the local tape.
Ex: swlist -s /dev/rmt/0m List the contents of the local tape
Ex: swlist -l depot @ hostA List all depots on a host:
7/30/2019 hp-ux-admin
33/40
Swinstall install and configure software products
Ex: swinstall To invoke an interactive session of swinstall
Ex: swinstall -i -s sw_server cc PascalSelect the C and Pascal products from the network source
software server (sw_server) and start an interactive session
Ex: swinstall -s /dev/rmt/0 \*
Install all products from the cartridge tape /dev/rmt/0
7/30/2019 hp-ux-admin
34/40
Swremove - Unconfigure and remove software products
Ex: swremove -p cc pascal
Preview the remove of the C and Pascal products
installed at the local host.
Ex: swremove -d * @ /var/spool/sw
Remove the entire contents of a local depot
Ex:swremove Omniback,l/opt/Omniback_v2.0
Remove a particular version of HP Omniback
7/30/2019 hp-ux-admin
35/40
swcopy - Copy software products for subsequent installationor distribution
Ex: swcopy Invoke an interactive session of swcopy
Ex: swcopy -i -s hostX
Invoke an interactive session, using default depot at
hostX as the source.
Ex: swcopy -s /dev/rmt/0m \*Copy all products from the cartridge tape /dev/rmt/0m
to the default depot on the local host
7/30/2019 hp-ux-admin
36/40
PRINTER ADMINISTRATION
7/30/2019 hp-ux-admin
37/40
Adding a Local Printer to the LP Spooler
lpshut - Stop the LP spooler
lpadmin -pchk_printer -v/dev/lp -mhp2934a -g7
Add the printer to the LP spooler
accept chk_printer
Allow print requests to be accepted for the newly added printer
enable chk_printerEnable the newly added printer to process print requests
lpsched - Restart the LP spooler:
7/30/2019 hp-ux-admin
38/40
Adding a Remote Printer to the LP Spooler
lpadmin -plocal_printer -v /dev/null -mrmodel \> -ormremote_machine -orpremote_dest -ocmrcmodel -
osmrsmodel
7/30/2019 hp-ux-admin
39/40
Removing a Printer from the LP Spooler
lpshut - Stop the LP spooler.
reject -r"Use alternate printer." laser1
Deny any further print requests for the printer
lpstat -o laser1
Determine if there are any jobs in the printer's queue
disable -r"Printer laser1 is disabled." laser1
Disable the printer to be removed
7/30/2019 hp-ux-admin
40/40
Removing a Printer from the LP Spooler contd...
lpadmin -xlaser1
Remove the printer from the LP spooler
lpsched - Restart the LP spooler.
Note:
lpmove laser1 laser2
lpcancel laser1
If there are jobs in the printer's queue decide whether tomove all pending print requests in the request directory
to another printer request directory or to cancel any requests.