欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  运维

centos开发环境安装实例讲解

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

以上就是centos开发环境安装实例讲解的详细内容,更多请关注其它相关文章!