Third, the source code installation and Uninstall
1. The source package is generally tar.gz, tar Z, tgz, or tar.bz2 as the suffix name, which is to be decompressed first, since most software provides./configure configures the software's functionality, so you then need to configure the software (most of the software requires only one command to complete), make The following is installed in general also a command can make install, but there are also a small number of software may not be provided./configure, such software directly make;make install on it.
Note: 1. We can view the function of the configuration software through the/configure--help.
2../configure A more important parameter is--prefix, with--prefix parameters, we can specify the Software installation directory (when we do not need this software, directly delete the software directory on the line)
3. Different extensions of the decompression commands are also different, as follows:
2. The normal installation of the source code is subject to the following stages:
Tar zvf x.tar.gz # Decompression
./configure [ARG] # Configuration
Make # Compile
Make Install # Installation
Note: 1. After successfully extracting the source code file, enter the directory where the package is unpacked. Read the readme and install files before installing. Although many source code packages use essentially the same commands, some important differences can sometimes be found when reading these files. For example, some software contains an installation script (. sh) that can be installed. Reading these documentation before installation can help you to install successfully and save time.
2. To be the root user before installing the software. There are usually two ways to do this: Log on to another terminal as root, or "Su", at which point the system prompts for the root user's password. After you enter a password, you will always have the root user's permissions. If you are already the root user, you can proceed to the next step.
3. Delete temporary files generated during installation: #make clean
3. Uninstall of source code
Use uninstall software #make Uninstall
Some packages can be uninstalled with the make uninstall command after the source code compilation is installed. If this feature is not available, the uninstall of the software must be manually removed. Since software may be able to distribute files across multiple directories in the system, it is often difficult to remove them cleanly and should be configured before compiling.
4. Give an example to illustrate briefly:
For example, we can specify FCITX to be installed in the/OPT/FCITX directory;
[Root@localhost fcitx]#./configure--PREFIX=/OPT/FCITX
If we do not need fcitx, we can delete the/OPT/FCITX directory directly;
So we take this example, FCITX if the custom installation to the/OPT/FCITX directory, the complete installation method should be:
[Root@localhost fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2
[Root@localhost FCITX] #cd FCITX
[Root@localhost fcitx]#./configure--PREFIX=/OPT/FCITX
[Root@localhost fcitx]# make
[Root@localhost fcitx]# make install