Wednesday, 2 March 2016

Step By Step Installation of Git with GitBlit GUI CentOS / Ubuntu



## Step By Step Installation of Git with GitBlit GUI CentOS / Ubuntu
===========================================

For start service manually:

GITBLIT Service start
cd /opt/gitblit ; java -jar gitblit.jar --baseFolder data &
=================================

Installation:

# yum install git  [Optional, if you want to manage git CLI.]

1. Creating Gitblit install directory
First of all we'll gonna to create a directory in our server in which we'll be installing our latest gitblit in.   

$ mkdir -p /opt/gitblit ; cd /opt/gitblit

2. Downloading and Extracting
Now, we will want to download the latest gitblit from the official site. Here, the current version of gitblit we are gonna install is 1.6.2 . So, please change it as the version you are gonna install in your system.

$ sudo wget http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz

Now, we'll be extracting our downloaded tarball package to our current folder ie /opt/gitblit/

$ sudo tar -zxvf gitblit-1.6.2.tar.gz

3. Configuring and Running

Now, we'll configure our Gitblit configuration. If you want to customize the behavior of Gitblit server, you can do it by modifying gitblit/data/gitblit.properties . Now, after you are done configuring the configuration. We finally wanna run our gitblit. We have two options on running gitblit, first is that we run it manually by the command below:

# cd /opt/gitblit/
# vim data/gitblit.properties

server.httpPort = 8080
server.httpsPort = 8443

web.siteName = reposerver

:wq

[Also you may set LDAP, EMAIL settings.]

$ sudo java -jar gitblit.jar --baseFolder data

Error: sudo: java: command not found


]$ yum install java*


Now, start glitblit service manually:
cd /var/gitblit/
java -jar gitblit.jar --baseFolder data &
==================================

Open your browser to:

http://localhost:8080
https://localhost:8443

Replace "localhost" with the ip-address of the machine depending on your system configuration.
Enter the default administrator credentials:

admin / admin

click the Login button.

Enjoy..............!!!!

================================================================================

If got login error: then configure file as below:

Now, we'll configure our Gitblit configuration. If you want to customize the behavior of Gitblit server, you can do it by modifying gitblit/data/gitblit.properties . Now, after you are done configuring the configuration. We finally wanna run our gitblit. We have two options on running gitblit, first is that we run it manually by the command below:

# cd /opt/gitblit/
# vim data/gitblit.properties

Note:
if need then give this file to full permission of data/  folder

set port number:

server.httpPort = 8080
server.httpsPort = 8443

:wq

start it manually:
cd /var/gitblit/
java -jar gitblit.jar --baseFolder data &

Login GitBlit: https://192.168.100.120:8443
============================================================================================================================================
============================================================================================================================================


GitBlit Server Migration From Live to New Installed Server :


1. Login to Live server   192.168.0.10
2. cd /var/gitblit   or cd /opt/gitblit
3. scp -rvp gitblit root@192.168.100.120:/var/                       <---  192.168.100.120  is a new server ip
4. Now, login to new server and check permission of gitblit folder. it should be full permission with root ownership
5. and restart gitblit service as below commands:


start it manually:
cd /var/gitblit/
java -jar gitblit.jar --baseFolder data &

6. Now, Verify all data and user login are working or not. it everything working fine...  Enjoy

=========================================================================================================

Refer:
http://linoxide.com/linux-how-to/serve-git-repositories-gitblit/          <---- important
https://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos
http://www.unixmen.com/install-gitblit-ubuntu-fedora-centos/
http://www.liquidweb.com/kb/how-to-install-git-on-centos-6/

================================================

No comments: