Summary of software installation methods in CentOS

Source: Internet
Author: User
Tags rar extension uncompress

1. Steps for installing the rpm package:
1. Find the corresponding software package, such as soft. version. rpm, and download it to a local directory;
2. Open a terminal and su-become the root user;
3. directory where cd soft. version. rpm is located;
4. Input rpm-ivh soft. version. rpm
Ii. Steps for installing the deb package:
1. Find the corresponding software package, such as soft. version. deb, and download it to a local directory;
2. Open a terminal and su-become the root user;
3. directory where cd soft. version. deb is located;
4. Input dpkg-I soft. version. deb
Install the Three-character tar.gz source code package:
1. Find the corresponding software package, such as soft.tar.gz, and download it to a local directory;
2. Open a terminal and su-become the root user;
3. directory where cd soft.tar.gz is located;
4. tar-xzvf soft.tar.gz // a soft directory is usually generated.
5. cd soft
6../configure
7. make
8. make install
Installation Method of source code package:
1. Find the corresponding software package, such as soft.tar.bz2, and download it to a local directory;
2. Open a terminal and su-become the root user;
3. directory where cd soft.tar.bz2 is located;
4. tar-xjvf soft.tar.bz2 // a soft directory is usually generated.
5. cd soft
6../configure
7. make
8. make install
5. apt installation:
1. Open a terminal and su-become the root user;
2. apt-cache search soft Note: soft is the name or related information of the software you are looking.
3. If software soft is found in step 2. version, use apt-get install soft. version command to install software Note: as long as you can access the Internet, you only need to use apt-cache search to find the software, use apt-get install software
Vi. binfile installation:
If the software you downloaded is soft. bin, it is generally an executable file. The installation method is as follows:
1. Open a terminal and su-become the root user;
2. chmod + x soft. bin
3. Run the./soft. bin // command to install the software.
************************ ********************
* Filename: Summary of software installation methods in Linux
* Purpose: summarizes various software installation methods in Linux.
* Wrote by: zhoulifa (zhoulifa@163.com) Zhou Lifa (http://zhoulifa.bokee.com)
Linux enthusiasts Linux knowledge disseminators sohowhose developers are best at C Programming
* Date time: 2006-07-26 18:10:00
* Note: Anyone can copy the code and use these documents, including your commercial use.
* But follow GPL.
* Hope: more and more people are expected to contribute to the development of science and technology.
**************************************** *****************************/
7. Unnecessary software installation:
Some software, such as lumaqq, does not need to be installed. After the built-in jre is decompressed, it can be directly run. The download result is lumaqq.tar.gz. The usage is as follows:
1. Open a terminal and su-become the root user;
2. tar-xzvf lumaqq.tar.gz // a directory named LumaQQ is generated in this step.
3. cd LumaQQ
4. chmod + x lumaqq // set the lumaqq program file to run
5. You can run lumaqq by using the command./lumaqq, but you need to enter the full path or switch to the LumaQQ directory generated just now.
6. To ensure that you can use it without setting the path, you can create a lumaqq link in the/bin directory and run the ln-s lumaqq/bin/command, open a terminal and enter lumaqq at any time to start the QQ chat software.
7. If you want lumaqq to have a Menu item, use the Menu editing tool, such as Alacarte Menu Editor, to set a Menu item in the LumaQQ directory generated above, of course, you can also directly go to the/usr/share/applications directory and follow the other *. generate a desktop file in the format of the desktop file.
1. Compiled and packaged xxx. rpm

If your Linux system has an installer, you 'd better install it with the built-in installer. For example, SuSE YaST2 has an installer. In the KDE environment, if it is rpm, you can click "Install with YaST2" in Konqueror ", the advantage of this is that YaST2 will prompt you about the package details, automatically check the trust relationship, and you can easily uninstall the package in yast2. SuSE's Red-Carpet also provides the installation function, which is also good.

Another method is to run the rpm command. Open the terminal, switch to the directory where xxx. rpm is located, and run:
Rpm-ivh xxx. rpm

You can also include other parameters if needed. However, in SuSE, the software package installed with the rpm command is displayed as "locked" in the control panel of YaST2. I don't know what it means, but the software package is available, you can also uninstall it in yast2.

2. Packaged source code package xxx. src. rpm

Run the following command to generate a new one:
Rpm-rebuild xxx. src. rpm

3. installer xxx. bin

Commercial software is similar to setup.exe in windows. However, you must change xxx. bin to an executable state by right-clicking the --> attribute, or using the following command:
Chmod + x xxx. bin

In this way, you can double-click or execute xxx. bin on the terminal.

4、compressed Software Package xxx.tar.gz?xxx.bz2, xxx. z, etc.


For those who are new to Linux, they will surely get dizzy with a bunch of various file names in Linux. Let alone, for example, compressing files. We know that there are only two common types of compressed files in Windows. One is zipping and the other is .rar. There are a lot of compressed file names, such as. zipand. Rarin windows can also be used in linux, and there are too few people using. zipand. rar in linux. This article will summarize the common compressed files. I hope you will not be confused when you encounter these files.

Before summarizing various types of compressed files, we should first clarify two concepts: Packaging and compression. Packaging refers to converting a large number of files or directories into a total file. Compression refers to converting a large file into a small file through some compression algorithms. Why do we need to differentiate these two concepts? In fact, this is because many Linux compression programs can only compress one file, so when you want to compress a large number of files, you have to use another tool to compress these files into a package and then compress the original compression program.

At the end of lifecycle. After the tar package is generated, you can use other programs to compress it. So let's first talk about the basic usage of the tar command:

There are many options for the tar command (which can be viewed using man tar), but there are several commonly used options. The following is an example:

# Tar-cf all.tar *. jpg
This command is to pack all. jpg files into a package named all.tar. -C indicates that a new package is generated.-f specifies the package file name.

# Tar-rf all.tar *. gif
This command adds all .gif files to the package of all.tar. -R indicates adding files.
# Tar-uf all.tar logo.gif
This command is used to update the logo.gif file in tarbao all.tar.-u indicates that the file is updated.

# Tar-tf all.tar
This command is used to list all files in the all.tar package.-t is used to list objects.

# Tar-xf all.tar
This command is used to extract all files in the all.tar package.-x is used to unlock the file.

The above is the most basic usage of tar. To help you compress or decompress files while packing and unpackage, tar provides a special feature. This means that tar can call other compression programs, such as gzip and bzip2, while packaging or unpacking.

1) tar calls gzip

