For Ubuntu 20.04 and 22.04, arm64
packages are also available and will be automatically used on that platform when using the GitLab repository for installation. Docx
1. Prerequisites:
- A virtual or dedicated server running Ubuntu 22.04 with SSH access.
- Static Hostname (gitlab.linuxtechi.net)
- Sudo User with admin rights
- 2 GB RAM or more
- 2 vCPUs or more
- Internet Connectivity
2. Install and configure the necessary dependencies
1
2
sudo apt-get update
sudo apt-get install -y curl wget openssh-server ca-certificates tzdata perl
3. Add the GitLab package repository and install the package
Currently, gitlab has 2 versions: Read more
Remember, need to check distribute version cat /etc/release**
3.1 Gitlab EE (Enterprise Edition)
1
2
3
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
sudo EXTERNAL_URL="http://host.gitlab-ce.com"
sudo apt-get install gitlab-ee=17.2.0-ee.0
3.2 Gitlab CE (Community Edition)
1
2
3
4
5
6
7
# script check
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
# download version package
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_16.1.7-ce.0_amd64.deb/download.deb
# install gitlab-ce
sudo EXTERNAL_URL="http://host.gitlab-ce.com"
sudo dpkg -i gitlab-ce_16.1.7-ce.0_amd64.deb
After install successfully!
Start Gitlab Server
1
sudo gitlab-ctl reconfigure
4. Open Browser to the hostname and login root
In case missing file initial_root_passwd, let’s reset passwd
1
2
3
4
gitlab-rake "gitlab:password:reset[root]"
Enter password:
Confirm password:
Password successfully updated for user with username root.
Login with user root and copy passwd, press Login :D
5. Apply Gitlab with Application
Read more refer: Notion Gitlab Server
Limit some unnecessary
Modify config SSL
Create and authorize User/Groups
Create Email Notify
Create schedule daily backup
6. Uninstall
1
2
sudo pkill -f gitlab
sudo apt-get purge --remove gitlab-ce
Comments powered by Disqus.