# 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"
edit the file /etc/yum.conf and add line
proxy=http://proxy_ip:port/
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