最近使用阿里云觉得还挺不错(主要是也没用过其他的,囧),但是也有不少问题。比如使用公网内网就是个比较头疼的问题——机器没配公网ip就难以访问公网(工单给的方案是vpn去有公网的服务器。。。)。
如何在内网环境下安装配置服务器是个问题,通过搜索和提工单找到了一些没有写在文档中的内网服务,共享一下。
有公网ip的机器也可以适当更改配置加快安装速度,节省一些流量。
1、内网yum源配置:
http://mirrors.aliyuncs.com/repo/Centos-6.repo
#/bin/bash
if [! -f'/etc/yum.repos.d/CentOS-Base.repo.backup'];then
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
fi
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-6.repo
sed -i 's/mirrors.aliyun.com/mirrors.aliyuncs.com/' /etc/yum.repos.d/CentOS-Base.repo
yum makecache
2、内网安装包下载地址示例(用于替换相应的一键安装包中的地址):
外网:http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-1.5.0.tar.gz
内网:http://oss-internal.aliyuncs.co