资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

gitlab搭建-创新互联

gitlab官网 https://about.gitlab.com/gitlab-com/
官方安装文档 https://about.gitlab.com/installation/?version=ce#centos-7 (ce/ee)
要求服务器内存不少于2g
国外比较慢,所以我们用国内源

站在用户的角度思考问题,与客户深入沟通,找到扎兰屯网站设计与扎兰屯网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站建设、成都网站建设、企业官网、英文网站、手机端网站、网站推广、域名与空间、网站空间、企业邮箱。业务覆盖扎兰屯地区。

vim /etc/yum.repos.d/gitlab.repo//加入如下内容
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1

yum install -y gitlab-ce
gitlab-ctl reconfigure

netstat -lnpt //查看监听端口
gitlab-ctl stop/restart/start/status
浏览器访问gitlab,输入ip即可
注意如果访问502,注意是否有端口冲突,最好启动gitlab前关闭所有之前搭建的服务
默认管理员root,无密码,它会让我们去定义一个密码
gitlab常用命令 https://www.cnyunwei.cc/archives/1204
gitlab备份 gitlab-rake gitlab:backup:create
备份目录在/var/opt/gitlab/backups
gitlab 恢复 先停服务 gitlab-ctl stop unicorn ; gitlab-ctl stop sidekiq
gitlab-rake gitlab:backup:restore BACKUP=xxxxx (这里是一个编号,即备份文件的前缀)
例如:
gitlab-rake gitlab:backup:restore BACKUP=1511704184_2017_11_26_10.2.1

再启动服务 gitlab-ctl start

rpm安装:(centos6.5)
安装依赖:
yum install curl openssh-server openssh-clients postfix cronie
rpm地址:
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.0.5-ce.0.el6.x86_64.rpm
下载:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.0.5-ce.0.el6.x86_64.rpm
安装:
rpm -ivh gitlab-ce-8.0.5-ce.0.el6.x86_64.rpm
gitlab-ctl reconfigure
启动:
gitlab-ctl start

汉化:
其他版本可参考:http://blog.csdn.net/wh311212/article/details/72627803
#8版本下载汉化包并汉化
[root@git hanhua]# git clonehttps://gitlab.com/larryli/gitlab.git Gitlab-cn && cd Gitlab-cn
#备份/opt/gitlab/embedded/service目录下的gitlab-rails目录,该目录下的内容主要是web应用部分
#备份
[root@git Gitlab-cn]#\cp -rf /opt/gitlab/embedded/service/gitlab-rails{,.ori}
#关闭gitlab这个服务
[root@git Gitlab-cn]#gitlab-ctl stop
#开始汉化
[root@git gitlab_pack]# \cp -rf ../Gitlab-cn/* /opt/gitlab/embedded/service/gitlab-rails/
测试是否汉化成功
[root@git ~]# gitlab-ctl start
ok: run: gitlab-workhorse: (pid 1407) 263s
ok: run: logrotate: (pid 1403) 263s
ok: run: nginx: (pid 1404) 263s
ok: run: postgresql: (pid 1405) 263s
ok: run: redis: (pid 1402) 263s
ok: run: sidekiq: (pid 1400) 263s
ok: run: unicorn: (pid 1401) 263s
登录
http://192.168.201.131/users/sign_in

GitLab 项目创建后地址由Localhost改为实际IP的方法
进入终端修改以下文件即可。
vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml

GitLab settings

gitlab:

Web server settings (note: host is the FQDN, do not include http://)

host: localhost         >> 这里改为主机的IP即可
port: 80
https: false

# Uncommment this line below if your ssh host is different from HTTP/HTTPS one
# (you'd obviously need to replace ssh.host_example.com with your own host).
# Otherwise, ssh host will be set to the `host:` value above

重启GitLab
gitlab-ctl restart

git clean 参数
-n 显示 将要 删除的 文件 和 目录
-f 删除 文件,-df 删除 文件 和 目录

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网站栏目:gitlab搭建-创新互联
网页网址:http://cdkjz.cn/article/dpphse.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220