Linux Learning Note 8

Source: Internet
Author: User
Tags time zones chrony

Software Installation

1. Software name recognition
[abrt-add-ccpp]-[2.1.11-19]. [e.17]. [x86_64].rpm rpm end of applicable with Redhat operating system
||         ||        || ||
Software name software version use version number of bits

2. Software Installation
1) rpm
Rom-i name.rpm Installation
-V name.rpm Show installation Progress
-H name.rpm Develop encryption method
-E name Uninstall
-QL Name Query Software installation file
-QLP name.rpm Query the files that need to be installed
-QA all software installed in the query system
-QA |grep name socialize software is installed
-Q name ...
-QP name.rpm Query Package after installation name
-QF filename to see which installation package the filename belongs to
-IVH name.rpm--force Forced installation
-qi name View software information
-KV NAME.RPM detects if the package has been tampered with
-QP name.rpm--scripts detection software actions performed during installation or uninstallation

2.yum
Yum Upper Software Management tool, the most important function is to solve the software dependencies
Yum can be used only if there is a Yum source, as well as the configuration source pointing to the file

Server Source Side
1. Download the native system-matching ISO image file from the network
Rhel-server-7.1-x86_64-dvd.iso

2. Hang the Rhel-server-7.1-x86_64-dvd.iso to/mnt to access the files in the image
Mount Rhel-server-7.1-x86_64-dvd.iso/mnt

3. Configure the native Yum source to point to
rm-rf/etc/yum.repos.d/*
Vim/etc/yum.repos.d/yum.repo
[Server]
name=rhel7.1
Baseurl=file:///mnt
Gpgcheck=0

4. Installation Resource Configuration
Systemctl Stop Firewalld
Systemctl Disable FIREWALLD
Systemctl Start httpd
Systemctl Enable httpd

5. Create a shared directory and hang it in the image file to a shared directory
mkdir/var/www/html/rhel7.1
Umount/mnt
Mount rhel-server-7.1-x86_64-dvd.iso/var/www/html/rhel7.1
You can see what's in the image

6. Testing
Enter in the browser:/HTTP//native ip/rhel7.1
You can see what's in the image

7. Modify the native Yum source to point to
[Server]
name=rhel7.1
baseurl=file:///var/www/html/rhel7.1
Gpgcheck=0

8. Boot automatically hangs in ISO
Vim/etc/rc.d/rc.local
mount/iso/rhel-server-7.1-x86_64-dvd.iso/var/www/html/rhel7.1
: Wq

chmod +x/etc/rc.d/rc.local

9. Building of third-party software repositories
Put all RPM packages in a directory where only rpm files are available
Createrepo-v/rpm Storage Directory
Vim/etc/yum.repos.d/xxx.repo
[Wow]
Name=wow
BASEURL=FILE:///RPM Storage Directory
Gpgcheck=0

Client pointing End
Vim/etc/yum.repos.d/xxxx/repo warehouse point to File location
[xxxx] Custom software warehouse Name
Name=xxx Custom House Arrest a warehouse description
baseurl=ftp://|http://|file://Warehouse Location
Gpgcheck=0 does not detect Gpgkey
Gpgkey represents the logo of the software produced

Example:
Vim/etc/yum.repos.d/yum.repo
[Server]
name=rhel7.1
baseurl=ftp://172.25.0.254/pub/rhel7.1
Gpgcheck=0
: Wq

Yum clean all clears the Yum cache to identify the new configuration

Yum command
Yum Install Softwarename Installation
Repolist List settings Yum source information
Remove Softwarename Uninstall
List Softwarename See if this software is available in the software source
List all lists all software names
List INSTALLD lists all installed software names
List available lists the software names that can be installed with Yum
Clean all empties the Yum cache
Search Softwareinfoe software name based on software information
Whatprovides filename Find the software that contains the filename file in the Yum source
History View System house arrest change
Update Updates Software
Reinstall Softwarename Reinstall software
Info Softwarename viewing software information
Groups List View software group information
Groups Info Softwaregroup View software included in the software group
Groups Install Softwaregroup Installation Kit
Groups remove Softwaregroup unload assembly


Four, time synchronization
1. Service-side
Yum Install chrony-y installation Service
VIM/ETC/CHRONY.CONF Master configuration file
#Allow NTP CLIENT Access from the local network
Allow 172.25.25.0/24 who is allowed to sync my time
Serve time even if not synchronized to any NTP server
Stratum Local 10 Do not sync anyone's time, time sync server

Systemctl Restart Chronyd
Systemctl Stop Firewalld

Client
Vim/etc/chrony.conf
3
4====>
5====>server 172.25.25.250 Iburst
6

Systemctl Restart Chrony

Test
Chrony sources-v


Five, Timedatectl command
Timedatectl Status Reality current time information
Set-time Setting the current time
Set-timezone Setting the time zone
Set-local-rtc 0|1 set UTC time; 1 is open; 0 is off
List-timezones View all time zones





Unit access to devices in Linux

1. Device Access
1. Equipment identification
/DEV/XDXN Hard Drive Device | Example:/DEV/SDA1
/dev/cdrom Optical Drive
/dev/mapper/* Virtual Appliance


2. Discovery of equipment
Fdisk-l viewing real-world devices (root)
Devices that the Cat/proc/partitions system can identify
Blkid to see which device ID the system can mount
DF to see if the device is being used by the system

3. Setting up Other uses
Mounting of the device
Mount device hangs at point
Mount/dev/sdb1/mnt the first sub-zone in the second hard drive to/mnt
Uninstalling the device
Umount Equipment | mount point
Solve the problem
FUSER-KVM Device | Hang at point-K kill,-V show details-m scan device

2. Soft and Hard links
Ls-i View File Node number
Ln-s/file/file Soft Link
Ln/file/file Hard Links

3. File Search
1.locate filename searches the file database for filename information, updatedb updates the database
2.find Find location-condition condition value-exec action {} \;
-name Name
-user Users
-group Group
-size size
-perm
--maxdepth
--mindepth
-A "and" meet two conditions
-O "or" two conditions to satisfy one

Linux Learning Note 8

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.