Mudahnya Installasi dan Konfigurasi Gitlab untuk Pemula
Hai sobat, kali ini Saya akan berbagi mengenai Cara Installasi dan Konfigurasi Gitlab untuk Pemula, langsung saja simak dengan seksama!
Apa itu Gitlab CE - GitLab CE atau Community Edition adalah software open
source yang digunakan untuk host git repositori, dengan tambahan fitur untuk
development apps seperti issue tracking dan lainnya. GitLab )memiliki 2 product
yaitu GitLab CE (Community Edition) dan GitLab EE (Enterprise Edition). selain
itu GitLab juga punya versi hosting di internet seperti GitHub.
Untuk proses installasi GitLab disarankan mengunakan memori /
RAM = 4 GB untuk production, namun Saya hanya mengunakan memori / RAM = 2GB
Install Packge Dependency
$ sudo apt-get update
$ sudo apt-get install ca-certificates curl openssh-server
postfix
$ sudo apt-get update
$ sudo apt-get install ca-certificates curl openssh-server
postfix
Untuk installasi postfix pilih Internet Site, pada
pilihan berikutnya masukkan domain name atau ip address untuk pengiriman email
dari postfix.
Installasi GitLab
$ cd /tmp
$ curl -LO
https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
$ cd /tmp
$ curl -LO
https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
Jalankan file script.deb.sh
# bash /tmp/script.deb.sh
Detected operating system as Ubuntu/xenial.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
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.
# bash /tmp/script.deb.sh
Detected operating system as Ubuntu/xenial.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
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.
Script diatas memastikan pengunaan sistem operasi dan
mendownload package yang dibutuhkan untuk menginstall Gitlab CE
Install GitLab CE
# sudo apt-get install gitlab-ce
It looks like GitLab has not been configured yet; skipping the
upgrade script.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __
__
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/
/ /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting
`external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the
following command:
sudo gitlab-ctl
reconfigure
For a comprehensive list of configuration options please see the
Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
# sudo apt-get install gitlab-ce
It looks like GitLab has not been configured yet; skipping
the upgrade script.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __
__
/ ____(_) /_/
/ ____ _/ /_
/ / __/ / __/
/ / __ `/ __ \
/ /_/ / / /_/
/___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting
`external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the
following command:
sudo gitlab-ctl
reconfigure
For a comprehensive list of configuration options please see the
Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
Pastikan proses installasi tidak ada error.
Edit File Konfigurasi Gitlab
vi /etc/gitlab/gitlab.rb
-------------------------
## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##!
https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'http://git.syarifabdillah.com'
vi /etc/gitlab/gitlab.rb
-------------------------
## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##!
https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'http://git.syarifabdillah.com'
Edit pada bagian external_url menjadi http://git.syarifabdillah.com
sudo gitlab-ctl reconfigure
sudo gitlab-ctl reconfigure
Pastikan setelah reconfigure file konfigurasi gitlab.rb,
harus menjalan kan perintah gitlab-ctl reconfigure.
Jika pada saat menjalankan perintah diatas terdapat error
“initdb: invalid locale settings; check LANG and LC_* environment variables”
Maka jalankan perintah ini
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
Kemudian jalankan lagi perintah “sudo
gitlab-ctl reconfigure”
akses git.syarifabdillah.com pada web browser
Untuk pertama kali diakses diminta untuk memakuskan
password baru
Kemudian login mengunakan password yang sudah diset
sebelumnya, untuk usernamenya mengunakan root, Ini adalah tampilan halaman admin GitLab
Semoga Bermanfaat ...
Salam TKJ ... TKJ Sukses ...