happyfreeangel 2020-04-09
安装 yum install -y curl policycoreutils openssh-server openssh-clients postfix systemctl start postfix
wget http://blog.xixihao123.cn/download/soft/gitlab-ce-12.0.3-ce.0.el7.x86_64.rpm
wget http://blog.xixihao123.cn/download/soft/gitlab-12-0-stable-zh.tar.gz
rpm -ivh gitlab-ce-12.0.3-ce.0.el7.x86_64.rpm
更改配置
vim /etc/gitlab/gitlab.rb
external_url ‘http://192.168.1.171‘
* 1.创建组 * 2.创建项目--->项目隶属于某个组 ![1566116937419](git jenkins.assets/1566116937419.png) * 3.创建用户,设定密码,为用户分配组 * 4.关闭gitlab注册功能 * ![1566117547491](git jenkins.assets/1566117547491.png) * gitlab基本使用? ![1566118806034](git jenkins.assets/1566118806034.png) * gitlab 基本运维 备份 恢复 升级? ``` 1) 修改默认存放备份站点目录,然后进行重新加载配置文件。 [ ~]# vim /etc/gitlab/gitlab.rb ... gitlab_rails[‘backup_path‘] = "/data/gitlab/backups" #备份路径变更 gitlab_rails[‘backup_keep_time‘] = 604800 #备份保留7天 ... [ ~]# gitlab-ctl reconfigure 2)|手动执行备份命令,会将备份的结果存储至/data/gitlab/backups目录中 [ ~]# gitlab-rake gitlab:backup:create [ ~]# crontab -l 00 02 * * * gitlab-rake gitlab:backup:create &>/dev/null # 恢复gitlab数据 1) 停止数据写入服务 [ ~]# gitlab-ctl stop unicorn [ ~]# gitlab-ctl stop sidekiq 2) 恢复数据(不需要备份的_gitlab_backup.tar) [ ~]# gitlab-rake gitlab:backup:restore BACKUP=1566120123_2019_08_18_12.0.3