在64位Windows Server 2008 R2上安装mtools

该安装向导提供了循序渐进的指南,用于在Microsoft Windows Server 2008 R2上安装mtools。

 

前提

  • Windows Powershell需要被安装。

  • 该主机必需能访问互联网。

 

安装步骤

1. 下载和安装Python 2.7.x(当前版本2.7.10)

a) 进入https://www.python.org/downloads/

b) 选择最新的2.7.x目录。

c) 下载Windows x86-64 MSI Installer(不是32位Windows x86 MSI Installer)。

d) 在安装过程中,包含“Add python.exe to Path”选项(默认被禁用)。   
注意:可通过Powershell来验证和设置PATH环境变量,详细内容可参见《Powershell环境变量》。    
显示PATH环境变量的值:    
PS> $env:PATH    
设置主机上PATH环境变量的值:    
PS> [environment]::SetEnvironmentvariable(“PATH”,”;C:\Python27;C:\Python27\Scripts”,”User”)    
PS> [environment]::GetEnvironmentvariable(“PATH”,”User”)    
验证环境变量已成功配置:    
在64位Windows Server 2008 R2上安装mtools


2. 下载和安装matplotlib 1.4.x(当前版本1.4.3)

a) 进入http://matplotlib.org/downloads.html并下载matplotlib-1.4.3.win-and64-py2.7.exe

b) 安装matplotlib。


3. 下载和安装NumPy 1.9.x(当前版本1.9.2)

a) 没有可用的64位二进制安装包(从这里查看原因),但是一个非官方的二进制文件可以在这里找到http://www.lfd.uci.edu/%7Egohlke/pythonlibs/#numpy

b) 下载numpy-1.9.2+mkl-cp27-none-win_amd64.whl。

c) 在Powershell,修改到下载路径下,安装:   
pip.exe install numpy-1.9.2+mkl-cp27-none-win_amd64.whl    
在64位Windows Server 2008 R2上安装mtools


4. 通过pip安装pyparsing

a) 在Powershell,运行:   
pip.exe install pyparsing    
在64位Windows Server 2008 R2上安装mtools


5. 通过pip安装mtools

a) 在PowerShell,运行:   
pip.exe install mtools    
在64位Windows Server 2008 R2上安装mtools

 

用法

你现在可以从Powershell运行mtools脚本工具mloginfo.exe、mlogfilter.exe、mplotqueries.exe和mlogvis.exe。注意mlaunch当前不支持Windows平台。

示例Powershell命令:

PS> mlogfilter.exe .\mongod.log –slow | mplotqueries.exe

它将发现日志文件中的所有慢查询并显示为图表。   
在64位Windows Server 2008 R2上安装mtools

在64位Windows Server 2008 R2上安装mtools
















本文转自UltraSQL51CTO博客,原文链接: http://blog.51cto.com/ultrasql/1680156,如需转载请自行联系原作者