Linux Learning Summary (4)

Source: Internet
Author: User
Tags chrony

# #软件名称识别 # # #
xvidcap-1.1.7-12.el6.x86_64.rpm
Software name version for system 64-bit
# #软件安装 # #
RPM-IVH name.rpm # #i安装, v Show progress, h encryption
-E name # #卸载
-QL Name # #查询软件生成文件
-QLP name.rpm # #查询软件安装后生成什么软件
-qa Name # #查询安装的所有软件
-qa|grep Name # #查询软件是否安装
-Q Name # #查询软件是否安装
-QP name.rpm # #查询安装后的名字
-QF FileName # #查询文件属于那个安装包
-IVH name.rpm--force # #强制安装
-qi Name # #查询软件信息
-KV name.rpm # #检测软件是否被篡改
-QP name.rpm--scripts # #检测软件安装或卸载过程执行的动作
Yum
Top management tools, the most important function is to solve software dependencies
Yum can be put into use if there are yum sources and configuration sources pointing to the file

Server Source Side
1. Download the ISO image file
Rhel-server-7.1-x86_64-dvd.iso
2. Hang in mirror to/mnt for access
Mount/iso/rhel-server-7.1-x86_64-dvd.iso/mnt
3. Configure the native Yum source to point to
rm-fr/etc/yum.repos.d/*
Vim/etc/yum.repos.d/yum.repo
[Server]
Name=redhat
Baseurl=file:///mnt
Gpgcheck=0
4. Installing Resource sharing services
Yum Install Httpd-y
Systemctl Stop Firewalld
Systemctl Disable FIREWALLD
Systemctl Start httpd
Systemctl Enable HTTPS
5. Create a shared directory, hang it in the mirror to the shared directory
Mkdir/var/www/html/redhat
Mount/iso/rhel-server-7.1-x86_64-dvd.iso/var/www/html/redhat
6. Testing
Browser Input:/HTTP//native Ip/redhat
You can see what's in the image
7. Modify the native Yum source to point to
Vim/etc/yum.repos.d/yum.repo
[Server]
Name=redhat
Baseurl=file:///var/www/html/redhat
Gpgcheck=0
8. Auto mount image on boot
Vim/etc/rc.d/rc.local
Mount/iso/rhel-server-7.1-x86_64-dvd.iso/var/www/html/redhat
: Wq
chmod +x/etc/rc.d/rc.local

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

Client pointing End
Vim/etc/yum.repos.d/xxx.repo # #仓库指向文件位置
[XXX] # #仓库名
NAME=XXX # #仓库描述
baseurl=ftp://http://file://# #仓库位置
Gpgcheck=0 # #不检测gpgkey

Example
[Software]
Name=software
Baseurl=http://172.25.27.100/redhat
Gpgcheck=0

Yum Clean all # #清空yum缓存, identifying new configurations
Yum command
Yum Install Softwarename # #安装
Repolist # #列出yum源信息
Remove Softwarename # #卸载
List Softwarename # #查看源中是否有软件
List all # #列出所有软件名称
List Installed # #列出已经安装的软件
List Available # #列出可以安装的软件
Clean All # #清空yum缓存
Search Softwarename # #根据软件信息搜索软件名称
Whatprovides FileName # #在yum源中查找包含filename的文件
Update # #更新软件
History # #查看系统软件及改变历史
Reinstall Softwarename # #重新安装软件
Info Softwarename # #查看软件信息
Groups List # #查看软件组信息
Groups Info Softwaregroup # #查看软件组内包含软件
Groups install Softwaregroup # #安装组件
Groups Remove Softwaregroup # #卸载组件
# # #时间同步 # #
1. Service-side
Yum Install Chrony-y
Vim/etc/chrony.conf
# Allow NTP Client access from local network
Allow 172.25.254.127
# Serve Time even if not synchronized to any NTP server.
Local stratum 10
Systemctl Restart Chronyd
Systemctl Stop Firewalld
2. Client
Vim/etc/chrony.conf
#server 0.rhel.pool.ntp.org Iburst
#server 1.rhel.pool.ntp.org iburst==> Server Ntpserverip iburst
#server 2.rhel.pool.ntp.org iburst==>
#server 3.rhel.pool.ntp.org Iburst
Systemctl Restart Chronyd
Test:
Chrony sources-v
# # #timedatectl命令 # #
Timedatectl Status # #显示当前信息
Set-time # #设定当前时间
Set-timezone # #设定当前时区
SET-LOCAL-RTC # #设定是否使用utc时间 1 Open 0 off
List-timezones # #查看所有时区
# # #设备的访问 # #
1/mounting of the device
Mount Device mount point
MOUNT/DEV/SDB1/MNT # #把系统第二块硬盘里的第一个副区挂在到/mnt
2. Uninstalling the device
Umount Equipment | mount point
3. Workaround when device is being occupied
FUSER-KVM Device | mount point-k kill,-v display information,-m scan device
# # #软硬连接 # #
Ls-i # #查看文件节点号
Ln-s/file/file1 # #软链接
Ln/file/file1 # #硬链接
# # #文件查找 # #
1.locate filename
2.find
Find Lookup Location-condition condition value-exec action {} \;
-name Name
-user Users
-group Group
-size size
-perm
--maxdepth
--mindepth


Linux Learning Summary (4)

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.