最新的mtools工具最简单的方式,通过安装python3.6,3.7,3.8 然后使用 pip3 install mtools 即可
我当前使用的centos7.3,不支持python3.x 需要编译安装
开始安装最新的 python-3.8.2 当加上 --enable-optimizations 参数,make的时候报错,经查,是因为gcc版本太低,需要gcc8以上才可以。如果不加 --enable-optimizations 参数,pip3 怎么编译也不支持ssl,使用pip3 install xxx 一直报错。
pip isconfigured with locations that require TLS/SSL, however the ssl module inPython isnotavailable.
只能退而求其次。
使用python-3.7.6 ,使用默认 yum install -y openssl-devel 然后
清除之前编译缓存 make distclean
./configure --enable-optimizations --with-ssl-default-suites=openssl 即可通过。
--with-ssl-default-suites=openssl 一定指定 openssl,默认会指定python, pip3 安装好后也是不支持ssl
mtools 安装好之后,里面是一个工具箱,
经常用到的慢日志分析:
mloginfo mongodb.log --queries --sort count
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!