我發現mongo-hacker項目,但它不支持Windows,所以我想知道是否有人知道類似的一個?有沒有mongo shell擴展的windows?
2
A
回答
4
老實說,我無法找到其與Windows連接的限制,除了:
在Makefile
和
-
命令
- http://docs.mongodb.org/manual/release-notes/2.2/#windows-specific-changes(其中規定,即WinXP的不支持2.2 )
- 在
mongo_hacker.js
README
檢查_isWindows()
我已經使用了相當長的時間蒙戈數據庫在* nix和Windows中,唯一的區別是我在Win版本中缺少參數。
所以我會嘗試做(在Win7 FE):
- 刪除
_isWindows()
線 - 開始蒙戈終端上的一些測試DB與
--shell
命令,只是這個
mongo localhost/test --shell mongo_hacker_custom.js
然後,如果一切工作正常,您可以填寫~/.mongorc.js
mongo_hacker_custom.js
內容,而不創建符號鏈接(BTW,從Vista開始Windows也支持它們,所以符號鏈接也是合適的)。
P.S.現在我不能嘗試這個解決方案,我自己會在幾個小時內檢查建議的解決方案。
UPD:葉氏,它似乎是工作就好了我的Windows 7 + MongoDB的2.2.1
0
該行的唯一原因是由於ANSI着色在Windows終端/ CMD不工作窗口(Esc
字符得到輸出,而不是解釋)。
禁用着色(有幾種方法,但清空'常量'或NOPing低級別的調用,一切都結束了調用這兩個工作),並刪除檢查的Windows可以使用它。
你的另一種方法是至少工作screen
作爲輸出顏色下運行它有(但不提示的顏色出於某種原因)。
2
mongo-hacker does work on windows but a little work is required : ----------------------------------- 1) Make your own mongo configuration file (.mongorc.js) ----------------------------------- This is located in your documents : %USERPROFILE%\.mongorc.js eg. C:\Users\Olivier\.mongorc.js A) Make all files from mongo-hacker into one big JS file. ----------------------------------- A.1. If you have cygwin (or some unix emulation tools) : There might be a better way to achieve this but this will work. Once the .zip file is unzipped, and your are in \mongo-hacker-master\hacks find ./ -type f -name "*.js" | xargs cat > .mongorc.js You can then move this file to your documents. A.2. Else : Or, if more convenient here is my version (v 0.0.4 at the time of writting) : Download : .mongorc.js example for windows And copy this file in your documents. ----------------------------------- 2) Get the coloring working : ----------------------------------- A) Download : ansicon ----------------------------------- This processes ANSI escape sequences for Windows console programs. B) Add this to your windows path ----------------------------------- To get there : > Click on start menu > Right click on computer > Properties > Advanced system settings > Environment variables Once there, in the 2nd section (system variables) : You will see variable : Path > Click on its value, and add the path to the ansicon.exe program, eg : C:\Program Files\ansicon\x64; C) Then ----------------------------------- You can now prefix your command with ansicon to get the coloring working : eg : $ ansicon.exe mongodb
----------------------------------- 3) Get a proper shell ----------------------------------- The out of the box windows shell (cmd.exe), being what it's, I'd really recommand that you get a proper shell. For example : console is a very nice program. I hope this helps !
相關問題
- 1. 沒有擴展
- 2. 沒有擴展名
- 3. 結構 - 有沒有辦法擴展shell變量?
- 4. Mongo shell沒有顯示內容
- 5. Mongo shell用戶沒有定義
- 6. PHP查找擴展沒有擴展名
- 7. 沒有UI的擴展
- 8. Chrome的captureVisibleTab沒有擴展
- 9. 沒有擴展MapActivity的MapView
- 10. 沒有擴展名的shell腳本的ctags
- 11. 使用.findOne()擴展與Sails,Mongo和Waterline的關聯有沒有標準方法?
- 12. Bash shell擴展給出的命令沒有找到
- 13. Winapi shell擴展覆蓋Windows命令
- 14. PHP鏈接沒有擴展
- 15. psutil沒有C擴展
- 16. PHP擴展沒有發現
- 17. Chrome擴展:沒有彈出
- 18. IIS文件沒有擴展
- 19. AS3 CustomEvent沒有被擴展?
- 20. ffmpeg擴展沒有安裝
- 21. 容器沒有擴展
- 22. 的.htaccess - 301重定向的所有文件沒有擴展到有.html擴展
- 23. 如何從chrome擴展中執行shell命令;有沒有提供的方法?
- 24. 骨幹JS有沒有方法擴展
- 25. Magento擴展 - 有用或沒有
- 26. Backbone.Model有沒有方法「擴展」
- 27. 有沒有官方擴展hgFlow在TortoiseHG
- 28. 有沒有辦法'擴展'#define指令?
- 29. 有沒有IE webstore上傳擴展
- 30. 有沒有辦法擴展ThreeJS對象?
嗯,我試過了,輸出着色不工作對我來說,它會爲你嗎? – Restuta 2013-02-21 22:07:32
沒有,着色不爲我工作,但我在測試它的方法,傭工,並且也表明了我的一些元信息,如服務器/數據庫 – n1ckolas 2013-02-21 22:11:25
是啊,這工作,我可能會派生它並擴展爲Windows。 – Restuta 2013-02-21 22:19:09