centos_init

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service
进入到/etc/selinux/config文件

vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled

安装常用的组件

yum groupinstall "Development Tools" -y

yum install dnf libffi-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make vim wget -y

编译安装git

/opt/programs/git

cd /opt
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.1.tar.gz
tar -zxvf git-2.25.1.tar.gz
cd git-2.25.1

./configure --prefix=/opt/programs/git && make && make install

ln -sf /opt/programs/git/bin/git /usr/bin/git

编译安装python

mkdir -p /opt/programs/python38
cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
tar -zxvf Python-3.8.2.tgz
cd Python-3.8.2
./configure --prefix=/opt/programs/python38 && make && make install

ln -sf /opt/programs/python38/bin/python3 /usr/bin/python3
ln -sf /opt/programs/python38/bin/pip3 /usr/bin/pip3

添加pip镜像源

mkdir -p ~/.pip
tee ~/.pip/pip.conf <<-'EOF'
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
EOF

你可能感兴趣的:(初始化配置)