Types of software installation packages and installation introduction under linux system
1. Analyze Linux application software installation packages. Usually, there are four types of Linux application software installation packages:
1) tar package, such as software-1.2.3-1.tar.gz. It is packaged using tar, the packaging tool for UNIX systems.
2) rpm package, such as software-1.2.3-1.i386.rpm. It is a package encapsulation format provided by Redhat Linux. Package management tool YUM
3) dpkg package, such as software-1.2.3-1.deb. It is a package packaging format provided by Debain Linux. Package management tool apt-get
4) bin package, such as jdk-1_5_0_05-linux-i586.bin, some Linux software does not disclose source code, but only publishes binary executable programs, which are generally marked with bin.
Moreover, the naming of most Linux application packages also has certain rules, he follows: name-version-modification-type
For example:
1) software-1.2.3-1.tar.gz means:
software name: software
version number : 1.2.3
Revised version: 1
Type: tar.gz, the description is a tar package.
2) sfotware-1.2.3-1.i386.rpm
Software name: software
Version number: 1.2.3
Corrected version: 1
Available platform: i386, suitable for Intel 80x86 platform.
Type: rpm, indicating that it is an rpm package.
Note: Since the rpm format is usually a compiled program, it is necessary to specify the platform. It will be explained in detail later. And software-1.2.3-1.deb needn't say anymore! Everyone practice it.
Second, understand the contents
of the package A Linux application package can contain two different contents:
1) One is the executable file, that is, it can be run directly after unpacking. All software packages in Windows are of this type. After installing this program, you can use it, but you cannot see the source code. And when downloading, pay attention to
whether the platform you are using, otherwise it will not be installed normally.
2) The other is the source program, that is, after unpacking, you also need to use the compiler to compile it into an executable file. This is almost absent in the Windows system, because the idea of the Windows system is not open source.
Usually, packages packaged with tar are source programs; packages packaged with rpm, bin, and dpkg are often executable programs. Generally speaking, compiling the source program yourself can be more flexible, but it is also easy to encounter various problems and difficulties. Relatively speaking, downloading those executable packages makes it easier to complete the installation of the software, of course, the flexibility is much less. Therefore, generally a software will always provide installers in a variety of package formats. You can choose according to your own situation.
Third, get the application software packaged with tar.gz (bz or bz2, etc.), which are all source programs, which have not been compiled, and can only be installed after compilation.
1. Installation:
The whole installation process can be divided into the following steps:
1) Obtaining application software: obtained by downloading and purchasing CD-ROM;
2) Unzip the file: Generally, the tar package will be compressed again, such as gzip, bz2, etc., so you need to unzip it first. If it is the most common gz format, you can execute: "tar -xvzf package name" to complete the decompression and unpacking work in one step.
If not, use the decompression software first, and then execute "tar -xvf decompressed tar package" to unpack;
3) Read the attached INSTALL file and README file;
4) Execute the "./configure" command to complete the compilation Preparation;
5) Execute the "make" command to compile the software;
6) Execute "make install" to complete the installation;
7) Execute "make clean" to delete the temporary files generated during installation.
Alright, you're done. We can run the application. But at this time, some readers will ask, how do I implement it? This is also a Linux-specific problem. In fact, in general, the executable files of Linux application software will be stored
in the /usr/local/bin directory! However, this is not a "one size fits all" truth. The most reliable way is to look at the INSTALL and README files of this software, which are generally explained.
2. Uninstall:
1), open a shell, that is, the terminal
2), use the CD command to enter the configured software directory, that is, the directory during installation
3), execute the uninstall command: make uninstall
installation directory: pay attention to the make install command process The installation directory, or read the readme file in the installation directory, of course, the best way is to specify the installation directory during the installation process, that is, add the parameter --prefix=/** after the ./configure command,
such as:
./configure --prefix=/usr/local/aaaa
installs the software in the aaaa directory of the /usr/local/ path. The default installation directory of general software is in /usr/local or /opt, you can go there to find it.
Note: Usually software developers rarely consider how to uninstall their own software, and tar only completes the packaging work. So it doesn't provide a good uninstall method. So does that mean it can't be uninstalled? In fact, it is not. There are two softwares that can solve this problem, that is, Kinstall and Kife. They are the golden partners of tar package installation and uninstallation.
Fourth, get the application software packaged with
rpm rpm can be described as a major contribution of Redhat company, he makes the Linux software installation more simple and easy.
1. Installation:
I only need a simple sentence to finish. Execute:
rpm -ivh rpm package name
is more advanced, see the following table:
rpm parameter parameter description
-i install software
-t test installation, not real installation
-p show installation progress
-f ignore all errors
-U upgrade installation
- v Check that the kit is installed correctly
These parameters can be used at the same time. For more information, see RPM's command help.
2. Uninstall:
I can also finish with just one simple sentence. Execute:
rpm -e software name
However, it should be noted that the software name is used later, not the package name. For example, to install the software-1.2.3-1.i386.rpm package, execute:
rpm -ivh software-1.2.3-1.i386.rpm
and when uninstalling, execute:
rpm -e software. The query is also rpm list
. In addition, Linux also provides graphical RPM tools such as GnoRPM, kpackage, etc., which makes the whole process easier. The specific application of these software will be introduced in another article.
Fifth, get the application packaged with deb
This is a package manager provided by Debian Linux, which is very similar to RPM. But because RPM appeared earlier, it is common in various versions of Linux. And debian's package manager dpkg is only available
in generally do not. We will briefly explain here:
1. Install
dpkg -i deb package name
such as: dpkg ?i software-1.2.3-1.deb
2. Uninstall
dpkg -e software name
such as: dpkg ?e software
Sixth, bin File
1. Installation
1), open a SHELL, the terminal
2), use the CD command to enter the directory where the source code archive is located
3), add executable attributes to the file: chmod +x ******.bin (the middle is the letter x, lowercase)
4), execute the command: ./******.bin (realplayer for linux is such an installation package), you can specify the installation directory during the installation process, similar to the installation under Windows.
2. Uninstall
1), delete the installation directory selected during installation and OK
7. How to execute after installing the software. After installing the software, there are many ways to execute the software:
1. Some software will automatically add a shortcut link to the application list after installation. Just like Windows, just go there and find it.
2. If you can't find it in the application list, you can directly enter the command in the start/run command. The startup command is generally the software name, such as firefox, realplay, xmms, etc.
3. You can also open a shell terminal and enter the software name, the same as in the "run command". If you don't know the full name of the command, you can enter the letter at the beginning, and then press the tab key to find it, and the system will automatically display all the commands that begin with the entered letter
.
4. You can also directly run the startup file in the installation directory. The executable icon under Linux is very similar to the shell terminal icon.
5. Search in the /usr/bin directory. The Linux system has made a startup link for all executable files in the /usr/bin directory. You can go to that directory to find the startup command of the file you installed, and double-click to start it.
Eight, the difference between rpm.bin and bin file
1. The bin file is the same as the Windows exe
2. rpm is like rar, whether you like it or not, it is all in the same place, the good thing is that you only need to click to confirm. 3. Some Linux software does not disclose the source code, but only publishes binary executable
programs. Such programs are generally marked with bin;
Tagged (take the RedHat package as an example), the source code is tagged with source.rpm.
5.bin is a binary file that can be run directly. rpm is a package manager used by Red Hat. Generally speaking, it can be installed directly by double-clicking, but it is only limited to distributions that support RPM, such as Red Hat, etc.
ubuntu does not Yes, he supports the deb package
6.jdk-1_5_0_16-linux-i586-rpm.bin After running, an rpm package will be decompressed, which can be installed with the rpm -iUh command.
7.jdk-1_5_0_16-linux-i586.bin After running, it will directly extract all files to the jdk subdirectory of the current directory.
Supplement: Detailed explanation of the installation and use of rar and unrar commands in rar package
Linux system (transfer) Detailed explanation of the installation and use
of rar and unrar commands in Linux system
Author : Van
Note: Due to my limited level, it is inevitable that there are mistakes. Welcome to reprint, but please indicate the author's information.
Installation:
If the installation is in the form of tarball, go to the rar website to download the corresponding version of the tarball. The address is http://www.rarlab.com/
Taking version 3.8 as an example, if it is an i386 platform, execute the following commands:
$wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
The rar software does not need to be installed, and can be directly extracted to /usr/local. The following operations require root privileges.
#tar zxvf rarlinux-3.8.0.tar.gz -C /usr/local
At this point, there will be rar and unrar commands under /usr/local/rar. A connection can be created under /usr/local/bin
#ln -s /usr/local/rar/rar /usr/local/bin/rar
#ln -s /usr/local/rar/unrar /usr/local/bin/ If unrar
is debian or unbuntu, you can use the following command to automatically install it.
$sudo apt-get install rar
$sudo apt-get install unrar
Usage:
You can use the help command or check the man document to understand the usage of the rar command. The following is the help document translated by me. Due to my limited English proficiency, please point out the mistakes.
$ rar --help
usage: rar <command> -<option1> -<optionN> <archive> <file...>
<@filelist...> <extract path\>
<command>
a add file to compressed archive
c Add a comment to the archive (the maximum size of the comment cannot exceed 62000 bytes)
cf Add a file comment (when the 'v' parameter is used to display the file comment, the maximum cannot exceed 32767 bytes)
ch Change the archive parameter
cw Write to the specified file Archive remarks
d delete files from archive
e unzip files to current directory (do not create any subdirectories)
f refresh files in archive (update these files with changes since they were packed, do not add new ones to archive)
i [par]= find a specific character in the archive
k lock the archive (any commands that try to change the contents of the archive are ignored)
l[t,b] list the archive [technical, bare]
m[f] move into the archive [file only]
p print file to stdout
r patch archive
rc rebuild lost volume
rn rename file in archive
rr[N] add data recovery record
rv[N] create recovery volume
s[name|-] Conversion between compressed archives and SFX (self-extracting archives)
t test archive file
u update files in archive
v[t,b] list archive details [technical,bare]
x extract to full path
<options>
- stop scanning for options
ad append archive name to Target path
ag[format] Use the current data to generate the compressed file name
ap Set the path inside the file
as Synchronize the directory in the file
av Set the authentication test (only the registered version provides this function)
av- close the authentication test
c- close the remark display
cfg- close the reading take set
cl convert name to lowercase
cu convert name to uppercase
df delete original file after compression
dh open shared file
ds turn off name sorting for stable files
dw erase file after compression
e[+] set file exclude and include attributes
ed do not add empty directories
en do not set end-of-archive block
ep do not include path
in name ep1 do not include base file directory in
name ep3 expand path to fully included drive name
f refresh file
hp[password] encrypt file data and file header
id[ c,d,p,q] close messages
ierr send all messages to
stderr ilog[name] log errors to a file (only available in registered version)
inul close all messages
isnd open sound
k lock archive
kb keep it Decompressed corrupt files
m<0..5> set compression level (0-store...3-default...5-max)
mc set advanced compression parameters
md Dictionary size in KB (64,128,256,512,1024,2048 ,4096 or AG)
ms[ext;ext] store the specified file type
n contains only the specified files
n@ read filename from stdin into include
n@ include file in specified list file
o[+|-] set rewrite mode
ol save symlink for file as link
or auto rename file
ow save or save file owner and group of
p[password] set password
p- don't ask for password
r recurse on subdirectories
r0 recurse on subdirectories with wildcard names only
rr[N] add data recovery record
rv[N] create recovery
s [,v[-],e] create stable archive compression
s- disable stable archive compression
sc[obj] set specified string
sfx[name] create SFX archive
si[name] read data from
stdin sl process file size Less than the specified value
sm Process the size of the file is greater than the specified value
t Compress the test file
ta Process the file whose modification date is after the specified date, format: YYYYMMDDHHMMSS
tb process files whose modification date is before the specified date, format: YYYYMMDDHHMMSS
tk keep the original time
of the file tl set the file time to the latest file time
tn process files newer than the specified time
to process files older than the specified time
ts[N ] save or store file time (modify, create, access)
u update file
v create auto-sized volume or list all volumes
v[k,b] create volume with specified size size=*1000 [*1024, *1]
ver [n] file versioning
vn use old volume naming scheme
vp pause before each volume
w specify working directory
x exclude specified file
x@ exclude file name read from standard input
x@ specify to exclude from specified list file The file
y sets all the answers to yes
z[file] reads the compressed file from the file.
Note : The <command> part of rar does not have a "-" sign, only the <option> part has a "-" sign, this point pay attention.
Example 1: To add a file or directory to a compressed archive, use the a command. For example, add the file files1 to abc.rar, use the a or m command, the a command adds the file1 file to the abc.rar file and keeps the original file1 file unchanged, and the m command moves the file1 file to the file1.rar file ( After the compression is completed, the original file1 file will be deleted. Note: the m command only operates on files)
$rar a abc.rar file1
Description: If the abc.rar file does not exist at this time, the abc.rar file will be created by itself. If the abc.rar file already exists, the file1 will be compressed into the abc.rar file. If a file1 file already exists in the abc.rar file, the file1 will be updated. And the original file1 file still exists in the current directory, if you want to move the file1 file to file1.rar, please use the m command, the same operation can be done for the directory.
Note: If you only enter the "rar a file1.rar" command without the file name or directory name, all files and folders in the current directory will be compressed into the file1.rar document. Pay attention to this.
Example 2: To decompress the contents of the abc.rar archive, you can use the e or x command, assuming that there is a file named file1 and a directory named test in the abc.rar directory, and there is a file named file2 in the test directory File,
$rar e abc.rar
Description: Use the e command to extract the file1 file in abc.rar together with the file2 file in the test directory to the current directory. Use the x command if you want to keep the directory structure in the abc.rar directory.
$rar x abc.rar
Description: At this time, the file1 file and the test directory will be extracted to the current folder.
Example 3: Commenting the entire archive
$rar c abc.rar
Note: After entering this command, Processing archive test.
rarReading comment from stdin will be displayed at the bottom of the screen
and a cursor will be blinking. Enter the comment information from the blinking cursor position, and press Ctrl+D to end the input
. Example 4: for compression To add comments to individual files within a file, use the cf command. If you now want to add a comment to the file1 file in the abc.rar file,
$rar ch abc.rar file1 will display Reading comment for abc.rar : file1 from stdin
at the bottom of the screen . Enter the comment you want to add to file1 from the cursor blinking , Ctrl+D to end the input Example 4: Write the comments of the entire file to a file, use the cw command. Add to write the comments of abc.rar to the test.txt file $rar cw abc.rar test.txt Description: If there is no file named test.txt in the current directory, it will create a file named test. txt file, and write the comments of abc.rar into the text.txt file. If a file named text.txt already exists in the current directory, you will be prompted whether to overwrite the existing file. If you choose Yes or All, it will clear the original content in test.txt, and then write the comment content of abc.rar into the text.txt file. Example 4: To delete a file or directory in a compressed archive, use the d command. For example, to delete the file1 file in the abc.rar archive. $rar d abc.rar file1
Description: This command deletes the file1 file in the abc.rar file, which is also valid for directories.
The above are the commonly used compression and decompression commands. The use of the <Options> part will not be introduced. Please try it yourself.
Use of unrar command:
$unrar --help
Usage: unrar - -
<@listfiles...>
<command>
e Extract files to the current directory
l[t,b] List archive information [technical, bare]
p print file to stdout
t test zip me rust
v[t,b] list the details of the zip file [technical,bare]
x extract the file to the full path
The following is the <options> part, omitted.
The unrar command has the same effect as rar. It can be seen that unrar only contains a part of the rar command, so all operations can be done using rar.
Software installation package types and installation introductions under linux system
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=327044316&siteId=291194637
Recommended
Ranking