Centos 7 安装 GitLab

来源:互联网 发布:老友网南宁网络电视台 编辑:程序博客网 时间:2024/04/30 12:57

前面部分都是参看 GitLab 官网一路命令运行


sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

2.Add the GitLab package server and install the package

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce

 

3. Configure and startGitLab

sudo gitlab-ctl reconfigure

4. 修改端口,如果需要

这时不出意外gitlab已经启动,需要切换到nginx 配置目录修改端口(默认为80端口,如果想改其他端口的话,最好也不要8080)。

vi /var/opt/gitlab/nginx/conf/gitlab-http.conf

找到:listen *:80;  将 80 改为想修改的端口即可,listen*:8088;  这里是8088

 

5 浏览器访问Gitlab

用浏览器访问gitlab,

地址:gitlab-server-id:8088

首次访问会提示输入密码,设置自己的密码即可,看到网上也有人说初始时(用户名:root   密码:5iveL!fe


注意密码至少为8个字符,设置好了过后会跳转到登录界面


然后用户名输入root,登录成功,至此gitlab已经搭建好


0 0
原创粉丝点击