centos常用环境安装
Last updated
Was this helpful?
Last updated
Was this helpful?
参考: nodejs 官网: curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
yum -y install nodejs
安装cnpm,淘宝npm工具,提高npm下载包的速度
cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
官方文档: 参考:
step1:Docker 要求 CentOS 系统的内核版本高于 3.10 uname -r
step2:移除旧版本
step3: 安装一些必要的系统工具
安装 docker-compose
使用国内docker仓库源
step1:添加CentOS 7 EPEL 仓库 yum install epel-release
step2:安装Nginx yum install nginx
step4: 添加软件源信息,这里使用aliyun的。 官方源: yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
step5:更新 yum 缓存 yum makecache fast
step6:安装 Docker-ce yum -y install docker-ce
step7:启动 Docker 后台服务 systemctl start docker
step8:测试运行 hello-world docker run hello-world
官方文档: step1: 注意这里的版本号,最新版请从这里获取 curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
step2:添加可执行权限 chmod +x /usr/local/bin/docker-compose
docker-compose --version
step3: [可选] 安装 命令行提示
针对Docker客户端版本大于 1.10.0 的用户 您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器(没有这个文件可以创建) 从这个地址获取aliyun专属源地址:
参考: