code
#官网网址 https://www.iiyouu.com/hgsite/download/index.html #下载源码包 https://www.mercurial-scm.org/release/mercurial-5.6.tar.gz #解压 tar -xvf mercurial-5.6.tar.gz #移动源码包到/var/lib/下 [root@xxx ~]# mv mercurial-5.6 /var/lib/ #添加环境变量 vi ~/.bash_profile,将路径/var/lib/mercurial-5.6加入环境变量 PATH=$PATH:$HOME/bin:/var/lib/mercurial-5.6/ export PATH #使环境变量生效 source .bash_profile #查看是否安装成功 [root@xxx ~]# hg --version 分布式软件配置管理工具 - 水银 (版本 5.6) (see https://mercurial-scm.org for more information) Copyright (C) 2005-2020 Matt Mackall and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@xxx ~]# #初始化 [root@xxx ~]# mkdir testmer [root@xxx ~]# [root@xxx ~]# cd testmer/ [root@xxx testmer]# hg init