Skip to content

Instantly share code, notes, and snippets.

@ochinchina
Last active August 29, 2015 14:26
Show Gist options
  • Save ochinchina/655a955f1a1af2607a4b to your computer and use it in GitHub Desktop.
Save ochinchina/655a955f1a1af2607a4b to your computer and use it in GitHub Desktop.
install the centos7 in virtualbox behind the firewall

install the minimal centos-7 in the virtualbox

add host-only network adapter

set the ip address for enp0s3

# ip addr add 10.0.2.15/24 enp0s3

or edit the file /etc/sysconfig/network-scripts/ifcfg-enp0s3, change the ONBOOT from "no" to "yes"

add the proxy for yum

edit the file /etc/yum.conf and add line

proxy=http://proxy_ip:port/

set the route for proxy_ip

if the ip address is set for enp0s3 by "ip addr add" command, we need to set the route for proxy_ip with following command:

# ip route add proxy_ip via 10.0.2.15

If the ip address of enp0s3 is got by changing the ONBOOT from "no" to "yes", no need to set the route for proxy_ip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment