CentOS7 system builds Gitblit server

CentOS7 system builds Gitblit server

The first step introduction: Gitblit is an open source application software, a pure Java library used to manage, view and process Git repositories. It's designed primarily as a centralized repository tool for those who want to host small workgroups.

Official website: http://www.gitblit.com/

The second step is to prepare the software:

Since it is a pure Java application, the java environment must be installed first, and the installation steps will not be carried out, and the parameters in the configuration file will be directly added.

Compile the /etc/profile configuration file and add the following parameter settings at the end of the file:

JAVA_HOME=/usr/local/jdk1.8.0_144
JRE_HOME=/usr/local/jdk1.8.0_144/jre

export JAVA_HOME
export JRE_HOME
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
 

After adding, save and exit, execute # source /etc/profile and check the java version number, as shown below.

#
[root@localhost bin]# ./java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
[root@localhost bin]#
 

After the JDK is installed, go to the official website to download the latest version of Gitblit.

Once you find the latest version, download it directly.

The latest official version is currently version 1.8.0

After downloading, unzip it into the opt directory and rename it to gitblit.

Go to the /gitblit/data directory, back up the important defaults.properties configuration file first, and then need to modify several external parameters.

Create a data file library directory for storing .git, and subsequent git project libraries will be stored in this directory.

Very familiar default port 29418, which can be modified.

The IP port accessed after the service is started can be modified.

The actual IP address of the server

 

After the above parameters are modified, save and exit. Then go back to the root directory and continue to modify the following configuration files:

service-centos.sh can add the service port.

After saving the modified configuration file, you can start the service.

The service has started normally, check if the background is running.

Open the browser and start the cool experience of git journey.

The default user name and password are the admin account. After logging in, you can go to the user center in the upper right corner to set it.

Create a git project repository

Created two git repositories for testing

The home page is displayed as follows

After the test git library is created, assign user permissions, and then clone and download it.

The git project library is cloned normally, enter the downloaded project library, and view the information.

Just create a test branch, add some files, and see how the data changes on the server.

Changes to the data are also displayed on the home page.

The following are some common operating instructions for git

 

It's all over, I hope it's useful, I can give more likes, thank you.

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325257852&siteId=291194637