主要修改这三个文件
nginx.conf

[root@center-linux gitlab]# cat /opt/gitlab/embedded/conf/nginx.conf | grep -v "#" | grep listen
        listen       99;
[root@center-linux gitlab]# 

gitlab.yml

[root@center-linux gitlab]# cat /var/opt/gitlab/gitlab-rails/etc/gitlab.yml | grep 99
    port: 99
[root@center-linux gitlab]# 

第一部分中的port的设定

gitlab-http.conf

[root@center-linux gitlab]# cat /var/opt/gitlab/nginx/conf/gitlab-http.conf | grep -v "#" | grep --color listen
  listen *:99;
[root@center-linux gitlab]# 

修改完成后,重启gitlab服务:

[root@center-linux gitlab]# gitlab-ctl status
run: gitlab-workhorse: (pid 4060) 606s; run: log: (pid 949) 1003s
run: logrotate: (pid 4068) 605s; run: log: (pid 952) 1003s
run: nginx: (pid 4075) 605s; run: log: (pid 948) 1003s
run: postgresql: (pid 4083) 604s; run: log: (pid 938) 1004s
run: redis: (pid 4091) 604s; run: log: (pid 937) 1004s
run: sidekiq: (pid 4098) 602s; run: log: (pid 939) 1004s
run: unicorn: (pid 4114) 600s; run: log: (pid 954) 1003s
[root@center-linux gitlab]# 
[root@center-linux gitlab]# gitlab-ctl stop
ok: down: gitlab-workhorse: 1s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 0s, normally up
ok: down: postgresql: 1s, normally up
ok: down: redis: 0s, normally up
ok: down: sidekiq: 1s, normally up
ok: down: unicorn: 0s, normally up
[root@center-linux gitlab]# 
[root@center-linux gitlab]# gitlab-ctl start
ok: run: gitlab-workhorse: (pid 5124) 1s
ok: run: logrotate: (pid 5130) 0s
ok: run: nginx: (pid 5136) 0s
ok: run: postgresql: (pid 5142) 1s
ok: run: redis: (pid 5150) 0s
ok: run: sidekiq: (pid 5154) 1s
ok: run: unicorn: (pid 5157) 0s
[root@center-linux gitlab]# 
[root@center-linux gitlab]# gitlab-ctl status
run: gitlab-workhorse: (pid 5124) 7s; run: log: (pid 949) 1027s
run: logrotate: (pid 5130) 6s; run: log: (pid 952) 1027s
run: nginx: (pid 5136) 6s; run: log: (pid 948) 1027s
run: postgresql: (pid 5142) 6s; run: log: (pid 938) 1028s
run: redis: (pid 5150) 5s; run: log: (pid 937) 1028s
run: sidekiq: (pid 5154) 5s; run: log: (pid 939) 1028s
run: unicorn: (pid 5157) 4s; run: log: (pid 954) 1027s
[root@center-linux gitlab]# 

这样,GITlab的WEB端口就从默认的80,改为了99。
——————————————————
Done。

1
说点什么

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Adamhuan Recent comment authors

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