以root
用户登录到服务器
安装以下依赖:
yum -y groupinstall "Development tools"
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libpcap-devel xz-devel
更新pip
python -m pip install --upgrade pip
mv /usr/bin/pip /usr/bin/pip.backup
ln -s /usr/local/bin/pip3.7 /usr/bin/pip
新增pip.conf文件
mkdir ~/.pip/
vim ~/.pip/pip.conf
添加如下内容:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com
timeout = 120
安装x-tuner:
cd /opt/install/app/bin/dbmind/xtuner
pip install -r requirements-x86.txt
进入tuner目录下:
cd tuner
export PYTHONPATH='..'
cd ..
新建setup.cfg文件
vim setup.cfg
添加如下:
[easy_install]
index_url = http://mirrors.aliyun.com/pypi/simple/
开始安装:
python setup.py install
验证:
gs_xtuner --help
遇到的问题:/tmp存储空间不足,如No Space Left xxxxx
解决方法:
编辑:
vim /etc/fstab
文件末尾添加(调整/tmp为2G):
tmpfs /tmp tmpfs nodev,nosuid,size=2G 0 0