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_installeclipse-workspacePerl_Project_MHA

 5.eclipse导入perl文件

原文地址:https://www.cnblogs.com/rangle/p/9115300.html