How to create GitLab repositories on your own server
Gitlab is one of the most popular GIT repository providers in the world, but did you know that you can install GitLab software on your own server and start hosting your projects privately at no cost?
To install GitLab on your own server, just follow these steps:
1. Access your server via SSH.
Remember that you will need root privileges to be able to install GitLab successfully.
2. Install the necessary dependencies
Remember to update the package list before proceeding to install the packages.
apt-get update
Next:
apt-get install curl openssh-server ca-certificates
3. Install the Postfix mail server, if you want to send emails from the server itself.
Execute the following command:
apt-get install postfix
4. Download the GitLab repository package and add it to your repository list.
In this step you will download an executable script directly from the GitLab page:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
5. Proceed with the installation of GitLab.
In this case, you will need to specify the URL to which GitLab should respond. Replace the text in braces with your own URL:
EXTERNAL_URL="http://{gitlab.tudominio.com}" apt-get install gitlab-ee
6. Configure GitLab from the web interface and finish the configuration.
That's it! Now, just visit the URL you specified (remember to modify your DNS records) and proceed with the GitLab installer.
With these simple steps you can enjoy your own completely private repository service on your own server.