CentOS7系统安装GitLab
1.清华大学开源软件镜像站中查找gitlab镜像,选择gitlab-ce社区免费版本
清华大学开源软件镜像站地址
2.清华大学开源软件镜像站中查找gitlab镜像,选择gitlab-ce社区免费版本
3.选择CnetOS版本el7
4.选择gitlab版本进行下载:gitlab-ce-16.5.1-ce.0.el7.x86_64.rpm
5.rpm文件上传,gitlab安装
[root@localhost ~]# lsanaconda-ks.cfg gitlab-ce-16.5.1-ce.0.el7.x86_64.rpm[root@localhost ~]# yum install gitlab-ce-16.5.1-ce.0.el7.x86_64.rpm -y6.gitlab无法检测到实例的有效主机名
Thank youforinstalling GitLab! GitLab was unable to detect a valid hostnameforyour instance.Please configure a URLforyour GitLab instance by setting `external_url` configuration in/etc/gitlab/gitlab.rb file.Then,you canstartyour GitLab instance by running the following command: sudo gitlab-ctl reconfigure7.为gitlab实例配置url访问地址,设置为当前主机ip地址
[root@localhost ~]# vim /etc/gitlab/gitlab.rbexternal_url'http://10.62.158.200'8.启动gitlab实例,安装完成,gitlab是开机自启的,不用设置
[root@localhost ~]# gitlab-ctl reconfigureUsername: root Password: You didn't opt-in to print initial root password to STDOUT.Password stored to/etc/gitlab/initial_root_password.This file will be cleaned up in first reconfigure run after 24 hours.9.登录gitlab网站,用户名为root,初始化密码在 /etc/gitlab/initial_root_password 文件中
网址 - http://10.62.158.200/users/sign_in
[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: 4RsIjQr3oFuutObHhTbPgW3OGOsoIzuHFXyFOPjLn1Q=# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.10.初始化密码会在登录后的24小时后自动删除,需要重新配置登录密码及界面语言
- Preferences
- Language选择简体中文,然后点击Save changes保存配置,刷新页面即可生效
- 编辑个人资料
- 密码,修改密码后保存即可
11.若要在服务器上进行git操作,需要安装git客户端
[root@localhost ~]# yum install git