Linux system and Application upgrade methods

Source: Internet
Author: User

When we use Linux for a period of time, nature will not be satisfied to always work in a system that does not have any change, but rather a desire to continually upgrade its Linux as it does in Windows. On the other hand, Linux itself is an open system, with new software appearing every day, and Linux distribution kits and kernels are constantly being updated. In this case, learning to upgrade Linux (including the system itself and various software) is very urgent.
In the Linux environment, the upgraded objects can be general software, either the compiler or the kernel of the system, or even the system itself. Below, the worm tells the way to upgrade different objects separately.
   1. Upgrade General Software
In general, it's easier to upgrade your application because you don't have to worry about the impact of the upgrade on other software (if you upgrade the system, the situation is different). First, you must find a new version of the software you wish to upgrade. You can find your favorite software on the Linux dedicated site. The software is then downloaded to the specified directory using a variety of download tools. Most of the software that is downloaded is the gzip zipped file packaged in tar.
It is a good idea to use the tar TVF or tar ZTVF command to see what files are included in the downloaded file before working with the software. Since the resulting software may be binary or source code, use the above command to see exactly which of the files.
If it is a binary file, you can usually open the package directly, and then delete the corresponding old file on it.
If it is the source file, you should pay attention to whether the package contains Help and installation files (README/INSTALL/HELP) and so on. Then open the software to the specified directory, take a closer look at the prompts and installation conventions in the Help and installation files, and then do the installation work. At this point, the installation work means compiling the source code. The first thing to do is to modify the makefile file, modify the content and the method of modification in the package of related files can often be found, and sometimes the package will contain a shell program configure, the implementation of it can save a lot of time. After you have finished processing the makefile file, you can use the make command to compile the specified file. Finally, install the software on your computer using the Make install command.
   2. Upgrading the compiler
We can start by looking at our current GCC version gcc-v and then decide whether to upgrade. When we need to upgrade our GCC, connectors, assemblers, and various header files and libraries, we can get the corresponding packages on the relevant sites, then open them in the specified directory and delete (overwrite) the old files.
   3. Upgrade function Library
Upgrading libraries is cumbersome because you want to reassign the library's connections after the upgrade. We know that the library files of Linux system are divided into two types: archive and shared library. Archive files are generally libx.a, while shared library files are generally libx.so.version. When you upgrade a library, you must replace the old version of the corresponding file with the new version of. A and. so.version files. Very easy for. A files, just copy the new file into the specified directory, overwriting the original file. But we need to be very careful when we work with shared libraries. You cannot simply copy the new file to a directory and then delete the old file. Because it is possible that the old library is being used by a program. We have to make sure that every program is able to find the shared library correctly. In short, when we put the new version of the shared library file into the specified directory, we use the LN command to complete:
Ln-sf/usr/lib/libdb.so.new ("New" refers to the newer version number)/usr/lib/libdb.so.old ("old" is the original file)
Like what
/usr/lib/libdb.so.2 originally pointed to the file is/usr/lib/libdb.so.2.0.1, now there is a new file/usr/lib/libdb.so.2.78.1, we can handle:
Ln-sf/usr/lib/libdb.so.2.78.1/usr/lib/libdb.so.2
Then, we can delete the/usr/lib/libdb.so.2.0.1 file.
   4. System Upgrade
The simplest way to upgrade is of course ... The entire system can be fully included in a single CD-ROM. Of course, this kind of upgrade method is more troublesome, at the same time, each upgrade means that the original file may be lost, so it is not necessary to always reinstall the system. Each Linux distribution suite actually has files that record the upgrade situation. For example, there is a changelog.txt file in Slackware, which records the update status of Slackware in chronological order. And in the Redhat is the/redhat-4.2/updates/00readme.errata. We can see from these files whether an upgrade is required. Then find the appropriate part of the package, using
installpkg filename or
Rpm-u filename To install the package on your computer.
Linux has a certain level of reference, beginners can understand

This article is from the "Du Haiqiang" blog, make sure to keep this source http://dulinux.blog.51cto.com/10803129/1709712

Linux system and Application upgrade methods

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.