What is GitLab Community Edition?
GitLab Community Edition is an open source git service which you can easily deploy in your cloud server. It includes Git repository management, issue tracking, code review, an IDE, activity streams, wikis, built-in Continuous Integration and Continuous Deployment and much more features.
Before You Begin
Make sure your instance meets the recommended requirements for GitLab.
- CPU – 2 cores
- RAM – 4 GB
Update your instance.
sudo yum update
Install and Configure the Dependencies
You will need to install curl policycoreutils, openssh and a mail server. On CentOS, you might also need to open HTTP access in the system firewall.
Enter the following commands one by one to install and configure the dependencies and configure the firewall.
sudo yum install curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
First, add the GitLab package server.
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
Now start the installation.
sudo yum install gitlab-ce
Type y at the prompt and press Enter to continue.
Configure and Start GitLab
After the installation is complete, we need to configure GitLab. To do it, run the following command.
sudo gitlab-ctl reconfigure
Your GitLab installation is now almost complete. You just need to visit it from your browser and change your password. To do this, simply navigate to the hostname or the IP address of your instance from your web browser.
You will be redirected to a page where you’ll be asked to enter a new password. Enter a desired password and click ‘Change your password’.
After you change the password, you will be taken to the login page.
The default username is root. You should be able to log in with the password you set before. It’s recommended to change the username of the default account from root to something else.
That’s it! You now have a functioning git service running on your own cloud instance.