centos开发环境安装的备忘
#Cento
visudo运行普通用户$(whomai)执行sudo操作
http://www.cnblogs.com/xianyunhe/archive/2011/08/08/2124342.html
在/etc/gdm/custom.conf文件中添加以下内容
[daemon]
AutomaticLogin=username
AutomaticLoginEnable=True
#virtualbox Guest Host目录共享
udo usermod -a -G vboxsf $(whomai)
#yum源镜像
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backu
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行yum makecache生成缓存
mysql的安装
yum install mariadb-server.x86_64 mariadb.x86_64
ystemctl enable mariadb.service
ystemctl start mariadb.service
#docker的安装
http://git.oschina.net/wushifeng/hivedocker/blob/master/ready.sh
#!/usr/bin/env bash
#1 centos上安装docker
if [ -f /usr/bin/docker ]; the
echo 'docker installed'
else
udo yum install docker.x86_64
docker -h
udo systemctl enable docker.service
fi
#2 docker的仓库镜像的国内站点
https://www.daocloud.io/mirror#accelerator-doc
http://guide.daocloud.io/dcs/daocloud-9153151.html
#https://yq.aliyun.com/articles/29941
#Docker 镜像加速器
#docker version <=1.10
:<<EOF
udo cp -n /lib/systemd/system/docker.service /etc/systemd/system/docker.service
udo sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-mirror=<your accelerate address>|g" /etc/systemd/system/docker.service
udo systemctl daemon-reload
udo service docker restart
EOF
#docker version >1.10
udo mkdir -p /etc/docker
udo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://2mt5bmc8.mirror.aliyuncs.com"]
}
EOF
udo systemctl daemon-reload
udo systemctl restart docker
#3 普通用户使用dcoker
#普通的用户直接使用docker命令运行 [设置完成后,注销用户重新登陆]
udo groupadd docker
udo gpasswd -a $(whomai) docker
udo systemctl restart docker
docker debian source
默认
deb http://deb.debian.org/debian wheezy mai
deb http://deb.debian.org/debian wheezy-updates mai
deb http://security.debian.org wheezy/updates mai
使用163的源
echo "deb http://mirrors.163.com/debian wheezy main non-free contrib" >/etc/apt/sources.list
echo "deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free" >>/etc/apt/sources.list
echo "deb http://mirrors.163.com/debian wheezy-updates main contrib non-free" >>/etc/apt/sources.list
echo "deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free " >>/etc/apt/sources.list
echo "deb http://http.us.debian.org/debian wheezy main contrib non-free" >>/etc/apt/sources.list
echo "deb http://security.debian.org wheezy/updates main contrib non-free" >>/etc/apt/sources.list
#mave
http://www.cnblogs.com/ae6623/p/4416256.html ~/.m2/settings.xml
yum install maven.noarch
阿里云的镜像
#nodej
https://npm.taobao.org/
https://cnpmjs.org/