Windows platform Gitblit build Git server platforms using the Windows graphic tutorials Gitblit build Git server graphic tutorials

Now Git service is unique, compared to SVN have more flexibility, the most popular open source project hosting site Github above, if the managed open source project, it is free to use, but closed-source project will charge expensive fees, if you no shortage of rice, it is beyond the scope of this article, since this way we can build our own Git server.

Domestic use Windows Server platform, the majority of users, then this article will discuss how to build Git server on the Windows platform.

Git server set up under Windows platform

Step One: Download Java, Download: http://www.java.com/zh_CN/

Step two: Install Java installation steps not described in detail.

The third step: Configuring the Java environment variable.

Right "Computer" => "Properties" => "Advanced System Settings" => "Advanced" => "Environment Variables" => "System Variables."

  1. New:

Variable name: JAVA_HOME

Variable value: D: \ Program Files (x86) \ Java \ jdk1.6.0_21 DETAILED according to your own installation path, I was installed in the D drive]

2. New:

Variable name: CLASSPATH

Variable value:% JAVA_HOME% / lib / dt.jar;% JAVA_HOME% / lib / tools.jar

3. Add: find the PATH variable, select Edit. The% JAVA_HOME% / bin;% JAVA_HOME% / jre / bin added to the end of "variable value".

Step four: Verify Java is installed successfully.

Open command window => enter the CMD => determined.

In the command window, enter the java command: javac, carriage return, if the following message appears, the installation was successful.

第五步:下载Gitblit.下载地址:http://www.gitblit.com/

第六步:解压缩下载的压缩包即可,无需安装。

第七步:创建用于存储资料的文件夹。

第八步:配置gitblit.properties 文件。

  1. 找到Git目录下的data文件下的gitblit.properties文件,“记事本”打开。

2.找到git.repositoriesFolder(资料库路径),赋值为第七步创建好的文件目录。

3.找到server.httpPort,设定http协议的端口号

4.找到server.httpBindInterface,设定服务器的IP地址。这里就设定你的服务器IP。

5.找到server.httpsBindInterface,设定为localhost

6.保存,关闭文件。

第九步:运行gitblit.cmd 批处理文件。

  1. 找到bitblit目录中的gitblit.cmd文件,双击。

2.运行结果如下,运行成功。

第十步:在浏览器中打开,现在就可以使用GitBlit了。

第十一步:设置以Windows Service方式启动Gitblit.

  1. 在Gitblit目录下,找到installService.cmd文件。

2.用“记事本”打开。

3.修改 ARCH

32位系统:SET ARCH=x86

64位系统:SET ARCH=amd64

4.添加 CD 为程序目录

SET CD=D:\Git\Gitblit-1.6.0(你的实际目录)

5.修改StartParams里的启动参数,给空就可以了。

6.保存,关闭文件。

第十二步:以Windows Service方式启动Gitblit.

1.双击Gitblit目录下的installService.cmd文件(以管理员身份运行)。

2.在服务器的服务管理下,就能看到已经存在的gitblit服务了。

3.平时使用时,保持这个服务是启动状态就可以了。

以上就是Windows平台下,配置Git服务器的全部的全部内容。

来源:http://www.uedsc.com/windows-gitblit-git-server.html

Git服务现在独树一帜,相比与SVN有更多的灵活性,最流行的开源项目托管网站Github上面,如果托管开源项目,那么就是免费使用的,但是闭源的项目就会收取昂贵的费用,如果你不缺米,那么不在本文讨论的范围内,既然这样,我们可以自己搭建我们的Git服务器。

国内使用Windows Server平台的用户占大多数,那么本文就来讨论如何在Windows平台下搭建Git服务器。

Windows平台下Git服务器搭建

第一步:下载Java,下载地址:http://www.java.com/zh_CN/

第二步:安装Java.安装步骤不再详述。

第三步:配置Java环境变量.

右键”计算机” => ”属性” => ”高级系统设置” => ”高级” => “环境变量” => “系统变量”。

  1. 新建:

变量名:JAVA_HOME

变量值:D:\Program Files (x86)\Java\jdk1.6.0_21【具体要根据你自己的安装路径,我的是安装在D盘的】

2. 新建:

变量名:CLASSPATH

变量值:%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar

3. 添加:找到PATH变量,选择编辑。把%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin添加到”变量值”的结尾处。

第四步:验证Java是否安装成功。

打开命令窗口=> 输入CMD => 确定。

在命令窗口中,输入java命令:javac,回车,如果出现如下信息,说明安装成功。

第五步:下载Gitblit.下载地址:http://www.gitblit.com/

第六步:解压缩下载的压缩包即可,无需安装。

第七步:创建用于存储资料的文件夹。

第八步:配置gitblit.properties 文件。

  1. 找到Git目录下的data文件下的gitblit.properties文件,“记事本”打开。

2.找到git.repositoriesFolder(资料库路径),赋值为第七步创建好的文件目录。

3.找到server.httpPort,设定http协议的端口号

4.找到server.httpBindInterface,设定服务器的IP地址。这里就设定你的服务器IP。

5.找到server.httpsBindInterface,设定为localhost

6.保存,关闭文件。

第九步:运行gitblit.cmd 批处理文件。

  1. 找到bitblit目录中的gitblit.cmd文件,双击。

2.运行结果如下,运行成功。

第十步:在浏览器中打开,现在就可以使用GitBlit了。

第十一步:设置以Windows Service方式启动Gitblit.

  1. 在Gitblit目录下,找到installService.cmd文件。

2.用“记事本”打开。

3. Modify the ARCH

System 32: SET ARCH = x86

System 64: SET ARCH = amd64

4. Add the program directory CD

SET CD = D: \ Git \ Gitblit-1.6.0 (your actual directory)

5. Modify StartParams in the startup parameters, to empty it.

6. Save and close the file.

Step Twelve: in a way to start the Windows Service Gitblit.

1. Double-click the file in the Gitblit installService.cmd directory (Run as administrator).

2. Under the service management server, you can see gitblit of the service already exists.

3. normal use, keep this service is to start the state on it.

These are the Windows platform, configure the entire contents of all of the Git server.

Source: http://www.uedsc.com/windows-gitblit-git-server.html

Guess you like

Origin www.cnblogs.com/zengpeng/p/10977947.html