HP-UX system installation commands

Source: Internet
Author: User

Common HP-UX commands

1. Use the CD command
Returns the last directory (CD -)
2. Use of the ESC key
In the command line, you can press the ESC key twice to match the unique file name in the current directory, which saves the time to insert a long file name.
3. Use of the col command
Man CP | col-B> cp.txt
This command can export a text file named cp.txt
4. Work script executed when the machine is started (/etc/rc. config. d /)
5. Use the which command (view the absolute path of a command)
Which command name
6. display the current system patch installation status (show_patches)
7. Chinese environment Configuration
A. view the language set installed in the system (locale-)
B. display the environment variable of the current language (echo $ Lang)
C. Modify it if it is not Chinese (export lang = zh_cn.hp15cn)
D. sty-istrip
8. view system information and running status
A. glance
B. Top
C. Performance View
D,/opt/ignite/bin/print_manifest
/Var/opt/ignite/local/manifest
E,/var/adm/syslog (System Operation Log)
F,/var/adm/shutdownlog
G,/var/adm/crash/
H,/var/opt/SNA. Err
I,/var/adm/Nettl. log000
/Usr/sbin/netfmt/var/adm/Nettl. log000> net. Log
J,/usr/contrib./bin/info_col.11
K./var/adm/btmp (historical logon information can be viewed using the last command)
L,/var/adm/wtmp (more detailed information than btmp)
M,/etc/rc. Log (Information on machine startup)
N,/var/adm/SW/(information about software package installation and deletion)
9. view the current init level of the system (WHO-R)
10. Display historical records of unsuccessful system Logon (lastb-R)
11. FTP problems (if a user cannot be used for FTP)
A. Change the user's sh path in/etc/passwd to/usr/bin/KSh.
B. Add the KSh path to the/etc/shells file.
12. In the hp11i environment, the rlogin, RCP, and FTP rates of the two hosts are less than 10 Mbps.
A. Install patches (phkl_25233, 25389, phne_26728, and 27063)
13. In the hp11i environment, the ping command between the host and the vro cannot be used.
A. Add the ip_send_source_quench parameter configuration in the/etc/rc. config. d/nddconf file of the host.
B. NDD-C
14. You can modify the network configuration (including the NIC address, activation status, and route address) by modifying the/etc/rc. config. d/netconf file.
15. Use of the swapinfo command
Swapinfo-MT
16. What command is used (if you want to view the cause of a core file)
What Core
17. How to control a specific address to access the host through telnet, FTP, and login protocols
/Var/adm/inetd. Sec
18. Use of TSM
In the TSM status, you can use ctrl W to switch the screen.
19. Use of the finger command
Finger-R (view the client information currently logged on to the host)
20. Use of the parstaus command
Parstatus-P <cell num> to view information about a specific partition.
 

How to expand the File System

1. vg00 (for example, expand/home to 2 GB, and the logical volume name is/dev/vg00/lvol8)
1. shutdown-Y 0 enters single-user mode
2. umount/home
3. lvextend-l 2000/dev/vg00/lvol8
4. extendfs/dev/vg00/rlvol8
5. Mount/dev/vg00/lvol8/home
6. Reboot
II. If VG is not in MC
Except do not start or stop the machine.
Iii. configuration of VG in MC
1. If an application runs on this logical volume and does not stop the application, for example, expand/data to 6 GB and the logical volume name is/dev/vgdata/lvdata, the MC environment is node1 and node2, and the application package name is PKG. It runs on node2 by default)
A. cmhaltpkg-V PKG
B. vgchange-C n/dev/vgdata
C. vgchange-A y/dev/vgdata
D. lvextend-l 6000/dev/vgdata/lvdata (expanded to 6 GB)
E. extendfs/dev/vgdata/rlvdata (for example, for bare devices, e-N is not supported .)
F, vgexport-p-v-S-M/tmp/vgmap/vgdata. MAP/dev/vgdata
G, RCP/tmp/vgmap/vgdata. Map node1:/tmp/vgmap/vgdata. Map
H. rlogin node1
I, ll/dev/vgdata (view the device Number of vgdata on node1, assuming 0x0c0000)
J. vgexport/dev/vgdata
K, mkdir/dev/vgdata
L. mknod/dev/vgdata/group C 64 0x0c0000
M, vgimport-S-v-M/tmp/vgmap/vgdata. MAP/dev/vgdata
N, exit
O, vgchange-a n/dev/vgdata
P, vgchange-c y/dev/vgdata
Q. cmmodpkg-e PKG
2. If no application runs on the logical volume or the application can be paused (for example, to expand/data to 6 GB, the logical volume name is/dev/vgdata/lvdata, the MC environment is node1 and node2, and the application package name is PKG. It runs on node2 by default)
1. Change a-C in the previous case to (stop the application that involves the logical volume, and select the appropriate time to execute the task ):
A. Stop the application that involves the logical volume.
B. umount/Data
2. Execute D-N in the previous case.
3. Change o-Q in the previous case
A. Mount/Data
B. Activate the application involving the logical volume

