006day -- linux basic rpm and yum usage and source code installation, 006day -- linuxyum

Source: Internet
Author: User

006day -- linux basic rpm and yum usage and source code installation, 006day -- linuxyum

I. Introduction to rpm-related commands

1. view all files in CD

 

2. Use rpm to install an rpm package named vsftpd

 

3. rpm-qi software package name (View Software Package details)

 

4. rpm-ql package name (check where the package is installed)

 

5. rpm-qa | grep software package name (check whether a software package is installed from all installations)

 

6. Mount/opt/to/dev/sr0

 

Ii. yum source commands

1. cd/etc/yum. repos. d/view the network yum Source

 

2. Move these network yum sources to the/tmp/bak/directory, and create a local yum source local. repo

 

3. Local yum Source Content

[Local]

Name = local repo

Baseurl = file: // opt

Enabled = 1

Gpgcheck = 0

 

4. yum clean all is used to clear the yum Cache

 

5. yum-y install epel-* install all epel-related packages

 

6. yum makecahe-y is used to build the cache. It will be much faster to download the package later.

 

7. view the cat/etc/yum. conf file

 

8. Open the/etc/yum. conf file and rewrite it.

Cachedir =/rpm_bak)

Keepcache = 1 (changed from 0 to 1)

 

9. yum erase httpd-*-y Delete httpd-All packages

 

10. Delete related packages dependent on httpd

Rpm-e mailcap

Rpm-e apr-util

Rpm-e apr

 

 

11. Create a repository by yourself to package the software you want to develop and its Dependencies

Mkdir/cangku_httpd

The following cp command is used to simulate the migration of software downloaded from the internet or created by yourself to the new local repository.

Createrepo/cangku_httpd/is very important! Establish the dependencies of the packages in this repository. If you do not have the create tool, you need to download and install yum on your own.

 

Just now, I copied a package tool.

 

 

12. Remove the original network yum Source

 

13. Create a local yum Source

 

[Httpd]

Name = httpd server

Baseurl = file: // cangku_httpd

Enabled = 1

Gpgcheck = 0

 

14. yum-y install httpd. Then you can install your local repository and yum source.

By the way, don't forget to move those network yum sources back. They are still useful.

 

Iii. Source Code Installation

1. yum groupinstall

Then yum groupinstall 'development tool'-y

2. tar xvf python. tgz

Cd to the python directory after unpacking

Run the following installation program. The installation path of the source code is followed by the equal sign.

 

3. yum install zlib *-y missing a package about zlib. Now install it

 

4. make indicates compilation. & indicates executing the following command when the preceding command is successfully executed.

 

5. cd to/user/local/python3.6/, and then ls to view the relevant directory

 

6. PATH =/user/local/python3.6/bin: $ PATH Add the global environment variable, which takes effect only on the current terminal.

Vim/etc/profile add two lines to the minimum configuration file for environment modification

PATH =/user/local/python3.6/bin: $ PATH
Export PATH

Source. bash_profile (refresh now)

 

7. Summary

 

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.