CentOS7安装软件个人脚本
1、安装python39
mkdir -p /home/python39 &&
cd /home/python39 &&
yum install -y wget tar zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel&&
wget http://npm.taobao.org/mirrors/python/3.9.0/Python-3.9.0.tgz --no-check-certificate &&
tar -zxvf Python-3.9.0.tgz &&
cd Python-3.9.0 &&
./configure prefix=/usr/local/python39 &&
make -j8 &&
make install -j8 &&
ln -s /usr/local/python39/bin/python3.9 /usr/bin/python3 &&
ln -s /usr/local/python39/bin/pip3.9 /usr/bin/pip3
2、安装node_exporter1.4.0
mkdir -p /etc/node-exporter &&
cd /etc/node-exporter &&
yum install -y wget tar &&
wget https://github.com/prometheus/node_exporter/releases/download/v1.4.0/node_exporter-1.4.0.linux-amd64.tar.gz &&
tar -zxvf node_exporter-1.4.0.linux-amd64.tar.gz &&
cat > /etc/systemd/system/node_exporter.service << EOF &&
[Unit]
Description=node_exporter
After=network.target
[Service]
Type=simple
User=root
ExecStart=/etc/node-exporter/node_exporter-1.4.0.linux-amd64/node_exporter
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload &&
systemctl start node_exporter &&
systemctl enable node_exporter &&
systemctl start firewalld &&
systemctl enable firewalld &&
firewall-cmd --permanent --add-port=9100/tcp &&
firewall-cmd --reload &&
systemctl stop firewalld &&
systemctl disable firewalld
3、安装git2.38
yum remove -y git &&
mkdir -p /home/git-2.38-package &&
cd /home/git-2.38-package &&
yum install -y wget &&
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.38.0.tar.gz --no-check-certificate &&
yum install -y curl-devel expat-devel openssl-devel gcc-c++ &&
tar -zxvf git-2.38.0.tar.gz &&
cd git-2.38.0 &&
./configure --prefix=/usr/local/git &&
make -j8 &&
make install -j8 &&
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile &&
source /etc/profile &&
git --version
标签:脚本,node,git,tar,devel,CentOS7,usr,&&,软件
From: https://www.cnblogs.com/rainbow-tan/p/16776154.html