Linux System Upgrade Method

Source: Internet
Author: User

After using linux for a period of time, we naturally don't want to work in a system without any changes. Instead, we are eager to constantly upgrade our linux system like in windows. On the other hand, linux itself is an open system. New software is available every day, and the linux distribution kit and kernel are constantly updated. Under such circumstances, it is very urgent to learn to Upgrade linux, including the system itself and various software.
In a Linux environment, the upgraded object can be a general software, a compiler, a system kernel, or even the system itself. The following describes how to upgrade different objects.
1. Upgrade General Software
In general, upgrading the application software is relatively simple, because you don't have to worry too much about the impact on other software after the upgrade. If you upgrade the system, the situation will be different ). First, you must find the new version of the software you want to upgrade. You can find your favorite software on a linux site. Then download the software to the specified directory using various download tools. Most of the downloaded software is a tar-packed gzip file.
Before processing these software, you 'd better use the tar tvf or tar ztvf command to see what files are included in the downloaded files. Because the obtained software may be a binary file or source code, you can use the above command to see which file is actually used.
If it is a binary file, you can open the package directly, and then delete the corresponding old file.
If it is a source file, pay attention to whether the package contains help and the installation file readme/install/help. Open the software to the specified directory, carefully check the prompts and installation conventions in the help and installation files, and then install the software. In this case, the installation requires compiling the source code. First, modify the makefile file. The modified content and modification method can be found in the related files in the software package. In addition, the software package contains a shell program configure, it can save a lot of time. After processing the makefile file, you can use the make command to compile the specified file. Run the make install command to install the software on your computer.
2. Upgrade the Compiler
We can first check our current gcc version gcc-v and then decide whether to upgrade. When we need to upgrade our gcc, connector, assembler, and various header files and function libraries, we can get the corresponding software package on the relevant site and open it in the specified directory, delete and overwrite the existing files.
3. Upgrade the function library
It is troublesome to upgrade the function library because you need to re-specify the database connection after the upgrade. We know that library files in linux are divided into two types: Archive and shared library. The file in the archive is generally libx. a, while the file in the shared library is generally libx. so. version. the new version must be used to upgrade the function library. a and. so. replace the version file with the corresponding file of the old version. It is very easy for. a file. You only need to copy the new file to the specified directory to overwrite the original file. However, we should be very careful when operating the shared library. 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 by a program. We must ensure that every program can find the shared library correctly. To put it simply, when we put the new version of the shared library file under the specified directory, we can use the ln command to complete the process:
Ln-sf/usr/lib/libdb. so. new ("new" indicates the new version number)/usr/lib/libdb. so. old ("old" is the original file)
For example
/Usr/lib/libdb. so.2 the original file is/usr/lib/libdb. so.2.0.1, now has a new file/usr/lib/libdb. so.2.78.1, we can handle it like 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 upgrade method is ...... The entire system can be fully included in a cd-rom. Of course, such an upgrade method is troublesome. At the same time, each upgrade means that the original file may be lost. Therefore, there is no need to always reinstall the system. Each linux release kit actually has a file that records the upgrade status. For example, a changelog.txt file in slackware records the updating status of slackware in chronological order. In redhat, It is/redhat-4.2/updates/00readme. errata. We can see from these files whether the upgrade is required. Find the corresponding software package and use
Installpkg filename or
Rpm-U filename to install the software package on the computer.
For more information about linux, see.

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.