安装gitlab
centos7的
官方文档https://packages.gitlab.com/gitlab/gitlab-ce
1.安装repository
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
2.下载安装包
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.1.3-ce.0.el7.x86_64.rpm/download.rpm
rpm -ivh gitlab-ce-15.1.3-ce.0.el7.x86_64.rpm
警告:gitlab-ce-15.1.3-ce.0.el7.x86_64.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID f27eab47: NOKEY
错误:依赖检测失败:
policycoreutils-python 被 gitlab-ce-15.1.3-ce.0.el7.x86_64 需要
那么先yum install -y policycoreutils-python
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
vi /etc/gitlab/gitlab.rb 配置上external_url
时间太长,加上后台执行吧,日志重定向。
sudo gitlab-ctl reconfigure > git.log &
用这个命令看是否执行完。
ps -ef|grep gitlab-ctl
GitLab相关命令。
# 启动 gitlab
sudo gitlab-ctl start
# 重启 GitLab
sudo gitlab-ctl restart
# 停止 gitlab
sudo gitlab-ctl stop
# 查看gitlab服务状态
sudo gitlab-ctl status
# 查看Gitlab日志
sudo gitlab-ctl tail
登录GitLab网页。
GitLab服务启动后,可在浏览器中访问服务器IP,端口默认为80,账户为root,初始密码在 /etc/gitlab/initial_root_password 中,注意初始密码默认只保存24小时。
[root@localhost ~]# cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
# 1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
# 2. Password hasn't been changed manually, either via UI or via command line.
#
# If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Password: KBymqdMer3jZLrmYj4rclUhITdiVfP6kCtlfhlLTlM0=
# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
登录后修改语言,注册需要管理员审核等配置。
相关阅读
评论:
↓ 广告开始-头部带绿为生活 ↓
↑ 广告结束-尾部支持多点击 ↑