A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
After installing Linux software, I will study and study how to install Linux software. I will discuss with you how to install Linux software, I hope it will be useful to you. Install and Uninstall Linux software
Type of a Linux software installation package
Generally, there are three installation packages for Linux application software:
1) tarpackages, such as software-1.2.3-1.tar.gz. It is packaged using tar, a packaging tool for UNIX systems.
2) rpm packages, such as software-1.2.3-1.i386.rpm. It is a package Encapsulation Format www.rpmfind.net provided by Redhat Linux ).
3) dpkg package, such as software-1.2.3-1.deb. It is a package Encapsulation Format provided by Debain Linux.
4) The bin package, such as RealPlayer11GOLD. bin, is a binary installation format in the linux File of realplayer. It is a machine language compiled by the source program.
5) There are many script installation files. For example, files suffixed with sh, pl, and run are all script files. However, it is not common for common users. To install such files, you must note that most files must have the executable permission first. Otherwise, the system may prompt that the file cannot be found. Specific Method: Execute chmod + x ***. * On the terminal or console, and then install it.
Ii. Naming rules for Linux software installation packages
The names of most Linux application software packages also follow the following rules: Name-version-Revised version-type. For example:
1)software-1.2.3-1.tar.gz means: software name | version: 1.2.3 | revised version: 1 | type: tar.gz, which indicates a tar package.
2) sfotware-1.2.3-1.i386.rpm means: software name: software | version: 1.2.3 | revised version: 1 | available platform: i386, applicable to Intel 80 X86 platform | type: rpm, description is an rpm package.
3. install Linux software
Beginner: You can use apt-get update ubuntu or yum update fedora to install most of the required software after installing the system!
1. *. src. source code Linux software installation package in rpm format: rpm-rebuild *. src. rpmcd/usr/src/dist/RPMSrpm-ivh *. rpm uninstall: rpm-e packgename Description: rpm -- rebuild *. src. run the rpm command to compile the source code and generate a binary RPM package under/usr/src/dist/RPMS. then install the Binary Package.
2. * .tar.gz/*. tgz/* .bz2form source code software package software packages ending with tar.gzor tgzor tar.bz2 are generally released in source code mode. to install such software in Linux, you must first decompress the software:
# Tar zxvf filename.tar.gz
# Tar xvfz filename. tgz
# Tar xvf j filename.tar.bz2
After decompression, you can enter the decompressed Directory: # cd filename/for this type of documents, the common Linux software installation steps are: configuration, compilation and Linux software installation 3 steps, configuration is the most troublesome, because all configurations related to Linux software installation are specified in this step: for example, the installation location of Linux software.
Configuration :. /configure Compilation: make installation: make install uninstall: make uninstall or manually delete instructions: We recommend that you decompress the package and read the instructions file ReadMe and Install) to understand the installation requirements, you also need to modify the compilation configuration when necessary.
The source code of some software packages can be uninstalled by running the make uninstall command after compiling and installing the Linux software. If this function is not provided, the software must be uninstalled manually. Because the software may scatter the file in multiple directories of the system, it is often difficult to delete it, you should configure it before compilation.
Specify the software to install the Linux software to the target path:./configure -- prefix = directory name. In this way, run the "rm-rf Software Directory Name" command to clean and thoroughly uninstall the software. Compared with other Linux software installation methods, it is the most difficult to compile and install the software by yourself. It is suitable for users who already have some experience in Linux. It is generally not recommended for beginners.
3. Install the Linux software package in RPM format
1 ). command Format for installing Linux software: rpm-I (or -- install) options file1.rpm... fileN. rpm parameter: file1.rpm... fileN. rpm indicates the name of the RPM package to be installed in Linux.
-H (or-hash) outputs the hash mark when installing the Linux software. test only tests the installation of the Linux software and does not install the software. -- percent outputs the installation progress as a percentage; -- excludedocs does not install the document in the software package; -- includedocs installation document; -- replacepkgs forcibly re-installs the software package that has been installed in Linux;
-- Replacefiles replace files of other software packages; -- force ignores conflicts between software packages and documents; -- noscripts does not run pre-Linux software installation and post-installation scripts; -- prefix NEWPATH: install the software package to the path specified by NEWPATH;
-- Ignorearch does not check the structure of the software package; -- ignoreos does not check the operating system of the software package running; -- nodeps does not check the dependency; -- ftpproxy HOST uses HOST as the FTP proxy; -- ftpport PORT: Specifies the ftp port number as PORT.
Common options:-v displays additional information;-vv displays debugging information; -- root DIRECTORY allows RPM to use the path specified by DIRECTORY as the root DIRECTORY, in this way, both the pre-Linux software installer and the post-installation program will be installed in this DIRECTORY; -- rcfile FILELIST sets rpmrc to FILELIST; -- dbpath DIRECTORY sets the path of the RPM database to DIRECTORY.
2). DELETE Command Format: rpm-e (or -- erase) options pkg1... pkgN parameter: pkg1. .. pkgN: package to be deleted. Detailed options: -- test: only delete the test; -- noscripts does not run the pre-Installation and post-installation script programs; -- nodeps does not check dependencies.
Common options:-vv displays debugging information; -- root DIRECTORY allows RPM to use the path specified by DIRECTORY as the root DIRECTORY, in this way, both the pre-Linux software installer and the post-Linux software installer will be installed in this DIRECTORY; -- rcfile FILELIST sets rpmrc to FILELIST; -- dbpath DIRECTORY sets the path of the RPM database to DIRECTORY.
3). upgrade Command Format: rpm-U (or -- upgrade) options file1.rpm... fileN. rpm parameter: file1.rpm... fileN. rpm indicates the package name. Detailed options:-h (or-hash) output the hash mark during Linux software installation;-oldpackage allows an old version;
-- Test only performs the upgrade test; -- excludedocs does not install the files in the software package; -- includedocs Installation File; -- replacepkgs forces to reinstall the software package that has been installed in Linux; -- replacefiles replace files of other software packages; -- force ignores conflicts between software packages and files;
-- Percent outputs the Linux software installation progress as a percentage; -- noscripts does not run the pre-Installation and post-installation scripts; -- prefix NEWPATH installs the software package to the path specified by NEWPATH; -- ignorearch does not verify the structure of the software package; -- ignoreos does not check the operating system of the software package;
-- Nodeps does not check the dependency; -- ftpproxy HOST uses HOST as the FTP proxy; -- ftpport HOST specifies the FTP port number as HOST. Common options:-v displays additional information;-vv displays debugging information; -- root DIRECTORY allows RPM to use the path specified by DIRECTORY as the root DIRECTORY.
In this way, both the pre-Linux software installer and the post-Linux software installer will be installed in this DIRECTORY; -- rcfile FILELIST sets the rpmrc file to FILELIST; -- dbpath DIRECTORY sets the path of the RPM database to DIRECTORY.
4) query command format: rpm-q (or -- query) options parameter: pkg1. .. pkgN: query installed software packages. Detailed options:-p PACKAGE_FILE: query the FILE of the software package;-f FILE: query which software package the FILE belongs to;-a: Query all software packages installed in Linux;
-- WhatproVides CAPABILITY query provides the CAPABILITY software package;-g group query belongs to the group software package; -- whatrequires CAPABILITY query all software packages that require CAPABILITY. Option:-I displays the summary of the software package;
-L displays the file list in the software package;-c displays the configuration file list;-d displays the file list;-s displays the file list in the software package and the status of each file -; -scripts displays the script for installing, uninstalling, and verifying Linux software. -- queryformat (or -- qf) displays the query information in the way specified by the user;
-- Dump: displays all checked information for each file; -- proVides: displays the functions provided by the software package; -- requires (or-R) displays the functions required by the software package.
General options:-v displays additional information;
-Vv: displays the debugging information. -- root DIRECTORY allows RPM to use the path specified by DIRECTORY as the root DIRECTORY. In this way, both the preinstallation program and the Linux software installer will be installed in this DIRECTORY; -rcfile FILELIST: Set the rpmrc file to FILELIST; -- dbpath DIRECTORY: set the path of the RPM database to DIRECTORY.
5 ). verify the Command Format of the software package installed in Linux: rpm-V (or -- verify, or-y) options parameter: pkg1... pkgN package name package option to be verified:-p PACKAGE_FILE verify the PACKAGE_FILE package to which it belongs;-a verify all software packages;-g group verify all software packages belonging to the group.
Detailed options: -- noscripts does not run the validation script; -- nodeps does not verify dependencies; -- nofiles does not verify document attributes. General options:-v displays additional information;-vv displays debugging information; -- root PATH allows RPM to use the PATH specified by PATH as the root directory, in this way, both the preinstallation program and the Linux software installer will install the Linux software in this DIRECTORY; -- rcfile FILELIST sets the rpmrc file to FILELIST; -- dbpath DIRECTORY sets the path of the RPM database to DIRECTORY.
6 ). file Syntax in the verification package: rpm-K (or -- checksig) options file1.rpm... fileN. rpm parameter: file1.rpm... fileN. file Name of the rpm software package; Checksig -- detailed options; -- nopgp does not verify the PGP signature. General options:-v displays additional information;-vv displays debugging information; -- rcfile FILELIST sets rpmrc to FILELIST.
7 ). other RPM options -- rebuilddb re-creates an RPM database; -- initdb creates a new RPM database; -- quiet minimizes the output; -- help displays the help file; -- version displays the current version of RPM.
If you do not like to install or uninstall these software packages in Linux under the character interface, you can install the X-Window-based graphical interface software package management program, such as glint and xrpm.
Or, use KDE's KPackage, click Start> Run Command, and enter KPackage to start KPackage, in this way, you can easily install, upgrade, uninstall, verify, and query the Linux software package by clicking the mouse ,.
4. deb-format Linux software installation. You can simply double-click it!
5. the main function of yum is to conveniently Add/delete/update RPM packages. it automatically solves the dependency problem of the package. it facilitates management of a large number of system update problems. * check for updates to the rpm package // check for updatable rpm packages # yum check-update // update all rpm packages # yum update // update the specified rpm package, for example, you need to update the kernel and kernel source # yum update kernel-source // a large-scale version upgrade.
Unlike yum update, the old obsolete package is also upgraded. # Install and delete the yum upgrade * rpm package // For example, install the rpm package, such as xmms-mp3 # yum install xmms-mp3 // Delete rpm package, including dependent package # yum remove licq Note: a message is prompted to delete licq-gnome.
Licq-qt, licq-text * yum temporary storage (/var/cache/yum /) related Parameters of // clear the temporary rpm package file # yum clean packages // clear the temporary rpm header file # yum clearn headers // clear the existing rpm header file # yum clean oldheaders/ /clear the existing rpm header files and package files during temporary storage # yum clearn or # yum clearn all note: equivalent to yum clean packages + yum clean oldheaders * rpm package list/list all rpm packages that can be installed or updated by Linux software in the resource library # yum list // list specific files in the resource library that can be installed or update and install the rpm package # yum list mozilla * Note: match characters can be used in rpm package names.
For example, list all rpm packages starting with mozilla // list all the rpm packages that can be updated in the resource library # yum list updates // list all installed rpm packages # yum list installed // list rpm packages installed but not included in the resource library # yum list extras note: download and install the rpm package * rpm package information display from other websites (the info parameter is the same as the list) // list all rpm packages that can be installed or updated in the resource library # yum info // list specific Linux software installation or update and installed rpm packages in the resource library # yum info mozilla # yum info mozilla * Note: match characters can be used in rpm package names.
For example, to list all rpm packages starting with mozilla, // to list all the rpm packages that can be updated in the resource library # yum info updates // to list all the rpm packages that have been installed # yum info installed // lists the rpm packages installed but not included in the resource library # yum info extras note: download and install the rpm package information from other websites * search for the rpm package // search for the rpm package matching a specific character # yum search mozilla note: In the rpm package name.
Search for the rpm package containing a specific file name in the package description, etc. // search for the rpm package # yum provides realplay6. apt is a complete and advanced software package management program. Using apt in ubuntu allows you to find the software package you want, which is simple and accurate, in addition, the installation or uninstallation of Linux software is simple. It also updates all your software to the latest status and can be used to upgrade ubuntu. They can automatically process dependencies between each other and maintain their configuration files during the upgrade process.
Apt-get update -- run this command after modifying/etc/apt/sources. list or/etc/apt/preferences. In addition, you need to regularly run this command to ensure that your package list is up-to-date. Apt-get install packagename -- install a new software package. For more information, see aptitude)
Apt-get remove packagename -- uninstall an installed package to keep the configuration file) apt-get -- purge remove packagename -- uninstall an installed package to delete the configuration file) dpkg -- force-all -- purge packagename some software is hard to uninstall, and it can be used to block other software applications, but it is a little risky.
Apt-get autoclean apt will back up installed or unloaded software on the hard disk, so if you need space, you can run this command to delete the software you have deleted. The command apt-get clean will also delete the backup of the installed software, but this will not affect the use of the software.
Apt-get upgrade -- update all installed software packages apt-get dist-upgrade -- upgrade the system to the new version apt-cache search string -- search for the dpkg-l package string in the package list- name-pattern -- list all software packages that match the pattern. If you do not know the full name of the software package, you can use "* package-name-pattern *".
Aptitude-view the software packages installed or available in Linux. Similar to apt-get, aptitude can be called through the command line, but is limited to some commands-the most common commands are installation and uninstallation. Because aptitude knows more information than apt-get, it is more suitable for installation and uninstallation.
Apt-cache showpkg pkgs -- displays the package information. Apt-cache dumpavail -- print the list of available packages. Apt-cache show pkgs -- displays Software Package records, similar to dpkg-print-avail.
Apt-cache pkgnames -- print the names of all packages in the package list.
Dpkg-S file -- the Linux software installation package that the file belongs. Dpkg-L package -- list all files in the package. Apt-file search filename -- find packages that contain specific files are not necessarily installed.) These file names contain specified strings. Apt-file is an independent software package. You must first install apt-get install and then run apt-file update.
If apt-file search filename outputs too much content, you can try to use apt-file search filename | grep-w filename to display only the names of the complete words in the specified string) for example, apt-file search filename | grep/bin/only displays files in folders such as/bin or/usr/bin, this is helpful if you are looking for a specific execution file ).
Apt-get autoclean -- run this command regularly to clear the. deb files of uninstalled software packages. In this way, you can release a large amount of disk space. If your requirements are urgent, you can use apt-get clean to release more space. This command will delete the. deb file that has been installed with the Linux software package. In most cases, you will not use these. debs files. Therefore, if you feel overwhelmed by insufficient disk space, this method may be worth a try.
7. The installation package ending with bin. This package is similar to the RPM package and is easy to install:
1. Open a SHELL, that is, a terminal;
2. Run the CD command to enter the directory where the source code package is located;
3. Add the executable attributes to the file: chmod + x *******. bin (the middle is the letter x, in lower case );
3. Execute the command:./******. bin (this is the installation package for realplayer for linux );
How to uninstall: Delete the installation directory selected during installation;
After installing the software, you can execute the software in multiple ways:
A. After some Linux software is installed, the shortcut keys are automatically added to the Application List. Just like windows, you can find them there.
B. If the Application List cannot be found, enter the command in the/start/Run Command: the startup command is generally the software name, such as firefox, realplay, and xmms;
C. You can also open a shell terminal and enter the software name, which is the same as running the command. If you do not know the entire command process, you can enter a letter that begins with the command and press the tab key to search. The system will automatically display all the commands that start with the input letter.
D. You can run the Startup File directly in the installation directory. the executable icon in linux is similar to the shell terminal icon.
E. Find the installed software startup file in the/usr/bin directory and run the command. In linux, All executable file commands are enabled in the/usr/bin directory. You can go to the directory to find the startup command for your installed file and double-click it to start.
Start building with 50+ products and up to 12 months usage for Elastic Compute Service