NOTE: If PV is not added to VG, you can skip the F-N in the preceding step.

I.
After UNIX is installed, compile the original version before the file system is created.
* Note: Because my machine has only one disk, most operations except creating logical volumes can be omitted in this step.
① Create a physical volume.
Find the disk-related Device File: ioscan (command): ioscan-func disk.
Find the device file name corresponding to disk: c1t15d0
Because there is only one disk, only one physical volume can be created.
Before creating a disk, use mediainit to format and verify the disk integrity:
# Mediainit/dev/rdsk/c1t15d0
L create a physical volume:
# Pvcreate/dev/rdsk/c1t15d0
Note: If the disk is entered as part of a volume group at this time, you are sure you want to create a physical volume. Add "-F" to the command line for forcible execution.
② Create a volume group. (Only for understanding, not required by the system)
1. Create a directory under/dev with the volume group name.
If the volume group name is vg01, the directory is/dev/vg01.
# Mkdir/dev/V1. 1.
Create a set of device files for the volume group in this directory.
# Mknod/dev/vg01/group C 64 0 0x010000
Create a volume group (with the physical volume as the parameter ):
# Vgcreate/dev/vg01/dev/DSK/c1t15d0.
After creation, run the command: vgdisplay to check whether the settings are correct.
③ Create a logical volume.
When creating a logical volume, the corresponding character devices and Block devices are generated under the volume group directory.
Now, create the following logical volume in the default volume group vg00:
A 256 MB logical volume named lvoltuxlog.
# Lvcreate-L 256-N lvoltuxlog.
Parameter:-L indicates the logical volume size in MB.
-N indicates the logical volume name. The default value is lvol1, lvol2 ......
2. Create a file system.
Note: After the system is installed, some file systems and directories are automatically created. Therefore, users with General permissions can install software in the/home directory. However, if there are too many software, it will cause confusion and is not conducive to management. The most suitable practice is that high-Permission users can create some file systems in separate directories. This will be very advantageous for future (logical volume) Expansion and maintenance.
(1) Introduction to the file system:
1. High-Performance File Systems (HfS), now there are not many applications, only used to store the HP-UX kernel.
2. The most widely used Log File System (JFS.
3. Network File System (NFS ).
4. The CD-ROM File System (CDFs) is used to store files on a CD-ROM.
(2) create a new file system:
The file system must be created on a logical volume.
1. Create a file system in newfs:
Run the following command to create a JFS File System on/dev/vg00/lvoldb01:
# Newfs-F vxfs/dev/vg00/lvoltuxlog.
2. Mount the file system.
Mount:
Mount/dev/vg00/lvoltuxlog to the/TUXEDO/log directory. (Create this directory in advance. For details, see * annotation 1 below)
# Mount-F vxfs/dev/vg00/lvoltuxlog/TUXEDO/log.
Currently, BDF is available to display all pending volumes.
* Note 1: Create/TUXEDO/log: # mkdir TUXEDO/log in the root directory. (3) Extend the volume group: (if the disk space is insufficient in the future, you can expand the volume group)
Add a disk, use pvcreate to create a physical volume, and then use vgextend to add it to the volume group.
For example, add the disk c0t3d0 to the volume group vg00:
# Pvcreate/dev/rdsk/c0t3d0
# Vgextend vg00/dev/DSK/c0t3d0
Use # vgdisplay-V vg00 to check whether the expansion is successful.
(4) Extend the logical volume.
After the volume group is expanded, you can use the lvextend command to expand the logical volume size.
For example, extend/dev/vg00/lvoltuxlog to 800 mb. (256 MB previously ).
# Lvextend-l 800/dev/vg00/lvoltuxlog
To expand the logical volume on a specific disk, you can add the disk device file as a parameter to the end of the lvextend command.
# Lvextend-l 800/dev/vg00/lvoltuxlog/dev/DSK/c0t3d0
(5) Extend the file system.
If the Logical space is extended, the file system space cannot be automatically extended. Expand the JFS File System Under/dev/vg00/lvoltuxlog.
1. Uninstall # umount/TUXEDO/log first.
2. # extendsf-F vxfs/dev/vg00/lvoltuxlog.
3. Mount # Mount-F vxfs/dev/vg00/lvoltuxlog/TUXEDO/log.
After completing the preceding operations, you can run the BDF command to check whether the allocation is successful.

****************************
Modify/etc/fstab
Breakthrough in large file systems: 2 GB
You can modify the fstab file in the following format:
/Dev/vg01/lvol1/app2 vxfs RW, SUID, largefiles, delaylog, datainlog 0 2

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.