cetos7安装gitlib


安装依赖

安装ssh

sudo yum install -y curl policycoreutils-pythonopenssh-server

启动sshd

sudo systemctl start sshd

安装发送邮件工具

# 安装
sudo yum install postfix
# 开机启动
sudo systemctl enable postfix
# 启动
sudo systemctl start postfix

安装gitlib

下载地址

清华源

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

下载命令

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
# 证书到期后用下面的命令
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm --no-check-certificate
# 换目录
mv gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm /opt/gitlab/

安装

# 安装依赖
policycoreutils-python
# 安装
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

修改端口号

vim  /etc/gitlab/gitlab.rb

external_url 'http://localhost:8888'

重置并启动

# 重置(时间比较长)
gitlab-ctl reconfigure
# 启动
gitlab-ctl restart

访问

http://192.168.43.111:8888/

初次访问需要修改密码

默认账号:root

密码:自己设置的

其他设置

设置分支

新建的项目,新建的项目,其他人无法直接使用master分支,所以需要新增几个分支进行开发

修改自己的邮箱

image-20230615102956275


文章作者: 张一雄
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 张一雄 !
  目录