Linux Learning record Five (software installation upgrade)

Source: Internet
Author: User

First, GCC

GCC is the most standard C compiler program on Linux, with a compiled link from source code.

Gcc-c HELLO.C Compilation produces the target file Hello.ogcc-o hello.c compilation produces the target file, and is optimized gcc-o hello hello.c generate hello this executable binary disadvantage: Redundancy of the command, if the C language program contains the Other functions or program references, then other programs will be compiled into the target file, and then compiled into an executable file, in order to run successfully. A large program reference is very much, so with GCC to compile, appear very redundant. Second, makeUse make for macro compilation, the function of making is to simplify the instructions issued during the compilation, if the compilation is completed, modify a source code file, then make will only go to update the file, the other files will not be changed. To use the Make command, it is because the makefile file is written beforehand.  Then the make command installs the file compile link, which greatly simplifies the compilation process. Makefile's basic syntax (to be honest, a bit like Java's ant):

Basic syntax for the makefile variable:
    • Variable and variable contents are separated by =, while both sides can have spaces
    • The left side of the variable can not have tab
    • The contents of variables and variables are not allowed on either side:
    • In customary variables, it's best to capitalize on uppercase letters.
    • Use the variable with the ${variable} or $ (variable)
    • The environment variables of the shell can be applied, such as the cflags variables mentioned
    • Variables can also be given in instruction mode
[email protected] represents the current target Third, TarballInstallation of the basic steps: 1, the general decompression source code to the/usr/local/src folder 2,./configure--PREFIX=/USR/LOCAL/NTP--enable-all-clocks-- Enable-parse-clocks generate makefile files in the destination folder 3, make clean first clears the target file 4 that may be compiled at the time of package, make compiles to binary file 5, make install installation file Four, RPMSoftware installation information is written in/var/lib/rpm/, we query whether there is a need for software upgrade, version of the comparison is derived from this database. RPM installation Software The biggest problem is the software dependency property problem, if the associated software is not installed, then the software can not be installed. RPM Install software and view installation information (install to a custom path): RPM-IVH software name (--prefix/usr/local) RPM test if this software has dependencies: RPM-IVH software name--testrpm upgrade software (software exists, updated Software does not exist, to be installed): RPM-UVH software name rpm upgrade software (software exists, to be updated; Software does not exist, not installed): RPM-FVH software name rpm query software:

List all files that may have been changed on the current system: Rpm-va

Rebuild RPM Database: RPM--REBUILDDB

v. YumYum is currently the most convenient software management tool for Linux, it can automatically handle the dependency property problem of software in order to solve the problem of installing, uninstalling and upgrading software. Yum Query features:

Lists what software is currently available on the server for native upgrades: Yum list updates

Install software: Yum install software name

Upgrade software: Yum Update software name

Uninstall software: Yum Remove software name

To modify the source and configuration files for Yum: Vim/etc/yum.repos.d/centos-base.repo

Delete all software library related data: Yum clean all

Delete downloaded software files: Yum clean packages

Delete the downloaded software file header: Yum clean headers

Features of the Yum software group:

Note: Software group installation By default is not installed optional software, if you want to install the need to modify the configuration file vim/etc/yum.conf, a new line of group_package_types=default,mandatory in the file, Optional

Software upgrades required for system-wide automatic upgrades: yum-y update

Linux Learning record Five (software installation upgrade)

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.