90807 发表于 2016-11-3 09:22:55

部署gitblit服务器

git服务器简单对比:
    gitblit:简单易用
    gitlab:功能全面
gitblit
地址: http://gitblit.com
下载Gitblit Go,并且修改data/gitblit.properties文件,重写以下配置信息(这些
参数在data/defaults.properties有):
git.repositoriesFolder:git仓库地址,如果对路径无特殊要求,也可不更改
server.httpPort:http协议的端口号。
server.httpsPort:https协议的端口号,如不需要可以不更改。
server.httpBindInterface:http服务器的IP地址
server.httpsBindInterface:https服务器的IP地址,如不需要可以不更改.
保存文件,运行gitblit.sh,可以通过浏览器访问: http://192.168.1.6:8000,用
默认用户名及密码登录即可以,默认admin/admin

gitlab
地址: https://about.gitlab.com/
centos 7
下安装如下:
一. 安装所需依赖
1.sudo yum install curl policycoreutils openssh-server openssh-clients
2. sudo systemctl enable sshd
3. sudo systemctl start sshd
4. sudo yum install postfix
5. sudo systemctl enable postfix
6. sudo systemctl start postfix
7. sudo firewall-cmd --permanent --add-service=http
8. sudo systemctl reload firewalld
二、
增加gitlib镜像源,以下使用的是清华大学的镜像源,地址如
下: https://mirror.tuna.tsinghua.edu.cn/

name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

执行以下:
sudo yum makecache
sudo yum install gitlab-ce
配置并启动gitlab:
sudo gitlab-ctl reconfigure
浏览器直接输入机器ip即可,其默认是80端口。第一次会让修改密码,其默认用户名
为root。
gitlab的操作可以通过gitlab-ctl进行操作,其主要有以下参数:
deploy-page

但如果要进行服务的启动什么的,直接关闭是无效的,必须通过以下方法关闭相应服务才可
以,其服务名称为gitlab-runsvdir.service:
systemctl disable gitlab-runsvdir
2. systemctl enable gitlab-runsvdir
3. systemctl start gitlab-runsvdir
4. systemctl stop gitlab-runsvdir
5. systemctl status gitlab-runsvdir

页: [1]
查看完整版本: 部署gitblit服务器