Linux no network installation GCC skills

  

GCC is a GNU compiler suite, need to be installed in the network, its installation is simple, but can not install GCC without network? In fact, it is ok, the following small series will introduce you to the Linux no network installation GCC skills, let's get to know it.

install gcc only one instruction in the presence of network conditions: yum install gcc So how to install gcc without a network situation? Although there is no network, you need to have an installation CD or ISO image. Use the installation CD or ISO image to mount a local yum source and use this to install gcc.

Step:

One: Mount the yum source, I am using the ISO image here to enter the command: mount -o loop xxxx.iso /media/CentOS/

Description: xxxx.iso is your image file name (note the path is correct)

/media/Centos/This is the file address after mounting, Centos is built by yourself, you can also choose the path 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 #名了

baseurl=file: ///media/Centos #Remember that the address of the image you just mounted is not, yes, it is

gpgcheck=1

enabled=1

gpgkey=file :///etc/media/Centos/RPM-GPG-KEY-CentOS-6 #Always pay attention to the path

3. Exit the save.

4. Enter the command: gcc -v to see if there is any reaction.

The above is the introduction of Linux no network installation GCC skills, the premise is that you have to install CD or ISO image, otherwise you can not install, although no network can also install GCC, but relatively copy will be a lot, recommended Use the network to install GCC.

Copyright © Windows knowledge All Rights Reserved