码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS7配置

时间:2021-04-27 14:17:29      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:--   home   fas   start   install   daemon   remove   ash   nic   


# CentOS7



rm -f /etc/yum.repos.d/*.repo

curl -L "http://mirrors.163.com/.help/CentOS7-Base-163.repo" -o /etc/yum.repos.d/CentOS7-Base-163.repo
curl -L "http://mirrors.aliyun.com/repo/epel-7.repo" -o /etc/yum.repos.d/epel-7-Ali.repo
curl -L "https://mirrors.cnnic.cn/docker-ce/linux/centos/docker-ce.repo" -o /etc/yum.repos.d/docker-ce.repo-Cnnic.repo
sed -i ‘s/https:\/\/download.docker.com/https:\/\/mirrors.cnnic.cn\/docker-ce/‘ /etc/yum.repos.d/docker-ce.repo-Cnnic.repo
yum clean all
yum makecache fast
yum install dnf -y
dnf update
dnf install axel git make gcc g++ -y
#docker
dnf remove "docker*" -y
dnf install docker-ce -y
curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
cat >/etc/docker/daemon.json <<EOF 
{
"graph":"/home/lab/docker/store",
}
EOF
systemctl start docker
systemctl enable docker

#nodejs
curl -L "https://npm.taobao.org/mirrors/node/latest/node-v16.0.0-linux-x64.tar.gz" -o /opt/node-v16.0.0-linux-x64.tar.gz
tar -xzf  /opt/node-v16.0.0-linux-x64.tar.gz -C /usr/local/src/
rm -f /opt/node-v16.0.0-linux-x64.tar.gz
ln -s /usr/local/src/node-v16.0.0-linux-x64/bin/node /usr/bin/node
ln -s /usr/local/src/node-v16.0.0-linux-x64/bin/npm /usr/bin/npm
ln -s /usr/local/src/node-v16.0.0-linux-x64/bin/npx /usr/bin/npx

#proxychains
git clone https://github.com/rofl0r/proxychains-ng.git --depth=1 /opt/proxychains
cd /opt/proxychains
./configure --prefix=/usr --sysconfdir=/etc
make && make install
make install-config
cd ~ && rm -rf /opt/proxychains





CentOS7配置

标签:--   home   fas   start   install   daemon   remove   ash   nic   

原文地址:https://www.cnblogs.com/yzpopulation/p/14702660.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!