CentOS7配置

2021/4/26 7:25:29

本文主要是介绍CentOS7配置,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

# 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配置的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程