Gitlab的安装
Gitlab安装
1.安装相关依赖
yum -y install policycoreutils openssh-server openssh-clients postfix |
2.启动ssh服务&设置为开机启动
systemctl enable sshd && sudo systemctl start sshd |
3.设置postfix开机自启,并启动,postfix支持gitlab发信功能
systemctl enable postfix && sudo systemctl start postfix |
如果报这个错
Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details. |
可以采取以下解决方案
修改 /etc/postfix/main.cf的设置 |
4.开放ssh以及http服务,然后重新加载防火墙列表
firewall-cmd --add-service=ssh --permanent |
5.下载gitlab包,并且安装
在线下载安装包 |
6.修改gitlab配置
vi /etc/gitlab/gitlab.rb |
修改gitlab访问地址和端口,默认80,我们改成82,改这两处
external_url 'https://121.89.163.191:82' |
7.重载配置及启动gitlab
gitlab-ctl reconfigure |
8.把端口添加到防火墙
firewall-cmd --zone=public --add-port=82/tcp --permanent |
如果一直502,查看8080端口是否被占用
查看端口 |
之后重启
gitlab-ctl restart |
进去了后改密码…
左上角创建一个group(有手就行)
![gitlab](https://waibi.oss-cn-chengdu.aliyuncs.com/picGo20200714193142.png)
new project
接下来是push项目
创建项目,8088端口
然后在idea的
VCS->Enable Version Control Integration…
打开后选择Git
创建版本控制库
开始写代码
然后右键项目根路径Add
代码,commit
代码…
以及Remotes
里添加我们的远程仓库
push
也可以去管理远程仓库
对了,中途弹出的输入用户名和密码
如果密码输错了,可以去
windows
控制面板->用户账户->凭据管理器找到windows
凭据
然后删除对应的凭据就行了
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 蒋立坤的博客!
评论
Va