1.添加新用户
useradd download
passwd download
2.为新用户添加sudo权限
root用户下vi /etc/sudoers
添加 download ALL=(ALL) NOPASSWD:ALL
参考博客:https://blog.csdn.net/lyn1772671980/article/details/80338587
3.安装setuptools
wget https://files.pythonhosted.org/packages/6e/9c/6a003320b00ef237f94aa74e4ad66c57a7618f6c79d67527136e2544b728/setuptools-40.4.3.zip
unzip setuptools-40.4.3.zip
cd setuptools-40.4.3
python setup.py install
4.升级pip
python -m pip install --upgrade --force pip
5.安装所需包
5.1 安装MySQL-python时,需要安装yum install libmysqlclient-dev,若yum报错,可能需要参考
https://blog.csdn.net/weixin_42289193/article/details/85868722
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.beifen
5.2 https://www.cnblogs.com/lifan1998/p/10099187.html 删除某些,新建某些
5.3 若是conda虚拟环境 可以直接conda install MySQL-python即可,注意有的版本没有,不带版本号
6.安装java(java官网下载jdk需要登录,比较麻烦,下载网盘里的)
https://pan.baidu.com/s/1ykSB3dsaYR1ow1iaU3FScg&shfl=sharepset
https://www.cnblogs.com/stulzq/p/9286878.html
7.提示telnet不是命令
若系统为centos6.8的话,yum list telnet*显示没有相关的包
则需要到https://vault.centos.org/6.8/os/x86_64/Packages/上下载相关的telnet-xxx.rpm以及telnet-server-xxx.rpm,一般依赖xinetd,安装telnet-server前需要先安装xinetd,然后开启
rpm -ivh telnet-0.17-48.el6.x86_64.rpm
rpm -ivh xinetd-2.3.14-40.el6.x86_64.rpm
rpm -ivh telnet-server-0.17-48.el6.x86_64.rpm
service xinetd start
以上安装好了即可使用telnet命令
8.安装nfs
yum install nfs-utils
9.要是需要用到mongoexport、mongodumps等命令,需要安装mongodb-org-tools
在这里https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/RPMS/找到合适的版本比如centos6.8适应3.4.2.1,
rpm -ivh mongodb-org-tools-3.4.2-1.el7.x86_64.rpm
若报如下错误
strings /lib64/libc.so.6 | grep GLIBC查看是否缺少
下载rpm包
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/nscd-2.17-55.el6.x86_64.rpm &
下载好后,安装包如下:
sudo rpm -Uvh *-2.17-55.el6.x86_64.rpm --force --nodeps
安装后再次查看strings /lib64/libc.so.6 | grep GLIBC
发现可以了
继续执行 rpm -ivh mongodb-org-tools-3.4.2-1.el7.x86_64.rpm
输入 mongexport --help查看