Some basic user management and basic installation methods

Source: Internet
Author: User
Some basic user management and basic installation methods
 
Source: Linux Forum Date: 2010.03.24 (2 comments in total) I want to comment
 
[QQ] 53663872 [/QQ]
First. Online User management commands
Users

# Who

# Startx --: 1 enable a graphical interface

# W

# Last Record logon success Information

# Lastb record logon Failure Information

# Lastlog records the last logon information of each account

# Wall is used to broadcast messages
# Wall "" Hello everyone"

# Mesg displays whether the current message is accepted

# Mesg n sets the current accepted message status to unacceptable, except for messages sent by administrators

# Write unicast
# Write Username

Second. Disk Management
# DF-H display File System

# Fdisk-l view disk partitions

: Fdisk/dev/SDA partition/SDA
A toggle a bootable flag <--- identify a partition as bootable
B edit BSD disklabel <--- edit a partition label
C toggle the DOS compatibility flag
D delete a partition <---- delete a partition
L List known partition types <----- List partition types
M print this menu <------- help
N Add a new partition <------ create a partition
O create a new empty DOS partition table
P print the Partition Table <------ print the Partition Table
Q quit without saving changes <------ do not save and quit
S create a new empty sun disklabel
T change a partition's System ID <----- change the system ID of a partition
U change display/entry units
V verify the Partition Table
W write table to disk and exit <----- Save the Partition Table
X extra functionality (experts only)

# Partprobe (generating device files)

# Mkfs. ext3/dev/sda10 (format the file type of the device file)
# Mkfs-T vfat/dev/sda11 (both FAT32 and fat16 are classified as vfat)

Partition steps:
1. fdisk/dev/SDA
2. Generate a device file
Partprobe
3. format the new partition.
# Mkfs. ext3/dev/sda10
# Mkfs-T vfat/dev/sda11
4. Mount the formatted partition for temporary mounting: # Mount-T ext3/dev/sda10/mnt/sda10
# Mount-T vfat/dev/sda11/mnt/sda11
Supplement:
Mount-o loop, RO/share/rhel-5.3.iso/mnt
Mount-O ro-T iso9660/dev/CDROM/mnt
Mount -- bind/etc // tmp/test

Permanent mount:
# Vim/etc/fstab

Label = // ext3 defaults 1 1
Label =/DF ext3 defaults 1 2
Label =/home ext3 defaults 1 2
Label =/usr ext3 defaults 1 2
Label =/boot ext3 defaults 1 2
Tmpfs/dev/SHM tmpfs defaults 0 0
Devpts/dev/PTS devpts gid = 5, mode = 620 0 0
Sysfs/sys sysfs defaults 0 0
Proc/proc defaults 0 0
Label = SWAP-sda3 swap defaults 0 0

Whether dump backup is supported or not

/Dev/sda10/mnt/sda10 ext3 defaults 0 0
/Dev/sda11/mnt/sda11 vfat ults, RO 0 0
/Dev/sda12 swap defaults 0 0
Or the volume form
Label =/Hello/mnt/sda10 ext3 defaults 0 0

Change the volume label (ext2 and ext3 file systems are supported)
# E2label/dev/sda2
View the sda2 volume label of the partition
# E2label/dev/sda5/Vmware
Change sda5 volume label name

Create swap Partition

Mkswap/dev/sda12 (mkswap-l SWAP-sda12/dev/sda12)
Swapon/dev/sda12
Swapoff/dev/sda3

========================================================== ================================================== Software Package install
Classification of software packages:
Rpm <---- Red Hat package management
Rpm source package
C language source code package <--- unrelated to the platform
Binary Package <--- directly run the package to install
RPM package
CD or network
Http://www.rpmfind.net/
Http://www.pbone.net/

Naming Conventions:
Acl-2.2.47-4.fc11.i586.rpm
Acl-2.2.23-5.3.el4.src.rpm
Acl-2.2.49-4.fc13.src.rpm
Acl-2.2.49-2.fc12.ppc.rpm

