在Redhat/Centos上安装和配置TortoiseHg和kdiff3
来源:互联网 发布:美国枪击案与网络恶搞 编辑:程序博客网 时间:2024/05/01 05:07
一、前言
这篇文章本来是开发工具箱系统的第3篇,但身边的一些同学在安装TortoiseHg和kdiff3时碰到了不少软件的版本和依赖问题,导致无法顺利安装下去。因此,特提前分享我安装这些软件的完整过程,希望对其他的同学有帮助。
二、环境和准备
1、操作系统:Redhat5 / Centos5
2、需要准备的软件及其版本(都是通过源代码编译进行安装):
- Python2.7 (Redhat5和Centos5上默认安装的Python为2.4版本,请升级至2.7。升级Python后,重新编译安装mercurial-1.9)
- qt-4.7.3
- kdiff3-0.9.95
- QScintilla-gpl-2.5.1
- iniparse-0.4
- sip-4.12.4
- PyQt-x11-gpl-4.8.5
- tortoisehg-2.1
它们的依赖关系如下图所示:
三、安装QT4
1、下载源代码:
wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz
2、解压源代码包:
tar -zxvf qt-everywhere-opensource-src-4.7.3.tar.gz
3、编译安装三步曲:
进入解压后的目录,分别按顺序执行如下命令:
1)./configure -prefix /home/nieyong/local/qt-4.7.3 (注:prefix前面只有一个"-",prefix 后的目录需根据自己的环境修改,此步骤执行的时间比较久,在我的机器上执行了约2.5小时)
2)gmake
3)gmake install
四、安装kdiff3
1、下载源代码
wget http://nchc.dl.sourceforge.net/project/kdiff3/kdiff3/0.9.95/kdiff3-0.9.95.tar.gzgmake
2、解压源代码
tar -zxvf kdiff3-0.9.95.tar.gz
3、配置环境变量
1)编辑当前用户目录下的.bash_profile文件
vi ~/.bash_profile
加入如下配置:
QTDIR=$HOME/local/qt-4.7.3 (需根据本机环境修改)
export QTDIR
PATH=$QTDIR/bin:$PATH
export PATH
LD_LIBRARY_PATH=$HOME/local/qt-4.7.3/lib:$LD_LIBRARY_PATH (需根据本机环境修改)
export LD_LIBRARY_PATH
2)使环境变量配置生效
source ~/.bash_profile
4、安装kdiff3
进入kdiff3-0.9.95.tar.gz解压后的目录,执行如下命令进行安装:
./configure qt4
五、配置kdiff3
1、编辑当前用户目录下的.hgrc文件,执行如下命令:
vi ~/.hgrc
增加如下配置:
[extensions]
hgext.extdiff=
[extdiff]
cmd.kdiff3=
[merge-tools]
kdiff3.args=$base $local $other -o $output
六、安装iniparse
1、下载源代码
wget http://iniparse.googlecode.com/files/iniparse-0.4.tar.gz
2、解压源代码包
tar -zxvf iniparse-0.4.tar.gz
3、安装
进入iniparse-0.4解压后的目录,执行如下命令进行安装:
python setup.py build
python setup.py install (需要以root身份执行)
七、安装QScintilla
1、下载源代码
wget http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.5.1.tar.gz
2、解压源代码包
tar -zxvf QScintilla-gpl-2.5.1.tar.gz
3、编译安装QScintilla
1)进入QScintilla解压后目录下的Qt4目录,顺序执行如下三个命令:
qmake qscintilla.pro
make
make install
2)进入QScintilla解压后目录下的Python目录,顺序执行如下三个命令:
python ./configure.py
make
make install (需要以root身份执行)
八、安装 sip
1、下载源代码
wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.4.tar.gz
2、解压源代码包
tar -zxvf sip-4.12.4.tar.gz
3、编译安装sip
进入sip-4.12.4的解压目录,执行如下三个命令:
python ./configure.py
make
make install (需要以root身份执行)
九、安装PyQt4
1、下载源代码
wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.5.tar.gz
2、解压源代码包
tar -zxvf PyQt-x11-gpl-4.8.5.tar.gz
3、安装PyQt4
进入PyQt解压后的目录,按顺序执行如下三个命令安装:
python configure.py
然后会显示如下的协议信息:
Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.8.5 (licensed under the GNU General Public
License) for Python 2.7.2 on linux2.
Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
最后再分别执行:
make
make install (需要以root身份执行)
十、安装TortoiseHg
说明:mercurial-1.9对应的tortoisehg的版本是2.1,安装其他版本会有问题。
1、下载源代码
wget https://bitbucket.org/tortoisehg/targz/downloads/tortoisehg-2.1.tar.gz
2、解压源代码包
tar -zxvf tortoisehg-2.1.tar.gz
3、安装TortoiseHg
进入tortoisehg-2.1的解压目录,顺序执行如下两个命令安装:
python setup.py build
python setup.py install (需要以root身份执行)
十一、安装过程中碰到的问题汇总
请按照上述过程安装,否则会碰到许多的问题。此部分内容后续再补充……
- 在Redhat/Centos上安装和配置TortoiseHg和kdiff3
- 在centos和redhat上安装docker
- 在centos和redhat上安装docker
- 在centos和redhat上安装docker
- 在 CentOS 上安装和配置 KVM
- RedHat上Qt环境安装和配置
- oracle 10.2g在CentOS 5.1和redhat 5企业版上的安装过程
- 在Linux CentOS上编译并安装Clang 3.5.0,适用于Redhat和Clang3.8
- 在 CentOS 6.2 上安装和配置 KVM
- 在CentOS上安装和配置OpenStack Nova
- 在 CentOS 6.5 上安装和配置 Xen
- 在 CentOS 6.5 上安装和配置 Xen
- 在 CentOS 6.5 上安装和配置 Xen
- 怎样在 CentOS 7.0 上安装和配置 VNC 服务器
- 在 CentOS 6.5 上安装和配置 Xen
- 怎样在 CentOS 7.0 上安装和配置 VNC 服务器
- 怎样在 CentOS 7.0 上安装和配置 VNC 服务器
- 如何在CentOS 7上安装和配置私有云
- 只有电话线如何上网
- 有关“.mht”格式
- OPhone网络应用编程实例: 豆瓣电台客户端
- 文件分割与合并(C# Winforms)
- unknown character 0xa1 错误
- 在Redhat/Centos上安装和配置TortoiseHg和kdiff3
- 计算机远程控制
- c++中explicit关键字的含义和用法
- 虚拟继承的意义
- 小数处理的方法
- struts2 checkbox 报错:ognl.OgnlException
- C++中的vector使用范例
- Makefile实例解析(完全注释)
- javascript浮点数运算,JS浮点数运算,浮点数运算