1、找台可以上网的服务器且能连接到内网,配置nginx代理
location /centos {
proxy_pass
http://mirrors.163.com/centos/6/os/x86_64;
}
location /php {
proxy_pass
https://mirrors.tuna.tsinghua.edu.cn/epel/6/x86_64;
}
location /nginx {
proxy_pass
http://nginx.org/packages/centos/6/x86_64;
}
location /nginx1 {
proxy_pass
http://nginx.org/packages/mainline/centos/6/x86_64;
}
location /php55 {
proxy_pass
http://rpms.remirepo.net/enterprise/6/php55/x86_64;
}
location /remi {
proxy_pass
http://rpms.remirepo.net/enterprise/6/remi/x86_64;
}
location /test {
proxy_pass
http://rpms.remirepo.net/enterprise/6/test/x86_64;
}
location /debug {
proxy_pass
http://rpms.remirepo.net/enterprise/6/debug-remi/x86_64;
}
location /remi-debug {
proxy_pass
http://rpms.remirepo.net/enterprise/6/debug-php55/x86_64;
}
location /pubkey {
proxy_pass
https://rpms.remirepo.net/RPM-GPG-KEY-remi;
}
2、在内网服务器下载公钥到/etc/pki/rpm-gpg/ #否则会安装包时会报错
Wget http://nginx服务器ip/pubkey
Rpm --import /etc/pki/rpm-gpg/*
3、配置yum源,地址为nginx服务器ip
[centos]
name=centos
baseurl=http://132.97.34.66/centos
enabled=1
[php55]
name=php55
baseurl=http://132.97.34.66/php55
enabled=1
[remi]
name=remi
baseurl=http://132.97.34.66/remi
enabled=1
[test]
name=test
baseurl=http://132.97.34.66/test
enabled=1
[debug]
name=debug
baseurl=http://132.97.34.66/debug
enabled=1
[remi-debug]
name=remi-debug
baseurl=http://132.97.34.66/remi-debug
enabled=1
[php]
name=php
baseurl=http://132.97.34.66/php
enabled=1
[centos]
name=centos
baseurl=http://132.97.34.66/centos
enabled=1
[nginx]
name=nginx
baseurl=http://132.97.34.66/nginx
enabled=1
[nginx1]
name=nginx1
baseurl=http://132.97.34.66/nginx1
enabled=1
4、后续步骤参考安装文档
www.nginx.cn/doc/