RPM package installation
Example 1: Virtual Machine Installation
Rpm-IVH VMware-workstation-6.0.2-59824.i386.rpm
I Installation
V shows the installation progress
H verification package

Example 2:
Rpm-IVH heartbeat-2.1.3-3.el5.centos.i386.rpm

Warning: heartbeat-2.1.3-3.el5.centos.i386.rpm: Header V3 DSA Signature: nokey, key ID e8562897
Error: Failed dependencies:
Heartbeat-PILS = 2.1.3-3. el5.centos is needed by heartbeat-2.1.3-3.el5.centos.i386
Heartbeat-stonith = 2.1.3-3. el5.centos is needed by heartbeat-2.1.3-3.el5.centos.i386
Libpils. so.1 is needed by heartbeat-2.1.3-3.el5.centos.i386
Libstonith. so.1 is needed by heartbeat-2.1.3-3.el5.centos.i386
Solution:
1. Download these packages from the Internet. If you are prompted that a file is missing, you can find them through the dedicated RPM package website.
2. Go to the CD directory and find the software package.
3. If a file is missing, you can query the RPM package on a computer that has installed the software package.
[Root @ DNS server] # updatedb
[Root @ DNS server] # locate libpils. so.1
/Usr/lib/libpils. so.1
/Usr/lib/libpils. so.1.0.0
[Root @ DNS server] # rpm-qf/usr/lib/libpils. so.1
Heartbeat-pils-2.1.3-3.el5.centos

# Rpm-IVH heartbeat-pils-2.1.3-3.el5.centos.i386.rpm
# Rpm-IVH heartbeat-stonith-2.1.3-3.el5.centos.i386.rpm
Then install:
# Rpm-IVH heartbeat-2.1.3-3.el5.centos.i386.rpm

Example 3:

[Root @ bogon soft] # rpm-IVH xlockmore-5.18-2.2.el5.rf.i386.rpm
Warning: xlockmore-5.18-2.2.el5.rf.i386.rpm: Header V3 DSA Signature: nokey, key ID 6b8d79e6
Error: Failed dependencies:
Libxm. so.4 is needed by xlockmore-5.18-2.2.el5.rf.i386
Solution:
[Root @ DNS server] # ls | grep-I libxm
[Root @ DNS server] # rpm-qlp libXmu-1.0.2-5.i386.rpm | grep-I libxm. so.4

[Root @ DNS server] # ls | grep-I openmotif
Openmotif22-2.2.3-18.i386.rpm
Openmotif-2.3.1-2.el5.i386.rpm
Openmotif-devel-2.3.1-2.el5.i386.rpm
[Root @ DNS server] # rpm-qlp openmotif22-2.2.3-18.i386.rpm | grep-I libxm. so.4
Grep: libxm. so.4: No file or directory
[Root @ DNS server] # rpm-qlp openmotif22-2.2.3-18.i386.rpm | grep-I libxm. so.4
[Root @ DNS server] # rpm-qlp openmotif-2.3.1-2.el5.i386.rpm | grep-I libxm. so.4
/Usr/lib/libxm. so.4
/Usr/lib/libxm. so.4.0.1

[Root @ bogon server] # rpm-IVH openmotif-2.3.1-2.el5.i386.rpm
Warning: ../openmotif-2.3.1-2.el5.i386.rpm: Header V3 DSA Signature: nokey, key ID 37017186
Error: Failed dependencies:
Libxp. so.6 is needed by openmotif-2.3.1-2.el5.i386

[Root @ DNS server] # ls | grep-I libxp
LibXp-1.0.0-8.1.el5.i386.rpm
LibXp-devel-1.0.0-8.1.el5.i386.rpm
LibXpm-3.5.5-3.i386.rpm
LibXpm-devel-3.5.5-3.i386.rpm
[Root @ DNS server] # rpm-qlp libXp-1.0.0-8.1.el5.i386.rpm | grep-I libxp. so.6
/Usr/lib/libxp. so.6
/Usr/lib/libxp. so.6.2.0

Common RMP commands:
Scenario 1: Which package does the file come from?
Rpm-qf/file path

Scenario 2: check which files will be released to the directory of the software package I want to install?
Rpm-qlp XXX. rpm

Scenario 3: Check whether a software package is installed.
Rpm-Qa | grep-I xxx_keyword
Or
Rpm-Q package_fullname

Scenario 4: view the files released by the installed software package
Rpm-QL soft_name

Uninstall Software Package
Delete rpm-e

Other RPM commands:
-I. Install a software package that has not been installed, whether it is an earlier version or a new version.
-U to install a software package, but the system must have installed a version earlier than this software package. if the version is not too low, install the new version directly.
-F force install the installation package regardless of the version of the original software package. If similar software has not been installed, it cannot be installed.

Special parameters:
-- Nopre does not execute the script before installation
-- Nopost does not execute the script after installation
-- Force installation. Generally, file conflicts are solved.
-- Nodeps ignores the dependency. Generally, do not use

Rpm source code package Compilation:

# Rpmbuild -- rebuild acl-2.2.47-2.fc9.src.rpm
Wrote:/usr/src/RedHat/RPMS/i386/acl-2.2.47-2.i386.rpm
Wrote:/usr/src/RedHat/RPMS/i386/libacl-2.2.47-2.i386.rpm
Wrote:/usr/src/RedHat/RPMS/i386/libacl-devel-2.2.47-2.i386.rpm
Wrote:/usr/src/RedHat/RPMS/i386/acl-debuginfo-2.2.47-2.i386.rpm

Install the compiled software package:
[Root @ bogon soft] # rpm-IVH/usr/src/RedHat/RPMS/i386/acl-2.2.47-2.i386.rpm
Automatically resolves RPM package Dependencies
Yum
1. Build a yum source (software warehouse: divided into local and Network)
File: // MNT/Server local resource
FTP: // 10.1.1.20/server or FTP: // 10.1.1.1/Server
Http: // 10.1.1.20/server <--- the server does not provide this protocol.

2. Compile the configuration file of the yum client.
[Server]
Name = Server
Baseurl = file: // MNT/server <--- recommended permanent path for everyone
Enabled = 1
Gpgcheck = 0

[Cluster]
Name = Cluster
Baseurl = file: // MNT/Cluster
Enabled = 1
Gpgcheck = 0

[Clusterstorage]
Name = clusterstorage
Baseurl = file: // MNT/clusterstorage
Enabled = 1
Gpgcheck = 0

[Vt]
Name = vt
Baseurl = file: // MNT/vt
Enabled = 1
Gpgcheck = 0

Yum clean all

3. Refresh
Yum list

4. Use

Yum install softname

Yum install softname-y

Update Software List
Yum clean all
Yum list
Yum grouplist

Search software
Yum list | grep-I keyword

Security Group software group:
# Yum groupinstall "development tools"-y

Uninstall
Yum erase softname
Yum groupremove groupname

Steps for installing the source code package:

Example 1: Install NTFS

1. decompress the package to the regular path.

2. Configuration
./Configure <-- generate makefile

Common compilation Parameters
-- Prefix specifies the software installation path

3. Compile
Make <--- compile the source code package according to the previous configuration.
4. Installation
Make install

Usage:
Mount-T ntfs-3g/dev/sda1/mnt/Windows
Or
Ntfs-3g/dev/sda1/mnt/Windows


Install Fuse
CD/usr/src/fuse-xxxx
./Configure
Make
Make install
Modprobe Fuse

Example 2:
Tar-xvf xlockmore-5.29.1.tar.bz2-C/usr/src
./Configure -- enable-allow-root -- without-gtk2 -- without-GTK
Make
Make install

[Root @ bogon ~] # Which xlock
/Usr/local/bin/xlock

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.