Manually install GitLab
Install dependency packages:
$ sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev
libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server
libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate rsync
python-docutils pkg-config cmake libre2-dev
$ sudo apt install ruby-bundler
Install NodeJS
$ sudo apt install nodejs
$ sudo apt install libssl1.0-dev
$ sudo apt install nodejs-dev
$ sudo apt install node-gyp
$ sudo apt install npm
Install Yarn
Add the Yarn repository to the system
$ curl -sS [Link] | sudo apt-key add -
Add the Yarn repository to the sources list
$ echo "deb [Link] stable main" | sudo tee
/etc/apt/[Link].d/[Link]
$ sudo apt update
$ sudo apt install yarn
$ yarn –version
Create a Git user for GitLab with the following command; remember the
password you choose:
$ sudo adduser --gecos 'GitLab' git
Install PostgeSQL
$ sudo apt install postgresql
Logging in to the PostgreSQL shell
$ sudo -u postgres psql
Create a database:
$ CREATE USER git CREATEDB;
$ CREATE EXTENSION IF NOT EXISTS pg_trgm;
$ CREATE DATABASE gitlabhq_production OWNER git;
First, we'll need to log in and set a password for this user:
$ sudo -u git -H psql gitlabhq_production
$ \password
Exit the database connection
$ \q
Install Redis
$ sudo apt update
$ sudo apt install redis-server
$ sudo nano /etc/redis/[Link]
Search for supervised keyword using CTRL + w. Change the line supervised
no to supervised system.
Save and exist by selecting CTRL + x, y and then Enter
Restart the services
$ sudo systemctl restart [Link]
Before running the next script, you may need to create the file [Link]
in the /etc/redis path
$ sed 's/^port .*/port 0/' /etc/redis/[Link] | sudo tee
/etc/redis/[Link]
Enable Redis socket
$ echo 'unixsocket /var/run/redis/[Link]' | sudo tee -a /etc/redis/[Link]
Grant permission to the socket to all members of the group
$ echo 'unixsocketperm 770' | sudo tee -a /etc/redis/[Link]
Create the directory which contains the socket
$ mkdir /var/run/redis
$ sudo chown redis:redis /var/run/redis
$ sudo chmod 755 /var/run/redis
Persist the directory which contains the socket, if applicable
$ if [ -d /etc/tmpfiles.d ]; then echo 'd /var/run/redis 0755 redis redis 10d -' |
sudo tee -a /etc/tmpfiles.d/[Link] fi
Add git to the redis group
$ sudo usermod -aG redis git
Restart the Redis Server
$ sudo systemctl restart [Link]