0% found this document useful (0 votes)
8 views

GitLab_Install_Configuration

Installing and updating for GItlab

Uploaded by

Ken Jo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

GitLab_Install_Configuration

Installing and updating for GItlab

Uploaded by

Ken Jo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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 https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

Add the Yarn repository to the sources list

$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee


/etc/apt/sources.list.d/yarn.list

$ 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/resid.conf

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 redis.service

Before running the next script, you may need to create the file redis.conf.orig
in the /etc/redis path

$ sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee


/etc/redis/redis.conf
Enable Redis socket

$ echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf

Grant permission to the socket to all members of the group

$ echo 'unixsocketperm 770' | sudo tee -a /etc/redis/redis.conf

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/redis.conf fi

Add git to the redis group

$ sudo usermod -aG redis git

Restart the Redis Server

$ sudo systemctl restart redis.service

You might also like