Linux Software Installation operation and maintenance

Source: Internet
Author: User
Tags bz2 gpg

Software Installation RPM YUM compilation installation

=================================================================

Common package formats: *.rpm/*.tar/*.tar.gz/*.tar.bz2/*.py/*.bin/*.bundle

=================================================================

Rpm

(see Post command for an explanation of RPM commands)

-----------------------------------------------------------------

Installation method:

*.rpm: Install with RPM or Yum command.

*.tar/*.tar.gz/*.tar.bz2: Unzip first, compile and install according to installation instructions.

*.py: Written in Python language, install according to the installation instructions.

/*.bin/*.bundle: Run the script installation directly. such as: SH *.sh

-----------------------------------------------------------------

Prepare: Mount the *.iso image file on your computer.

[Email protected] mnt]# mount-t iso9660-o loop/home/tools/rhel-server

* * CD and ISO image files are in iso9660 format

**LOOP,-O Specifies the option loop (Loop read), the Mount disc and the mirror must use the loop option.

-----------------------------------------------------------------

RPM-IVH vsftpd-2.2.2-11.el6_4.1.x86_64.rpm

RPM-IVH ftp-0.17-54.el6.x86_64.rpm

RPM-IVH lftp-4.0.9-1.el6.x86_64.rpm

Rpm-qa vsftpd

RPM-QA FTP

Rpm-qa lftp

Service VSFTPD Restart

################################################################

Verify:

FTP 192.168.1.249

Enter User name: FTP

Prompt for password: enter

Ls

Bye exiting FTP operation

#################################################################

Service VSFTPD Stop

-----------------------------------------------------------------

Extended:

vsftpd-2.2.2-11.el6_4.1.x86_64.rpm ==>> software Name-the major version number. This version number-revision number. Support System version. Run the platform. rpm

=================================================================

Yum

(see Post command for a detailed yum command)

Yum-yellowdog Updater Modified. Manage packages with the Yum command.

Pros: 1. Automatically resolve dependencies between software when installing software

2. Multiple simultaneous installation of multiple software

3. The software can be grouped by function for group installation.

How it works: Yum==>yum source ==>yum Warehouse (storage RPM Package) ==> installation package.

-----------------------------------------------------------------

Experiment:

To create a yum repository:

Method One: Mount the rhle6.5 image to a directory in the system. Refer to the following actions:

mkdir/mnt/iso/or

Mount-t Iso09660-o Loop/root/rhel6.iso/mnt/iso

-----------------------------------------------------------------

Law II: Copy the files and directories in the RHEL6.5 system to a directory in the system.

-----------------------------------------------------------------

Experiment two: Create a yum source (Yum *.repo configuration file):

Vi/etc/yum.repos.d/rhel-source.repo Add the following content:

[RHEL65]

Name=rhel65

Baseurl=file:///mnt/iso

Enabled=1

Gpgcheck=1

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

-----------------------------------------------------------------

[Warehouse name]

NAME=RHEL65 ===>> Name Code (this line is not written)

Baseurl=file:///mnt/ios the path of the ===>>RPM package, supported here:file://,/HTTP, ftp://, NFS, and other protocols

Enabled=1 ===>> Enable 1 Disable 0

Gpgcheck=1 ===>> whether to use Gpgcheck, enable 1 disable 0==> improve security

GPGKEY=GPG key File ===>> If gpgcheck=0, this line must be written!

-----------------------------------------------------------------

Experiment Three: Test whether the Yum source, yum repository is available.

Yum clean all clears the Yum cache file

Yum Grouplist View the grouping of packages, you can see multiple lines of Chinese or English grouping names

Yum List view all packages in the Yum Repository, at the beginning of the @ indicates installed

Yum Info vsftpd View description Information for the specified software name

Think: How to count the number of software installed in the system?

Yum List | grep @ | Wc-l

-----------------------------------------------------------------

Extensions: Familiar with Yum's common commands.

Refer to the following actions:

Yum Clean All

Yum Install vsftpd lftp ftp-y installs three software, and Y automatically confirms the installation

Yum Remove Lftp ftp-y

Yum Info vsftpd lftp FTP

Yum provides vsftpd Samba

Yum Search DHCPD Bind

Yum Grouplist

Yum Groupinstall Emacs

Emacs

Yum Groupremove Emacs

Yum GroupInfo Emacs Virtualization

=================================================================

Compile and install (source installation)


Source code: The program source file written by the software developer, the computer does not directly recognize this type, it needs to be compiled and installed before the software can be used.

Open Source Advantage: Developers can be tailored to the needs of the customer, the program is cut, optimized before the use of the customer.

Access to the program source: to the official website of the software download, usually the name of the file suffix: *.tar/*.tar.gz/*.tar.bz2 format.

-----------------------------------------------------------------

Source code to compile the installation method:

1. Download the software's source package

2. Unpacking and unpacking (TAR)

3. Install the GCC compiler, Lib library file: Yum install *gcc*-y

4. Generate the compiled configuration file:./configure

5. Compile and install: Make && do all

-----------------------------------------------------------------

Experiment: Compile and install the HTTPD package

Preparatory work:

[Email protected] ~]# Rpm-qa httpd

Httpd-2.2.15-29.el6_4.x86_64

[[Email protected] ~]# service httpd Stop ===>> instructions installed, but no services are turned on

Stop httpd: [Failed]

[[email protected] ~]#/etc/init.d/iptables stop

[Email protected] ~]# Setenforce 0

[Email protected] ~]# Getenforce

Permissive

-----------------------------------------------------------------

Official installation:

Tar zxvf httpd-2.2.9.tar.gz-c/test

CD httpd-2.2.9/

Ls

./configure

Yum Install *gcc*-y ===>>configure:error:no acceptable C compiler found in $PATH to solve this problem.

./configure ===>> The compilation failed prior to the absence of GCC. Recompile now

################################################################

[[email protected] httpd-2.2.9]# ls Makefile

Makefile ===>> to do the next steps

################################################################

Make && make install

################################################################

Remark: Mkdir/usr/local/apache2/man

Mkdir/usr/local/apache2/man/man1

Mkdir/usr/local/apache2/man/man8

Mkdir/usr/local/apache2/manual

MAKE[1]: Leaving directory '/test/httpd-2.2.9

You can see the installation path and leave the/test/httpd-2.2.9 path

################################################################

echo $? ===>> output 0, indicating success

cd/usr/local/apache2/

[[email protected] apache2]#/usr/local/apache2/bin/apachectl-t ===>> Grammar Check

Hint: Syntax OK ==>> means syntax Yes

[[email protected] apache2]#/usr/local/apache2/bin/apachectl start ===>> start service

[[email protected] apache2]# lsof-i:80 ===>> Check Port

[[email protected] apache2]# ps-ef|grep httpd ===>> Process


Extensions: View IP address:

1.[[email protected] apache2]# ifconfig eth0|grep "inet addr" |awk-f ":" ' {print $ {} ' |awk ' {print '} '

192.168.21.168

2.[[email protected] httpd-2.2.9]# curl-i 192.168.1.162

In the browser address bar, type: 192.168.21.168

Output: "It works" is installed successfully

-----------------------------------------------------------------

* * This post is mainly about compiling and installing, about Apache service specific installation steps see other blog posts * *

=================================================================









This article from "zhangyiling" blog, reproduced please contact the author!

Linux Software Installation operation and maintenance

Related Article

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.