Yum install through another server

I have two servers (CentOS 6.2) on the same network. One of them (server1) has access to the Internet, and the other (server2) does not.
I need to configure my servers so that server2 can install packages!

Please, help!

+4
source share
2 answers

You can configure NAT on a server with Internet access. Or you can configure the squid proxy on your internet server.

This basically means providing Internet access to a machine that does not have one.

By car with internet access:

yum install squid 

Now edit the file /etc/squid/squid.conf. add the following line:

 acl internal_server src XXX.XXX.XXX.XXX/32 

where XXX.XXX.XXX.XXX is inside the ip server

next add:

 http_access allow internal_server 

and finally restart the squid server:

 /etc/init.d/squid restart 

Now, on the internal server:

edit / etc / yum.conf and add:

 proxy=http://YYY.YYY.YYY.YYY:3128 

Here it is!

+2
source

Try setting up NAT on your internet-connected server. Make this server default gateway for those who do not have internet.

0
source

All Articles