在64位Windows Server 2008 R2上安裝mtools

來源:互聯網
上載者:User

標籤:mtools   mongodb   powershell   

在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”)    
驗證環境變數已成功配置:    
650) this.width=650;" title="clip_image002" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px;" alt="clip_image002" src="http://s3.51cto.com/wyfs02/M02/70/9A/wKiom1W52LTiExS1AABT3mHQJc0833.jpg" border="0" height="37" />


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    
650) this.width=650;" title="clip_image004" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px;" alt="clip_image004" src="http://s3.51cto.com/wyfs02/M00/70/9A/wKiom1W52LSBQCPmAAD_WFPVwIA484.jpg" border="0" height="119" />


4. 通過pip安裝pyparsing

a) 在Powershell,運行:  
pip.exe install pyparsing    
650) this.width=650;" title="clip_image006" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px;" alt="clip_image006" src="http://s3.51cto.com/wyfs02/M01/70/9A/wKiom1W52LXg_ssxAADXlO9JkVU604.jpg" border="0" height="119" />


5. 通過pip安裝mtools

a) 在PowerShell,運行:  
pip.exe install mtools    
650) this.width=650;" title="clip_image008" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px;" alt="clip_image008" src="http://s3.51cto.com/wyfs02/M01/70/9A/wKiom1W52LaQcRfpAAKYq5KAeyE108.jpg" border="0" height="279" />

 

用法

你現在可以從Powershell運行mtools指令碼工具mloginfo.exe、mlogfilter.exe、mplotqueries.exe和mlogvis.exe。注意mlaunch當前不支援Windows平台。

樣本Powershell命令:

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

它將發現記錄檔中的所有慢查詢並顯示為圖表。  
650) this.width=650;" title="clip_image010" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px;" alt="clip_image010" src="http://s3.51cto.com/wyfs02/M00/70/97/wKioL1W52qfSnkSUAARJFMgsY40184.jpg" border="0" height="616" />

650) this.width=650;" title="clip_image012" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" alt="clip_image012" src="http://s3.51cto.com/wyfs02/M01/70/97/wKioL1W52qjyJvaFAAKMedavB70810.jpg" border="0" height="589" />

本文出自 “SQL Server Deep Dives” 部落格,請務必保留此出處http://ultrasql.blog.51cto.com/9591438/1680156

在64位Windows Server 2008 R2上安裝mtools

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.