MHA源碼分析——環境部署
為了更好地了解MHA的原理,計劃對MHA源碼進行詳細的閱讀,本文主要為部署源碼閱讀環境。
一、概述
mha是由perl語言開發,這里想通過eclipse+perl組件來閱讀其源碼,所以我們環境需要安裝eclispe軟件、perl軟件以及eclipse perl插件,最后及時將mha源碼包導入eclipse程序。
| 軟件名稱 | 版本 | 備注 |
| 操作系統 | windows 10 X64 | |
| eclipse | Version: Oxygen.3a Release (4.7.3a) | |
| AcitvePerl for Windows | ActivePerl-5.24.3.2404-MSWin32-x64-404865 | https://www.activestate.com/activeperl/downloads |
| EPIC | Eclipse Perl Integration | http://www.epic-ide.org/download.php |
二、環境搭建
1.perl安裝


下面安裝類型我這邊選擇的是經典安裝(typical)




安裝完,通過cmd命令檢查:perl -v

2.eclipse安裝
略(可參考我之前的文章,mycat源碼分析)
3.EPIC安裝
After starting Eclipse select Help > Install New Software... from the menu. Click the Add... button and enter:
http://www.epic-ide.org/updates for the stable 0.6.x, older version of EPIC
http://www.epic-ide.org/updates/testing for the most recent 0.7.x version





安裝完需要重啟eclipse,安裝EPIC完畢

4.eclipse創建perl工程
我們要使用perl程序,需要創建perl工程兵配置perl編譯器,否則會報錯

創建perl工程




在perl include path寫入工程絕對路徑D:\app_install\eclipse-workspace\Perl_Project_MHA

5.eclipse導入perl文件


浙公網安備 33010602011771號