Mercurial server 部署 服务
2010-03-14 20:30
197 查看
最近给老师 建立Mercurial server 端 琢磨了 网上的很久 才成功
(BTW :什么SSh不会啊)
1. 安装 Mercurial-1.3.1
http://mercurial.berkwood.com/binaries/Mercurial-1.3.1.exe
(为什么要用老版本? 我忘记了 -_-! )
someting I Miss
-----------
还要 安装 CherryPy-3.1.2.win32.exe
------
2. 安装 openlogic
https://olex.openlogic.com/packages/python?show=versions&version=2206
3.Mercurial + lib+lib/templates
在 Mercurial 安装目录 下解压一个叫 library.zip 到新建的 Lib 目录( e.g. C:/Program Files/Mercurial/Lib )
And 把( C:/Program Files/Mercurial/ templates ) templates 文件夹拷到 Lib 里
4. 建立 weddir 文件夹( C:/Program Files/Mercurial/ weddir )
里面 新建 2.bat 文件
Code
、、、、、、、、、、、、、、、
、、、、、、、、、、、、、、、
新建 cphgwebdir.py
Code
//////////////////
/////////////////
关键参数有
sUrlHost='192.168.56.1' //server ip
iUrlPort=8080 //port No.
dAuth['judy']=digest_password(Realm,'judy','1234') //two accounts and passwords
dAuth['jeremy']=digest_password(Realm,'jeremy','1234')
最后新建 hgweb.config
。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。
关键参数
myproject = F:/test/Comp2020
(虚拟的目录) = (实际的目录映射)
5. 建立 reposity(ies)
到( F:/test/ )
建立 init.bat 文件
。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。。。。。
当 CMD 窗口停顿时 就 copy 你的 project 到( F:/test/ )目录
Run init.bat
reposity is ready.
6. 安装 setuptools-0.6c11.win32-py2.5.exe
7. 安装 Paste-1.7.2.tar.gz
Cmd 打入
8.run 2.bat ( C:/Program Files/Mercurial/ weddir )开启服务
download all :http://download.csdn.net/source/2128325
(BTW :什么SSh不会啊)
1. 安装 Mercurial-1.3.1
http://mercurial.berkwood.com/binaries/Mercurial-1.3.1.exe
(为什么要用老版本? 我忘记了 -_-! )
someting I Miss
-----------
还要 安装 CherryPy-3.1.2.win32.exe
------
2. 安装 openlogic
https://olex.openlogic.com/packages/python?show=versions&version=2206
3.Mercurial + lib+lib/templates
在 Mercurial 安装目录 下解压一个叫 library.zip 到新建的 Lib 目录( e.g. C:/Program Files/Mercurial/Lib )
And 把( C:/Program Files/Mercurial/ templates ) templates 文件夹拷到 Lib 里
4. 建立 weddir 文件夹( C:/Program Files/Mercurial/ weddir )
里面 新建 2.bat 文件
Code
、、、、、、、、、、、、、、、
python cphgwebdir.py
、、、、、、、、、、、、、、、
新建 cphgwebdir.py
Code
//////////////////
# cphgwebdir.py with digest authentication import os import sys import cherrypy from paste.auth.digest import AuthDigestHandler, digest_password # Adjust host and port to suit your Web presence: sUrlHost='192.168.56.1' iUrlPort=8080 # Adjust encoding to suit or comment out: os.environ['HGENCODING']='UTF-8' # Adjust path to your Mercurial Lib folder: sys.path.append(r'C:/Program Files/Mercurial/Lib') from mercurial.hgweb.hgwebdir_mod import hgwebdir # Use same hgweb.config file as for hgwebdir.cgi WsgiApp=hgwebdir('hgweb.config') # Adjust realm to suit your needs Realm='Mercurial Repositories' # This is a sample dictionary of valid users with their digest encrypted password dAuth={} dAuth['judy']=digest_password(Realm,'judy','1234') dAuth['jeremy']=digest_password(Realm,'jeremy','1234') #dAuth['<username>']=digest_password('<realm>','<username>','<password>') def AuthFunc(environ,realm,username): return dAuth.get(username,None) WsgiApp=AuthDigestHandler(WsgiApp,Realm,AuthFunc) cherrypy.config.update({ # Default is development environment, uncomment below when in production #'environment':'production', 'server.socket_host':sUrlHost, 'server.socket_port':iUrlPort, #'log.access_file':'access.log', 'log.error_file':'error.log', 'log.screen':True }) cherrypy.tree.graft(WsgiApp,script_name='/') cherrypy.engine.start() cherrypy.engine.block()
/////////////////
关键参数有
sUrlHost='192.168.56.1' //server ip
iUrlPort=8080 //port No.
dAuth['judy']=digest_password(Realm,'judy','1234') //two accounts and passwords
dAuth['jeremy']=digest_password(Realm,'jeremy','1234')
最后新建 hgweb.config
。。。。。。。。。。。。。。。。
[paths] myproject = F:/test/Comp2020 [web] style = gitweb push_ssl = false allow_push = *
。。。。。。。。。。。。。。。。
关键参数
myproject = F:/test/Comp2020
(虚拟的目录) = (实际的目录映射)
5. 建立 reposity(ies)
到( F:/test/ )
建立 init.bat 文件
。。。。。。。。。。。。。。。。
hg init Comp2020 CD Comp2020 echo on "copy files to the directory (above)" echo off pause echo "test">tes del tes hg commit -A -m "Initial commit"
。。。。。。。。。。。。。。。。。。。。。
当 CMD 窗口停顿时 就 copy 你的 project 到( F:/test/ )目录
Run init.bat
reposity is ready.
6. 安装 setuptools-0.6c11.win32-py2.5.exe
7. 安装 Paste-1.7.2.tar.gz
Cmd 打入
python setup.py install
8.run 2.bat ( C:/Program Files/Mercurial/ weddir )开启服务
download all :http://download.csdn.net/source/2128325
相关文章推荐
- 部署安装PHP-5.3.28.tar.gz版本基本配置管理详解以及安装ZendGuardLoader模块优化PHP服务
- CI Weekly #11 | 微服务场景下的自动化测试与持续部署
- Scrapyd爬虫部署服务
- ubuntu下部署SVN服务
- 后端服务部署拆分原则
- 如何在wso2套件之Application Server上部署并使用服务
- 遵循Java EE标准规范的开源GIS服务平台之二:平台部署
- 树莓派3B部署服务过程Mono+Jexus+PHP+Mysql+Postgresql+apache2+svn
- 用axis2+Tomcat5.5+Eclipse3.2部署和访问Web服务
- windows 2008 64位oracle11g部署问题(3)之ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务 推荐
- ArcGIS Server 10 Java 版的Rest服务的部署方法
- Spring Boot 部署与服务配置
- [转]大规模服务设计部署经验谈(上)
- 微服务实施笔记(四)——部署服务发现
- 基于Zookeeper的TbSchedule任务调度服务部署以及应用
- 【JavaService】部署Java jar为Windows后台服务
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法
- 部署服务,错误:不能在此路径中使用此配置节。如果在父级别上锁定了该节
- 通过 Axis2 开发 Web 服务,第 1 部分: 通过 Axis2 运行时部署和使用简单 Web 服务