Three ways of installing software in Linux

10000 yuan coefficient 2022-01-26 23:46:52 阅读数:132

ways installing software linux

Linux There are three ways to install software in

1、 Which three ways ?
    rpm install
    yum install
     Source code compilation and installation
2、 difference
    rpm The installation is similar to windows Installation package in , Download it and install it directly . The disadvantage is that you can't solve the dependence by yourself .
    yum The installation is based on rpm install , That is to say rpm The function of automatically resolving dependencies is added to the .
     Source code installation : By compiling the source code , Get the package . The advantage is that you can customize the software package , The disadvantage is that it's more complicated .

rpm install

install :rpm -ivh [ Package name ]

uninstall :rpm -e  [ Package name ]

upgrade :rpm -Uvh [ Package name ]

  View the configuration file of the package

        rpm -qc [ Package name ]

Check whether a software is installed

        rpm -q [ Package name ]

Check which software is currently installed in the system

        rpm -qa

Check the installation path of the software , See what's installed

        rpm -ql [ Package name ]

Upload and download :yum install lrzsz -y 

yum install

be based on rpm install , Resolve dependencies automatically .

1、 install

        yum install [ Package name ]

      Parameters :

        -y: No interaction

        --nogpgcheck: Ignore public key authentication

2、 uninstall

        yum remove [ Package name ]

        Parameters :

        -y: No interaction

3、 to update

        yum update [ Package name ]

        Parameters :

        -y: No interaction

Be careful : If it is followed by the specific package name , The specified package will be updated ;

If not specified , Then update all software packages that need to be updated in the system .

4、yum Installation lifecycle

        1、 perform yum install zsh -y

        2、 Go to /etc/yum.repos.d/ Find out   .repo Final document

        3、 adopt .repo Links in files , Find the corresponding software warehouse

        4、 Download the specified software package in the corresponding software warehouse

        5、 Cache to /var/cache/yum/

        6、 According to cache , Install package

        7、 Remove package (keepcache Whether to save the cache ,0 Means not to save ,1 Save on behalf of )

notes :/etc/yum.conf yes yum Configuration file for .

copyright:author[10000 yuan coefficient],Please bring the original link to reprint, thank you.