CentOS7安装mercurial(hg)

参考资料:

https://blog.csdn.net/u012120103/article/details/116110195

http://www.360doc.com/content/12/0803/16/10487218_228137702.shtml

https://www.iteye.com/blog/yaofeng928-1146473

1、hg官网下载地址:

https://www.mercurial-scm.org/release/

2、安装Python3——跳过

3、安装依赖

yum -y install docutils

4、解压、安装

tar xf mercurial-5.7.tar.gz

# 如果要修改安装目录,修改文件Makefile中的PREFIX

vi Makefile export PREFIX=/usr/local/mercurial

# 编译安装

make install

5、添加环境变量

vi /etc/profile export

追加下面两行:

MERCURIAL_HOME=/usr/local/mercurial/

export PATH=$MERCURIAL_HOME/bin:$PATH

立即生效:

source /etc/profile

6、验证hg

hg --version

7、创建用户

useradd hguser -d /home/hguser

passwd hguser

8、建立hg代码库

mkdir -p /usr/hg/myproject

cd /usr/hg/myproject

hg init

9、测试

echo "Hello" > readme.txt

hg add ##添加

hg ci  ##检查

注意:报这个错,用命令hg config --edit,编辑用户名

 

 

10、启动http server

chown hguser:hguser -R /usr/hg/myproject

cd /usr/hg/myproject

hg serve -p 8000 &

11、访问http

http:ip:8000

posted @   威尔逊不背锅  阅读(345)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
点击右上角即可分享
微信分享提示