gitlab 11版本安装

环境:
Os:Centos 7
gitlab:11

 

1.下载yum安装包
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum

我这里下载的是:gitlab-ce-11.11.8-ce.0.el7.x86_64.rpm

 

2.安装

[root@host135 soft]# rpm -ivh gitlab-ce-11.11.8-ce.0.el7.x86_64.rpm 
warning: gitlab-ce-11.11.8-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-11.11.8-ce.0.el7       ################################# [100%]

gitlab: GitLab now ships with a newer version of PostgreSQL (10.7), but it is not yet
gitlab: enabled by default. To upgrade, RUN THE FOLLOWING COMMAND:

sudo gitlab-ctl pg-upgrade

gitlab: Note: This command does not support Geo instances yet. So we don't
gitlab: recommend running this command on Geo nodes. It will be supported
gitlab: in GitLab 12.0.

gitlab: For more details, please see:
gitlab: https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server
gitlab: 
It looks like GitLab has not been configured yet; skipping the upgrade script.

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


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

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

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

 

3.配置
vi /etc/gitlab/gitlab.rb

external_url 'http://192.168.1.135:8888'

重新应用配置
gitlab-ctl reconfigure
gitlab-ctl restart ##可以不需要

 

4.查看状态

[root@host135 soft]# gitlab-ctl status
run: alertmanager: (pid 31683) 92s; run: log: (pid 31214) 124s
run: gitaly: (pid 31548) 95s; run: log: (pid 29044) 301s
run: gitlab-monitor: (pid 31622) 94s; run: log: (pid 30981) 142s
run: gitlab-workhorse: (pid 31583) 95s; run: log: (pid 30650) 164s
run: logrotate: (pid 30724) 155s; run: log: (pid 30743) 154s
run: nginx: (pid 30660) 162s; run: log: (pid 30699) 158s
run: node-exporter: (pid 31598) 95s; run: log: (pid 30824) 147s
run: postgres-exporter: (pid 31705) 91s; run: log: (pid 31287) 117s
run: postgresql: (pid 29344) 287s; run: log: (pid 29374) 284s
run: prometheus: (pid 31648) 93s; run: log: (pid 31096) 130s
run: redis: (pid 28954) 309s; run: log: (pid 28969) 307s
run: redis-exporter: (pid 31636) 94s; run: log: (pid 31024) 135s
run: sidekiq: (pid 30566) 174s; run: log: (pid 30593) 171s
run: unicorn: (pid 30363) 181s; run: log: (pid 30418) 177s

 

5.浏览器登录访问
http://192.168.1.135:8888

 修改root账号的密码

 

6.链接redis
发现使用的redis是比较老的版本

[root@host135 soft]# /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket
redis /var/opt/gitlab/redis/redis.socket> info
# Server
redis_version:3.2.12

 

7.链接postgresql

发现使用的postgresql是9.6版本的

su - gitlab-psql
psql -h /var/opt/gitlab/postgresql -d gitlabhq_production

[root@host135 soft]# su - gitlab-psql
-sh-4.2$ psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
psql (9.6.11)
Type "help" for help.

gitlabhq_production=# \du      
                                       List of roles
     Role name     |                         Attributes                         | Member of 
-------------------+------------------------------------------------------------+-----------
 gitlab            |                                                            | {}
 gitlab-psql       | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
 gitlab_replicator | Replication                                                | {}

gitlabhq_production=# \l
                                             List of databases
        Name         |    Owner    | Encoding |   Collate   |    Ctype    |        Access privileges        
---------------------+-------------+----------+-------------+-------------+---------------------------------
 gitlabhq_production | gitlab      | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres            | gitlab-psql | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0           | gitlab-psql | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/"gitlab-psql"               +
                     |             |          |             |             | "gitlab-psql"=CTc/"gitlab-psql"
 template1           | gitlab-psql | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/"gitlab-psql"               +
                     |             |          |             |             | "gitlab-psql"=CTc/"gitlab-psql"
(4 rows)

 

posted @ 2025-03-21 13:56  slnngk  阅读(72)  评论(0)    收藏  举报