Debian10内网安装GitLab
Xplorist Lv6

Debian10内网安装GitLab

reference-site-list

code

1
2
3
4
5
6
7
8
9
10
11
12
#在/etc/network/interfaces 文件后添加(配置IP和网关):
allow-hotplug ens192
# iface ens192 inet dhcp
auto ens192
iface ens192 inet static
address 192.168.2.4
netmask 255.255.255.0
gateway 192.168.2.1

#保存重启网络

service networking restart

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
apt-get update
apt-get install -y curl openssh-server ca-certificates perl

apt-get install -y postfix

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | bash

EXTERNAL_URL="http://192.168.2.3" GITLAB_ROOT_PASSWORD="password" apt-get install gitlab-ee

# 添加gitlab自动重启
systemctl enable gitlab-runsvdir.service

Running handlers:
Running handlers complete
Chef Infra Client finished, 568/1539 resources updated in 05 minutes 45 seconds

Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.

NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

gitlab Reconfigured!

*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.



_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/


Thank you for installing GitLab!
GitLab should be available at http://192.168.7.1

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=14-0


1
2
# 添加nginx自启动
systemctl enable nginx.service

1
2
3
4
5
6
7
# git客户端 账号全局设置
git config --global user.email "xplorist@163.com"
git config --global user.name "xplorist"
#git config --global http.proxy http://10.244.186.81:8088
#git config --global credential.helper wincred
git config --global credential.helper store


1
2
3
4
5
6
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | bash

apt-get install gitlab-runner

gitlab-runner register


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cd ~
curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs

npm install --global yarn

apt-get install rsync

yarn global add hexo

cd /home/gitlab-runner/builds/y6tSEeXS/0/xplorist/keep
rsync -av ./public/ /usr/share/nginx/html/keep/

ssh-keygen -t ed25519 -C "xplorist@163.com"

cd /home/gitlab-runner/builds/y6tSEeXS/0/xplorist/keep/public/
hexo deploy

cp /root/.ssh/id_ed25519 /home/gitlab-runner/.ssh/id_ed25519
cp /root/.ssh/id_ed25519.pub /home/gitlab-runner/.ssh/id_ed25519.pub
cp /root/.ssh/known_hosts /home/gitlab-runner/.ssh/known_hosts

chmod -R -f 777 /home/gitlab-runner/.ssh/
 评论