ubuntu小记

1.疑难解决
网络不通或者官网下载安装包失败
换源:阿里/清华
执行 sudo apt-get update
2.安装mysql8.0版本
sudo apt-get install mysql-server
安装之后 需要授权登录 sudo mysql -u root -p
初始账号密码: root root
修改登录权限
use mysql;
Alter user ‘root’ @ “%” identified by ‘123456’ Password expire never;//更改加密方式,去掉只能sudo登录
Alter user ‘root’ @ “%” identified with mysql_native_password by “123456”; //更改登录密码
flush privileges; //权限刷新
3.安装gitlab
3.1.离线下载安装包

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_12.1.4-ce.0_amd64.deb/download.deb

sudo dpkg -i gitlab-ce_12.1.4-ce.0_amd64.deb  //手动离线安装


sudo gitlab-ctl reconfigure //重启命令
sudo gitlab-ctl start //启动命令
sudo gitlab-ctl stop  //结束命令

3.2 修改原服务器backups权限
sudo chmod 777 文件 -R
3.3 手动创建备份
gitlab-rake gitlab:backuo:create
3.4 旧服务器传到新服务器
新服务器上安装ssh-server
sudo apt-get install openssh-server
传文件
scp 旧服务器name@ip:全路径 新服务器name@ip:路径
3.5 备份恢复
chmod 777 传过来文件 -R (111111111_2020_08_10_12.1.4_gitlab_backuo.tar)
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
恢复
gitlab-rake gitlab:backup:restore BACKUP= 文件编号(111111111_2020_08_10_12.1.4)
3.6 修改 /etc/gitlab/gitlab.rb
external_url “https://10.6.174.110:9999” //登录ip及端口
3.7修改 root 密码

cd opt/gitlab/bin/
sudo gitlab-rails console
u=User.find(1)
u.password='123456'
u.password_confirmation = '123456'
u.save!
exit

3.8 重启
sudo gitlab-ctl restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值