-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-gitlab.sh
35 lines (25 loc) · 1.12 KB
/
install-gitlab.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -e
mkdir -pv /etc/gitlab/ssl
chmod -v 755 /etc/gitlab/ssl
# chmod bits: read (4), write (2), and execute (1)
mv -v /root/tmp.key /etc/gitlab/ssl/git.openelectronicslab.org.key
chmod -v 600 /etc/gitlab/ssl/git.openelectronicslab.org.key
mv -v /root/tmp.crt /etc/gitlab/ssl/git.openelectronicslab.org.crt
chmod -v 644 /etc/gitlab/ssl/git.openelectronicslab.org.key
apt-get update
apt-get install -y curl rsync vim ca-certificates
debconf-set-selections <<< "postfix postfix/mailname string git.openelectronicslab.org"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
apt-get install --assume-yes postfix
wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
bash ./script.deb.sh
export GITLAB_ROOT_PASSWORD=$(cat /root/tmp_gitlab_admin_passwd)
shred -v -u /root/tmp_gitlab_admin_passwd
export EXTERNAL_URL="https://git.openelectronicslab.org"
export GITLAB_ROOT_EMAIL="[email protected]"
export RAILS_ENV=production
apt-get install gitlab-ce=13.0.6-ce.0
apt-mark hold gitlab-ce=13.0.6-ce.0
gitlab-ctl reconfigure
echo "gitlab-installed"