Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install, compress and decompress the software package under Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to install, compress and decompress software packages under Linux. It has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.

The difference between packaging and compression in Linux:

Before summarizing all kinds of compressed files, we must first understand two concepts: packaging and compression.

Packaging refers to turning a large number of files or directories into a total file, while compression refers to turning a large file into a small file through some compression algorithm.

Why distinguish between these two concepts? In fact, many compression programs in Linux can only compress a file, so when you want to compress a lot of files, you have to use another tool to first make a package of this lot of files, and then compress the original compression program.

Linux common decompression command:

Our common file compression formats under windows are zip and rar, and rar has become the de facto standard under windows. However, the tar.gz tar.bz2 tar.xz format is common under Linux.

In fact, file archiving and file compression are separated under Linux, and tar is used to archive data files and compress them with other compression tools. Among them, tar.gz is the most common.

The most common compression formats under Linux are tar.lz tar.lzma, etc.

File naming and length restrictions that follow DOS under Windows Compression formats under Linux have the following manifestations:

Long Short

.tar.bz2 .tb2, .tbz, .tbz2

.tar.gz .tgz

.tar.lz

.tar.lzma .tlz

.tar.xz .txz

.tar.Z .tZ

.zip format

Extract: unzip filename.zip

zip file name.zip directory name

.tar format

compression: tar cvf filename.tar filename

Extract: tar xvf filename.tar

.tar.gz format

Extract: tar zxvf filename.tar.gz

Compression: tar zcvf filename.tar.gz filename

.tar.bz2 format

Extract: tar jxvf filename.tar.bz2

Compression: tar jcvf file name.tar.bz2 directory name

.bz2 format

Extract: bzip2-d filename.bz2

compression: bzip2 -z filename

Linux software installation

If your Linux system comes with an installer, it's best to install it with the installer that comes with your system. For example, YaST2 of SuSE comes with an installer. In KDE environment, as long as it is rpm, you can click "Install with YaST2" in Konqueror. The advantage of this is that YaST2 will give you detailed information about the package, automatically check the trust relationship, and you can easily uninstall the package in YaST2 later. SuSE's Red-Carpet also provides installation features, which is also good.

Another way is to use the rpm command, you need to open the terminal, switch to the directory where xxx.rpm is located, and execute:

rpm -ivh xxx.rpm

Other parameters can be added if desired. However, in SuSE, the package installed with rpm command is displayed as "locked state" in YaST2 control panel. I don't know what this means, but the package is available and can also be uninstalled in YaST2.

2.1 rpm installation: A package encapsulation format provided by Redhat Linux.

(1)Installation: rpm -ivh package name

e.g. rpm -ivh software.rpm

(2)uninstall: rpm -e software name

rpm -e software

rpm parameter description

-i Install software

-t Test installation, not real installation

-p shows installation progress

-f Ignore any errors

-U upgrade installation

-v Print installation progress information

2.2, compile and install

Example steps:

(1)Go to/usr/local/and create the jdk directory.

(2)Extract the downloaded source package to this directory: tar -zxvf jdk8.tar.gz.

(2)Execute configure to generate Makefile file: ./ configure --prefix=/usr/local/jdk/

Description:

The-prefix parameter specifies the software installation directory. When you execute the make install command, the software is installed in this path.

(3)Execute make, read instructions from Makefile, compile source code: make clean; make

(4)make install, binaries will be installed to the path previously configured with prefix parameter.

Thank you for reading this article carefully. I hope that Xiaobian's article "How to install, compress and decompress software packages under Linux" will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report