centos下源码安装python3
wget --no-check-certificate https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
python3的环境依赖安装
yum -y install xz tar gcc make tk-devel wget sqlite-devel zlib-devel readline-devel openssl-devel curl-devel tk-devel gdbm-devel xz-devel bzip2-devel
编译
./configure --prefix=/usr/local/python3
make make install
修改环境变量
echo ‘export PATH=/usr/local/python3/bin:$PATH‘ >> /etc/profile
source /etc/profile
或者建立软连接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
下载pip3
wget --no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gz
解压
tar -zvxf 9.0.1.tar.gz
cd pip-9.0.1/
python3 setup.py install
建立软连接
ln -s /usr/local/python3/bin/pip /usr/bin/pip3
mysql安装
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum -y install mysql mysql-server mysql-devel
mongodb安装
创建yum源文件:
vi /etc/yum.repos.d/mongodb-org.repo
添加如下配置
[mongodb-org]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
安装之前先更新所有包 :yum update (可选操作)
安装命令:
yum -y install mongodb-org
卸载MongoDB
sudo yum erase $(rpm -qa | grep mongodb-org) #卸载MongoDB
sudo rm -r /var/log/mongodb #删除日志文件
sudo rm -r /var/lib/mongo #删除数据文件
docker 安装
卸载老版本
sudo yum remove docker \
docker-common \
docker-selinux \
docker-engine
设定数据仓库配置
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
安装命令
sudo yum install docker-ce
开启服务
sudo systemctl start docker
sudo docker run hello-world
需要阿里云账号,没有请先注册
配置阿里云镜像加速
{
"registry-mirrors": ["https://xxxxx.mirror.aliyuncs.com"]
}
原文地址:https://www.cnblogs.com/hllcoder/p/10585669.html