sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates tzdata
Use this commands to update repository and install dependencies.
sudo apt-get install -y postfix
Postfix is used to send notification emails. But if you know how to setup other kind of SMTP server, you are free to do so.
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
This will add gitlab repository and will try to install the packge. Please double check if the terminal shows any sign of errors.
sudo EXTERNAL_URL="http://gitlab.example.com" apt-get install gitlab-ee
EXTERNAL_URL is used to visit the gitlab web interface in your browser. My style is to just use any URL that I want and add it in my /etc/hosts file. In my /etc/hosts it will look something like this:
127.0.0.1 http://gitlab.example.com
After doing theses steps, you will have your own git repository in your local. Just take note that this is done locally, so no one will ever see it other than you.
Finally, to check your gitlab repository, you can visit http://gitlab.example.com in your browser. You need to change your password if its your first time visiting the site. And by the way, the default user is "root" (without quotes).
Thank You for reading and upvoting.
If you have any concerns, don't hesitate to drop a comment. I will try to answer it.
Pro Tip: For those who have a local server (like apache2) and gitlab installed, both of these application will try to use port 80. You need to change the port number either of the two.