How to install GCC without a network

Source: Internet
Author: User

To install GCC on a network, you only need one command: Yum install GCC. How can you install GCC without a network? Although there is no network, I think you should have a CD or ISO image. If there is no such image, then.

If you have these, we only need to use the installation CD or ISO image to mount a local Yum source and use this to install GCC.

I. Mount the yum source. I use an ISO image to input the command "Mount-o loop XXXX. ISO/Media/centos/" on the terminal/

Note: XXXX. ISO is your image file name (correct path)

/Media/centos/This is the address of the mounted file. centos is built by yourself. You can also select the path by yourself;


2: Modify/etc/yum. Repos. d/CentOS-Media.repo

1. First enter the file: VI/etc/yum. Repos. d/CentOS-Media.repo

2. Modify the file as follows:

C6-media
Name = centos-$ releasever-media # Name
Baseurl = file: // media/centos # remember the address of the image you just mounted.
Gpgcheck = 1
Enabled = 1
Gpgkey = file: // etc/Media/centos/RPM-GPG-KEY-CentOS-6 # still pay attention to the path

3. Exit and save.

4. Enter the command gcc-V to check whether the response is correct.





How to install GCC without a network

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.