깃랩(GitLab)은 깃랩 사(GitLab Inc.)가 개발한 깃 저장소 및 CI/CD, 이슈 추적, 보안성 테스트 등의 기능을 갖춘 웹 기반의 데브옵스 플랫폼입니다.
오늘은 온프레미스 방식으로 GitLab을 설치해보도록 하겠습니다.
sudo apt update
sudo apt upgrade -y
sudo apt install -y ca-certificates curl openssh-server
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
아래와 같은 메시지가 뜬다면 추가 완료 된 것 입니다.
The repository is setup! You can now install packages.
sudo apt update
sudo apt -y install gitlab-ce
설치가 완료 되면 아래와 같이 여우 모양이 뜨게 됩니다.
Selecting previously unselected package gitlab-ce.
(Reading database ... 92556 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_14.10.0-ce.0_amd64.deb ...
Unpacking gitlab-ce (14.10.0-ce.0) ...
Setting up gitlab-ce (14.10.0-ce.0) ...
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
Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=14-10
sudo vi /etc/gitlab/gitlab.rb
해당 부분을 Ip:port으로 변경해줍니다.
external_url 'http://loaclhost:8081'
설정을 적용하기 위해 재시작을 합니다.
sudo gitlab-ctl reconfigure
sudo su
cat /etc/gitlab/initial_root_password
sudo gitlab-rails console -e production
user = User.where(id:1).first
user.password='변경할 비밀번호'
user.password_confirmation='변경할 비밀번호 재확인'
user.save
exit