A detailed introduction to different object upgrade methods of Linux system

Source: Internet
Author: User

When we're using Linux for a while, we're not going to be satisfied that we're always working on a system without any changes, but we are eager to upgrade our Linux as we do in Windows. Linux, on the other hand, is an open system, with new software appearing every day, and Linux distributions and kernels constantly being updated. In such cases, learning to upgrade Linux (including the system itself and various software) is very urgent.

1. Upgrade General Software

In general, it's easier to upgrade your application because you don't have to worry too much about the impact of the upgrade on other software (if you are upgrading the system, the situation is different). First, you must find a new version that you want to upgrade. You can find your favorite software on Linux's dedicated site. The software is then downloaded to the specified directory using a variety of download tools. Most of the software you download is a 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 you process the software. Because the resulting software may be binary files or source code, use the above commands to see what kind of file.

If it is a binary file, you can usually open the package directly, and then delete the corresponding old files on it.

If it is a source file, be aware that the package has 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 effort means compiling the source code. First of all to modify the makefile file, modified content and modified methods in the software package in the relevant files can often be found, and sometimes the package will contain a shell program configure, it can save a lot of time. When you have finished processing makefile, you can use the make command to compile the specified file. Finally, use the Make install command to install the software on your computer.

2. Upgrade the compiler

We can use the "gcc-v" command to look at our current version of GCC, and then decide whether to upgrade. When we need to upgrade our GCC, connectors, assembler, and various header files and libraries, we can get the corresponding packages on the relevant sites, then fight in the specified directory, and delete (overwrite) old files.

3. Upgrade function library

Because you want to reassign the connection to the library after the upgrade, the function library is cumbersome. We know that the Linux system's library files are divided into the archives and shared libraries of two types. The files in the archives are generally libx.a, and the files of the shared libraries are generally libx.so.version, and the new version must be used when upgrading the function library. A and. The so.version file replaces the old version of the corresponding file. Right. A file is very easy, as long as the new file is copied into the specified directory, overwriting the original file can be. But we need to be very careful when we operate on shared libraries. You must not simply copy the new file to a directory, and then delete the old file. Because it is possible that the old function library is being used for a program. We have to make sure that each program is able to find the shared library correctly. Simply, when we put the new version of the shared library file in the specified directory, 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 document);

For example:/usr/lib/libdb.so.2 originally pointed to the file is/usr/llib/libdb.so.2.0.1, now has a new file/usr/lib/libdb.so.2.78.1, we can handle this: 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 ... A CD-ROM allows the entire system to be fully covered. Of course, this kind of upgrade method is more troublesome, at the same time, each upgrade means that the original file is likely to be lost, so there is no need to always reinstall the system once. Each Linux release kit is actually a file that records upgrades. 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 that we need to upgrade. Then find the appropriate part of the package, using installpkg filename or rpm–u filename To install the package on the computer.

The above share the Linux system under the general software, compiler, system kernel and the system itself upgrade skills, I hope that the real can help you upgrade the Linux system better.

Related Article

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.