Linux Operations Phase II (iii) Software installation
1. Classification: Source package, binary package
SOURCE package: Excellent (open source, have the ability to modify the source code, can freely choose the required functions, compile and install, more suitable for their own system, stable and efficient, easy to uninstall); Lack of installation steps, especially the large software collection, such as lamp environment, prone to spelling errors; long installation time; Novice is difficult to solve).
Binary package: Excellent (package management is simple, only through a few commands can be installed, upgrade, query, uninstall, installation progress is much faster than the source package); lack (after compiling, no longer see the source code; The feature selection is not as flexible as the source package; the dependencies are cumbersome).
dependency: Tree-dependent(A->b->c), ring-dependent (a->b->c->a), module-dependent (www.rpmfind.net)
2,rpm installation
"httpd-2.2.15-15.el16.centos.1.i686.rpm
2.2.15 software release;-15 number of software releases;el16 software publisher,rhel6.x
"Default installation location:
/etc;/usr/bin;/usr/lib;/usr/share/doc;/usr/share/man
"#rpm full name of-IVH package (install\verbose\hash)
--nodeps does not detect dependencies
--replacefiles replacing file installation
--replacepkgs Replacement Package Installation
--force Mandatory installation, equivalent to the combination of the above two
--test test installation, not actually installed
--prefix specifying the installation directory
"#rpm-UVH Package full name upgrade old version upgrade to the new version, no older version is also installed
#rpm-FVH Package full name freshen old version to upgrade, no older version does not install
#rpm-E package name Uninstall
#rpm-Q Package name query Queries (example:#rpm –qa|grep httpd)
#rpm-qi Package name Information Query Package information
#rpm-QIP Package Query does not install package information
#rpm-QL Package name the installation location of the files in the list query package
#rpm-QF System file name file query system files belong to which package
#rpm-QR Package name recursion dependency
#rpm-QRP Package full name query does not install package dependencies
"#yum-y install package name
#yum-y Remove package name
#yum-y update package name
#yum A package that can be installed in the list query server
#yum List package name Query server for this package
#yum Search keyword on a server and keyword-related packages
#yum Info Package name query Specifies the package information
#yum grouplist query for software groups that can be installed
#yum GroupInfo software included in the " software group name " query software group
#yum Groupinstall " software group name " install software group
#yum groupremove " software group name " Uninstall software group
"Build a disc yum source
#mv Centos-base.repo Centos-base.repo.bak
#vi/etc/yum.repos.d/centos-media.repo
baseurl=file:///mnt/cdrom/ specifying the Yum source location
enabled=1 Yum source file is in effect
Gpgcheck=0 rpm Verification does not take effect
"#rpm-V package name Verify Verify the files in the specified package
#rpm-VF System file name Check if system files have been modified
digital certificate (validation of the package that will be installed)
Features: Installation of the original public key files; When installing the RPM package, The certificate information in the RPM package is compared with the original certificate of the native installation, and the installation and warning is not allowed.
Location:/mnt/cdrom/rpm-gpg-key-centos-6 in CD
in the/etc/pki/rpm-gpg/rpm-gpg-key-centos-6 system
#rpm--import/etc/pki/rpm-gpg/rpm-gpg-key-centos-6
3, "#cpio-OVCB > Documents | Equipment
backup Mode O (out), V (verbose), C (Portable format storage ),b( output block is 5120byte, not pattern 512byte)
#cpio-IVCDU < documents | Equipment
Restore Mode I (in), D ( automatically create a new directory on restore ), u ( overwrite older files with newer files )
#cpio-P target directory
Example:#find. –print | CPIO-OVCB >/root/etc.cpio
#cpio-IVCDU </root/etc.cpio
Note: centos6.x , if you write an absolute path while backing up, the recovery is directly to the absolute path, preferably with a relative path.
Example:#find/boot-print | Cpio-p/tmp/test/
extract the files in the RPM package:
#rpm-qf/bin/ls
#rpm2cpio/mnt/cdrom/packages/core ..... | Cpio-idv./bin/ls
#cp/root/bin/ls/bin/
Note:./bin/ls extracting ls into the current directory
4, "source package installation: decompression;CD decompression directory; View installation documentation (install and readme); pre-compile (./configure--prefix=/usr/ local/apache2/); compiling make; compiling and installing make install
start:#/usr/local/apache2/bin/apachect1 start
Uninstall: Delete the installation directory directly
"Source code package into the patch:
#patch-PN Files < patch files to patch
Note:n is a number, according to the path of the patch file, specify the update location
5, "Script installation program:sebmin Installation
#./setup.sh ( installation location, log location,perl installation location, port, password,SSL not enabled, boot )
6, "Function library Management, classification: static function library, dynamic function library
static function library:*.a, program calls are directly integrated into the program; Excellent (no external data is required for program execution, can be executed directly); Missing (file is large, upgrade is difficult, need to recompile the whole program)
Dynamic Function library:*.so, the program uses the time to call the function library.
#ldd/bin/ls ( query function library for LS invocation )
#ldd-V executable file name ( verbose display of version information )
Note: The normal installation of the software does not need to adjust the function library, if not installed correctly manual installation: 1 Put the library into the specified location /usr/lib or /lib; 2 write the library where it is located/etc/ld.so.conf
#cp *.so/usr/lib
#vi/etc/ld.so.conf
Include ld.so.conf.d/*.conf
/usr/lib
#ldconfig read the library into the cache
#ldconfig -P lists all recognized function libraries in the system cache
From Brother Lian Training
Linux Operations Phase II (III) Software Installation