环境
centos7
下载镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.10.5-ce.0.el7.x86_64.rpm
# 如果服务器提示‘--no-check-certificate’,需要鉴权,那就去浏览器下载
安装依赖
# 使用python3
yum -y install policycoreutils openssh-server openssh-clients postfix policycoreutils-python
安装gitlab
rpm -ivh gitlab-ce-14.10.5-ce.0.el7.x86_64.rpm
编辑yum源
[gitlab-ce]
name=gitlab-ce
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
Repo_gpgcheck=0
Enabled=1
gpgcheck=0
Gpgkey=https://packages.gitlab.com/gpg.keyyum clean all && yum makecache
yum -y install gitlab-ce
yum -y install gitlab-ce-13.6.1
yum -y install gitlab-ce --nogpgcheck
修改端口号
vi /etc/gitlab/gitlab.rb
external_url 'http://192.168.109.128:9090'
配置日志输出地方
/etc/gitlab/gitlab.rb
文件中很多log_directory
,取消注释修改目录即可
# 例子:
gitlab_rails['log_directory'] = "/var/log/gitlab/gitlab-rails"
puma['log_directory'] = "/var/log/gitlab/puma"
registry['log_directory'] = "/var/log/gitlab/registry"
修改完毕,重启刷新
gitlab-ctl reconfigure
gitlab-ctl restart
密码
cat /etc/gitlab/initial_root_password
登录
直接ip:端口 登录即可,账号root 密码 上面那个
记得登陆上去修改密码,默认密码就一天的有效期;
标签:Gitlab,log,gitlab,ce,yum,install,安装,el7 From: https://www.cnblogs.com/xy20211005/p/17927629.html