How to Install Git-Lab in Ubuntu
To install Git-Lab in Ubuntu
GitLab is an open source application used to code, test and deploy code together. It provides the Git repository management with access controls, code reviews, issue tracking and activity feeds. This article explains the installation of Git-Lab in Ubuntu.
Installation of Git-Lab
First install the required packages to install the Git-Lab.
root@linuxhelp1:~# apt-get install openssh-server postfix -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ncurses-term openssh-client openssh-sftp-server ssh-import-id
Suggested packages:
ssh-askpass libpam-ssh keychain monkeysphere rssh molly-guard procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre
sasl2-bin dovecot-common postfix-cdb postfix-doc
The following NEW packages will be installed:
ncurses-term openssh-server openssh-sftp-server postfix ssh-import-id
The following packages will be upgraded:
openssh-client
1 upgraded, 5 newly installed, 0 to remove and 415 not upgraded.
Need to get 2,375 kB of archives.
After this operation, 8,842 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssh-client amd64 1:7.2p2-4ubuntu2.1 [587 kB]
.
.
.
Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).
After modifying main.cf, be sure to run ' /etc/init.d/postfix reload' .
Running newaliases
Setting up ssh-import-id (5.5-0ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Press enter to configure internet and set the system mail as follows,
System mail setup.
Add the gitlab package server with the following command.
root@linuxhelp1:~# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Detected operating system as Ubuntu/xenial.
Checking for curl...
Detected curl...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/gitlab_gitlab-ce.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.
The repository is setup! You can now install packages.
Now its time to install the package.
root@linuxhelp1:~# apt-get install gitlab-ce -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
gitlab-ce
0 upgraded, 1 newly installed, 0 to remove and 414 not upgraded.
Need to get 304 MB of archives.
After this operation, 816 MB of additional disk space will be used.
Get:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu xenial/main amd64 gitlab-ce amd64 8.13.5-ce.0 [304 MB]
Fetched 304 MB in 7min 49s (647 kB/s)
Selecting previously unselected package gitlab-ce.
(Reading database ... 176784 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_8.13.5-ce.0_amd64.deb ...
Unpacking gitlab-ce (8.13.5-ce.0) ...
Setting up gitlab-ce (8.13.5-ce.0) ...
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:
sudo gitlab-ctl reconfigure
gitlab: GitLab should be reachable at http://www.linuxhelp1.com
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
It looks like GitLab has not been configured yet skipping the upgrade script.
Again setup and configure the gitlab as shown below,
root@linuxhelp1:~# gitlab-ctl reconfigure
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: [" gitlab" ]
Synchronizing Cookbooks:
- runit (0.14.2)
- gitlab (0.0.1)
- package (0.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create
- change mode from ' 0755' to ' 0775'
/sbin/init: unrecognized option ' --version'
-.mount loaded active mounted /
Converging 293 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create
- create new directory /var/opt/gitlab
.
.
.
Recipe: gitlab::unicorn
* ruby_block[reload unicorn svlogd configuration] action create
- execute the ruby block reload unicorn svlogd configuration
Recipe: gitlab::sidekiq
* ruby_block[reload sidekiq svlogd configuration] action create
- execute the ruby block reload sidekiq svlogd configuration
Recipe: gitlab::gitlab-workhorse
* service[gitlab-workhorse] action restart
- restart service service[gitlab-workhorse]
* ruby_block[reload gitlab-workhorse svlogd configuration] action create
- execute the ruby block reload gitlab-workhorse svlogd configuration
Recipe: gitlab::nginx
* ruby_block[reload nginx svlogd configuration] action create
- execute the ruby block reload nginx svlogd configuration
Recipe: gitlab::logrotate
* ruby_block[reload logrotate svlogd configuration] action create
- execute the ruby block reload logrotate svlogd configuration
Running handlers:
Running handlers complete
Chef Client finished, 225/313 resources updated in 02 minutes 28 seconds
gitlab Reconfigured!
Once the Gitlab is configured successfully, open it in web browser with IP address of your machine.
Setup the users credential.
Login Gitlab with the user id and password.
Now you can access Gitlab with the dashboard. Have fun!!
Comments ( 2 )