I. Linux application Fundamentals 1, Application-to-system command relationship file location main purpose

Source: Internet
Author: User
Tags gpg fully qualified domain name

First, the Linux application Foundation
1. The relationship between application and system commands
File location
Main purpose
Use environment
Run format
2, Linxu the type of package
Rpm
Deb
Source Code Package
Packages with installation programs
Install-Free Packages

Second, use the RPM package management tool
1, RPM Package command format
Software name-version number. This version number. Hardware platform. rpm

rpm包与源代码包的区别:a、rpm包的功能没有源代码的强大b、rpm包安装管理要比源代码简单方便c、rpm包版本通常比源代码包的低

2, RPM Package management tool is---RPM command
Features of the RPM command:
A, query, verify RPM package information
b, install, upgrade, uninstall RPM package
C. maintain RPM Database information

  1) query A, query the installed RPM package format: rpm-q[sub-option] RPM Package name sub-option: A: All I: Details L: List C: Profile D: Document Information F: View the specified file or target from which RPM package format: RPM-QF file or directory B, query not installed RPM package format: rpm-qp[sub-option] RPM package Full name sub-option: I: Details L: List C: Profile D: Document information to see if a Lyn is installed    X Package #rpm-Q lynx or #rpm-qa lynx or #rpm-qa |grep lynx to view the configuration files generated by httpd? The first step is to confirm whether the RPM is installed #rpm-Q httpd installed: #rpm-QC httpd not installed: 1) put the image into the virtual machine's Optical drive 2) into the #cd/media/centos_6.5_    FINAL/PACKAGES/3) View #rpm-qpc httpd-2.2.15-29.el6.centos.x86_64.rpm View the document files generated by httpd? The first step is to confirm whether the RPM is installed #rpm-Q httpd installed: #rpm-qd httpd not installed: 1) put the image into the virtual machine's Optical drive 2) into the #cd/media/centos_6.5_    FINAL/PACKAGES/3) View #rpm-qpd httpd-2.2.15-29.el6.centos.x86_64.rpm view command Useradd, generated by that RPM? First step: View the file corresponding to the command # which useradd/usr/sbin/useradd Part II: View the file generated by that RPM package # Rpm-qf/usr/sbin/useradd shadow- utils-4.1.4.2-13.el6.x86_64  

[[email protected] ~]# Configure document from
[[email protected] ~]# See RPM package vsftpd what files or directories will be generated? ^c
[[email protected] ~]# View RPM package elinks details? ^c
[[email protected] ~]# DF
Filesystem 1k-blocks used Available use% mounted on
/dev/mapper/vg_ Centos6node1-lv_root 38776280 5818208 30988308 16%/
Tmpfs 506176 224 505952 1%/dev/shm
/dev/sda1 495844 34897 4353 8%/boot
/dev/sr0 4363088 4363088 0 100%/media/centos_6.5_final
[[email protected] ~]# Cd/media/centos_ 6.5_final/
[[email protected] centos_6.5_final]# cd packages/
[[email protected] Packages]# RPM-QPL vsftpd-2.2.2-11.el6_4.1.x86_64.rpm ^c
[[email protected] packages]# rpm-qpi elinks-0.12-0.21.pre5.el6_3. x86_64.rpm ^c

  2) Install, upgrade, uninstall RPM Package Installation: RPM-IVH RPM Package Full name rpm-u RPM Package Full name (if installed then upgrade, install without installation) Upgrade: Rpm-u RPM Package Full name rpm -F RPM Package full name uninstall: rpm-e RPM package Name option:--force: Force--nodeps: Ignore dependencies-H: Show installation progress with ' # '-V: Show Details install RPM package VSFTPD? 

[Email protected] ~]# rpm-q vsftpd
Package vsftpd are not installed
[[email protected] ~]# DF
Filesystem 1k-blocks used Available use% mounted on
/dev/mapper/vg_centos6node1-lv_root 38776280 5818236 30988280 16%/
Tmpfs 506176 224 505952 1%/dev/shm
/DEV/SDA1 495844 34897 435347 8%/boot
/dev/sr0 4363088 4363088 0 100%/media/centos_6.5_final
[Email protected] ~]# cd/media/centos_6.5_final/packages/
[Email protected] packages]# RPM-IVH vsftpd-2.2.2-11.el6_4.1.x86_64.rpm
Warning:vsftpd-2.2.2-11.el6_4.1.x86_64.rpm:header V3 rsa/sha1 Signature, key ID C105b9de:nokey
Preparing ... ########################################### [100%]
1:VSFTPD ########################################### [100%]
[Email protected] packages]# rpm-q vsftpd
Vsftpd-2.2.2-11.el6_4.1.x86_64
[Email protected] packages]#

卸载rpm包lynx?

[Email protected] ~]# Rpm-q Lynx
Lynx-2.8.6-27.el6.x86_64
[Email protected] ~]# RPM-E Lynx
error:failed dependencies:
Text-www-browser is needed by (installed) Docbook-utils-0.6.14-25.el6.noarch
[[email protected] ~]# rpm-e Lynx--nodeps//--nodeps Uninstall Ignore dependencies
[Email protected] ~]# Rpm-q Lynx
Package Lynx isn't installed
[Email protected] ~]#

3)维护rpm数据库信息   重建RPM数据库rpm --rebuilddb  或 rpm --initdb   导入验证公钥    rpm --import  公钥存放的文件

[[email protected] ~]# DF
Filesystem 1k-blocks used Available use% mounted on
/dev/mapper/vg_ Centos6node1-lv_root 38776280 5813696 30992820 16%/
Tmpfs 506176 224 505952 1%/dev/shm
/dev/sda1 495844 34897 4353 8%/boot
/dev/sr0 4363088 4363088 0 100%/media/centos_6.5_final
[[email protected] ~]# Cd/media/centos_ 6.5_final/
[[email protected] centos_6.5_final]# ls
Centos_buildtag images repodata Rpm-gpg-key-centos-testing-6
EFI isolinux rpm-gpg-key-centos-6 TRANS. TBL
EULA Packages rpm-gpg-key-centos-debug-6
GPL release-notes-en-us.html rpm-gpg-key-centos-security-6
[ [Email protected] centos_6.5_final]# rpm--import K

Automatically resolve the dependency of the RPM package--yum:
1, the CentOS 6.5 CD into the virtual machine's CD-ROM, automatically mount the
2, confirm the automatic Mount Success
[[email protected] ~]# DF
Filesystem 1k-blocks used Available use% mounted on
/dev/mapper/volgroup-lv_root 18069936 4942316 12209708 29%/
TM PFS 1019324 224 1019100 1%/dev/shm
/dev/sda1 495844 39955 430289 9%/boot
/dev/sr0 3762278 3762278 0 100%/media/Ce Ntos_6.5_final (OK)
3, modify the client configuration file for Yum
#rm-rf/etc/yum.repos.d/*
#vim/etc/yum.repos.d/rhel-source.repo
[Rhel-source]
name=red Hat Enterprise Linux
baseurl= ' file:///media/CentOS_6.5_Final '
enabled=1
Gpgcheck=0
4, install RPM package
#yum-y Install package name
5, uninstall RPM package
#yum-y Remove package name

Third, compile the installer from source code
Prerequisite: The system must have GCC, and make environments installed
[Email protected] ~]# gcc--version
GCC (gcc) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright? Free Software Foundation, Inc.
This procedure is free software; Please refer to the copyright notice of the source code. The software does not have any warranties;
Includes no warranties of merchantability and fitness for a particular purpose.
[email protected] ~]# make--version
GNU make 3.81
Copyright (C) 2006 free Software Foundation, Inc.
This was free software; See the source for copying conditions.
There is NO warranty; Not even to merchantability or FITNESS for A
Particular PURPOSE.

This program built for X86_64-REDHAT-LINUX-GNU
1. Unpacking
Purpose: Unzip and release the source code package into the specified directory

2. Configuration
Purpose: Set the installation directory, installation module and other options

3. Make compile
Purpose: Generate executable binary files

4. Install Make Isntall
Purpose: Copy binary files to system, configure application environment

Install the httpd-2.2.17.tar.gz software through source code to ensure that the Web service is functioning properly.
[[email protected] ~]# ls
anaconda-ks.cfg firefox-3.0.10.tar.gz install.log.syslog vmware-tools-distrib Video Download
A.txt httpd-2.2.17.tar.gz pass public picture music
B.txt install.log realplayer11gold.rpm Template document Desktop
[[Email prot Ected] ~]# tar zxf httpd-2.2.17.tar.gz-c/usr/src/^c
[[email protected] ~]# ls/usr/src/
Debug Kernels
[[ Email protected] ~]# tar zxf httpd-2.2.17.tar.gz-c/usr/src///Unpack
[[email protected] ~]# ls/usr/src/
Debug httpd-2.2.17 kernels
[[email protected] ~]# cd/usr/src/httpd-2.2.17///Enter into httpd released directory
[[email  protected] httpd-2.2.17]#./configure--prefix=/usr/local/apache; make; Make install//configure, compile, install

Start the service
[[email protected] httpd-2.2.17]#/usr/local/apache/bin/apachectl start
Httpd:apr_sockaddr_info_get () failed for Centos6-node1
Httpd:could not reliably determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName
[[email protected] httpd-2.2.17]# NETSTAT-ANPT |grep:80//See if Startup is successful
TCP 0 0::: +:::* LISTEN 45291/httpd

Verify:
Enter Firefox in Xshell to open the browser, and then enter 127.0.0.1 in the Address bar; You can see it works, then install OK.

I. Linux application Fundamentals 1, Application-to-system command relationship file location main purpose

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.