Gzipis a program developed by gnuorganization. The file ending with .gz is the result of gzip compression. The decompress program relative to gzip is gunzip. Use the-z parameter in tar to call gzip. The following is an example:

# Tar-czf all.tar.gz *. jpg
Bytes

# Tar-xzf all.tar.gz
This command unlocks the generated package.

2) tar call bzip2

Bzip2is a more powerful compression program. The file ending with .bz2 is the result of bzip2 compression. The decompress program relative to bzip2 is bunzip2. Use the-j parameter in tar to call gzip. The following is an example:

# Tar-cjf all.tar.bz2 *. jpg
Bytes

# Tar-xjf all.tar.bz2
This command unlocks the generated package.
3) tar call compress

Compress is also a compression program, but it seems that there are not as many people using compress as gzip and bzip2 .. The file ending with Z is the result of compress compression. The decompress program relative to compress is uncompress. Use the-Z parameter in tar to call gzip. The following is an example:

# Tar-cZf all.tar. Z *. jpg
Forbidden. Z

# Tar-xZf all.tar. Z
This command is used to unbind the generated package.

With the above knowledge, you should be able to uncompress a variety of compressed files. The following is a summary of the compressed files in the tar series:

1st pair of files ending with .tar

Tar-xf all.tar

2XX for the file ending with .gz

Gzip-d all.gz
Gunzip all.gz

32.16.tgzor .tar.gz

Tar-xzf all.tar.gz
Tar-xzf all. tgz

4)for the file ending with .bz2

Bzip2-d all.bz2
Bunzip2 all.bz2

5 bytes for the file ending with tar.bz2

Tar-xjf all.tar.bz2

6) for files ending with. Z

Uncompress all. Z

72.16.tar. Z

Tar-xZf all.tar. z

In addition, Linux has corresponding methods to decompress the compressed files .zipand .rar in Windows:

1)for. Zip

Linux provides zip and unzip programs, zip is a compression program, and unzip is a decompression program. They have many Parameter options. Here we will only give a brief introduction and give examples to illustrate their usage:

# Zip all.zip *. jpg
This command compresses all .jpg files into a zip package.
# Unzip all.zip
This command decompress all files in all.zip.

2XX vs. .rar

To process the. RAR file in linux, you need to install RAR for Linux, which can be downloaded from the Internet, but remember, RAR for Linux
Not free; download RAR for Linux 3.2.0 from http://www.rarsoft.com/download.htmand install:

# Tar-xzpvf rarlinux-3.2.0.tar.gz
# Cd rar
# Make

After installation, there will be two programs, rar and unrar. rar is a compression program, and unrar is a decompression program. They have many Parameter options. Here we will only give a brief introduction and give examples to illustrate their usage:

# Rar a all *. jpg
This command is to compress all. jpg files into a rarpackage named all.rar. the program will automatically append the. rar extension name to the package name.

# Unrar e all.rar
This command is to extract all files from all.rar.

So far, we have already introduced tar, gzip, gunzip, bzip2, bunzip2, compress, uncompress, example, in linux ,. these 10 types of compressed files, zw..tar.zw..zipw.rar, have been decompressed. In the future, you should not have to worry about downloading a software and not knowing how to unbind it in Linux. In addition, the above method is basically effective for Unix.

This article describes the compressed files tar, gzip, gunzip, bzip2, bunzip2, compress, uncompress, zip, zip, example,. Z,. tar.z).zip#.rar in linux.

Compression:
Compression: tar calls bzip2
Bzip2is a more powerful compression program. The file ending with .bz2 is the result of bzip2 compression. The decompress program relative to bzip2 is bunzip2. Use the-j parameter in tar to call gzip. The following is an example:
# Tar-cjf all.tar.bz2 *. jpg

Decompress: The file ending with .bz2

Bzip2-d all.bz2
Bunzip2 all.bz2

In fact, since it can be tar-cjf all.tar.bz2 *. jpg, of course it can also be tar-xjf all.tar.bz2.
I tried it. No problem. You can use the tar command instead of bunzip2.

This software package has two forms:

(1) Use the installation script to install the compiled software package:

You 'd better first download the description file of the software package, such as readmetricinstall1_xxx.htm.

Find out whether there are xxx. sh and xxx. pl files, which are generally install. sh or install. pl. This may not be the case.

Open the terminal, switch to the directory where the software package is located, and run the following command:
./Xxx. sh or./xxx. pl.

(2) decompress the source code package that needs to be compiled by yourself:

In the same way, you 'd better first download the software package description file, such as readmetricinstall1_xxx.htm.

The general installation form is:

Open the terminal, switch to the directory where the software package is located, and run the following command:

./Configure (automatic configuration usually takes a lot of time. The configuration program will check your system information and make corresponding configurations. It will certainly check your Compiler (such as gcc) and library files (such as glib) and other information, so you must ensure that you have these software on your system)

Make (start compilation, usually takes a lot of time)

Make check (check whether the result is correct. This step is not required, but it is recommended to do so)

Make install (run the installer)

In this way, the software installation process is completed.

If you want to delete the source code file, run the following command in the original directory:
Make clear

To uninstall the software package, run the following command in the original directory:
Make uninstall

5. Use the java-compiled installer xxx. jar

First, you must have Java Virtual Machine software on your system, if not, download an installation (http://www.java.com or http://java.sun.com) on Sun's website ).

To install a software package in the format of xxx. jar, first open the terminal, switch to the directory where xxx. jar is located, and run:
Java-jar xxx. jar

In this way, the installer is started.

Make check (check whether the result is correct. This step is not required, but it is recommended to do so)
Make clear

To uninstall the software package, run the following command in the original directory:
Make uninstall

6. Use portage and run the following command:

# Emerge packagename (compile or install some compiled packages from the source code)
# Emerge-k packagename (compile the package on the hard disk by yourself)

It's that simple.

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.