安装
网上各种博客搜出来的都不太好用,直接执行apt-install就ok了…
sudo apt install gitlab-ce
出现 E: Unable to locate package gitlab-ce的问题话,指定
sudo apt-get update
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt install gitlab-ce
基本命令
启动
sudo gitlab-ctl start
停止
sudo gitlab-ctl stop
查看状态
sudo gitlab-ctl status
查找配置文件
sudo find / -name gitlab.rb
设置后更新
sudo gitlab-ctl reconfigure
启动后无法访问,需要修改防火墙的规则,使外部能访问对应的端口
查看状态
sudo ufw status
放行某些端口
sudo ufw allow 666
基于ssh登录时,默认是22,如果需要修改端口,不能直接在ip后加,只能使用参数p来修改端口
ssh username@ip #标准的ssh ,登录22
ssh username@ip:port # 会提示 could not resolve hostname XXX,Name or service not know
ssh username@ip -p port # 修改登录端口