Mac安装GitLab CE记录
0 REF
1 环境
1.1 查看系统版本
$ sw_vers -productVersion
10.9.5
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: OS X 10.9.5 (13F1507)
Kernel Version: Darwin 13.4.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: ...
User Name: ...
Secure Virtual Memory: Enabled
Time since boot: 12:26
创建管理员git/git,分配到git用户组中。
1.2 Ruby环境
使用RVM升级系统自带的Ruby版本:
$ curl -L get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm install 2.3.1
$ rvm use 2.3.1 --default
$ rvm list
$ rvm remove 2.3.1
安装bundle:
$ gem install bundler --no-ri --no-rdoc
2 配置
GitLab版本:8-11-stable, 使用MySQL, 初始化脚本未给默认用户git/git REFERENCES权限,需要加上.
2.1 文件组织
/Users/git
/gitlab
gitlab.default.osx
/config
database.yml
gitlab.yml
resque.yml
secrets.ym
unicorn.rb
/lib/support
/init.d/gitlab
/logrotate/gitlab
/nginx/gitlab
/log # gitlab日志
application.log
gitlab-workhorse.log
production.log
sidekiq.log
unicorn.stderr.log
unicorn.stdout.log
/gitlab-shell
config.yml
/gitlab-workhorse/
/gitlab_repositories/
/usr/local/etc/redis.conf
/etc/init.d/gitlab
/var/log/nginx/ # nginx日志
gitlab_access.log
gitlab_error.log
/usr/local/etc/nginx
nginx.conf
/servers/gitlab
2.2 文件配置
配置文件中用户目录修改为/Users/git/,
/Users/git/gitlab/config/gitlab.yml
port: 8888
/Users/git/gitlab/config/resque.yml
url: unix:/tmp/redis.sock
/Users/git/gitlab/config/unicorn.rb
listen "127.0.0.1:8888", :tcp_nopush => true
/Users/git/gitlab/lib/support/nginx/gitlab
gitlab_workhorse_options="-listenUmask 0 -listenNetwork unix -listenAddr $socket_path/gitlab-workhorse.socket -authBackend http://127.0.0.1:88 -authSocket $rails_socket -documentRoot $app_root/public"
/Users/git/gitlab-shell/config.yml
gitlab_url: http://localhost:8888/
/etc/init.d/gitlab(同/Users/git/gitlab/lib/support/nginx/gitlab)
gitlab_workhorse_options="-listenUmask 0 -listenNetwork unix -listenAddr $socket_path/gitlab-workhorse.socket -authBackend http://127.0.0.1:8888 -authSocket $rails_socket -documentRoot $app_root/public"
/usr/local/etc/nginx/nginx.conf
# 注释掉http.server
/usr/local/etc/nginx/servers/gitlab
listen 0.0.0.0:8888 default_server;
listen [::]:8888 default_server;
3 构建和启停命令
- 构建
涉及gitlab的用git/git用户执行.
# 安装gitlab
$ cd ~/gitlab
$ bundle install --deployment --without development test postgres aws kerberos
# 安装gitlab-shell
$ cd ~/gitlab
$ bundle exec rake gitlab:shell:install[v3.4.0] REDIS_URL=unix:/tmp/redis.sock RAILS_ENV=production
# 安装gitlab-workhorse
$ cd ~/gitlab-workhorse
make
# 初始化gitlab数据库等
$ cd ~/gitlab/
$ bundle exec rake gitlab:setup RAILS_ENV=production
检查应用状态
cd ~/gitlab/ bundle exec rake gitlab:env:info RAILS_ENV=productionGitLab
$ sudo sh /etc/init.d/gitlab start $ sudo sh /etc/init.d/gitlab stop $ sudo sh /etc/init.d/gitlab restartRedis
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist ## or $ restart: brew services restart redisNginx
$ sudo nginx $ sudo nginx -s stop $ sudo nginx -t # 验证配置
4 使用
GitLab访问
http://localhost:8888/

Git clone
$ git clone http://localhost:8888/zhoujiagen/BookApplication.git Cloning into 'BookApplication'... remote: Counting objects: 1329, done. remote: Compressing objects: 100% (703/703), done. remote: Total 1329 (delta 580), reused 1325 (delta 579) Receiving objects: 100% (1329/1329), 3.75 MiB | 0 bytes/s, done. Resolving deltas: 100% (580/580), done. Checking connectivity... done.
Mac安装GitLab CE记录的更多相关文章
- 安装gitlab ce
切换到root用户,安装相关依赖 yum install curl policycoreutils openssh-server openssh-clients service sshd restar ...
- 20160512关于mac安装caffe的记录
记得2015年在mac系统上安装过一次caffe,非常顺利,但是最近群里许多同学反映mac安装caffe出现了各种问题,同时我也在帮助别人安装caffe的时候也遇到了一些坑,不再像以前这么顺利了.估计 ...
- ubunut18.04 下安装 gitlab ce版,使用清华源
gitlab官方的ubuntu安装说明 https://about.gitlab.com/install/#ubuntu 该安装说明介绍的是gitlab-ee版本 按照该说明也能安装gitlab-ce ...
- Mac安装appium 问题记录
执行脚本报错:Xcode version [object Object] is not yet supported 原因:Xcode8以上的版本不支持Appium-1.5.3版本
- 在MAC上安装gitlab
转载引用:https://www.cnblogs.com/floodwater/p/10138265.html 1.安装docker 2.安装gitlab-ce 1.安装docker 下载地址: ht ...
- centos 6.5安装GitLab全过程和问题记录
GitLab,是一个使用 Ruby on Rails 开发的开源应用程序,与Github类似,能够浏览源代码,管理缺陷和注释,非常适合在团队内部使用. 官方只提供了Debian/Ubuntu系统下的安 ...
- Mac OSX安装 GitLab 5.x
1)安装mac 2) 创建git用户和git组 4) 安装XCode 5) 安装命令行组件 6) 安装 Home brew $ ruby -e "$(curl -fsSL https://r ...
- Python For Mac 开发环境安装 以及问题记录
Python For Mac 开发环境安装记录 把自己安装的过程记录一下,亲测可用 1.Python3环境安装(转载http://www.cnblogs.com/meng1314-shuai/p/90 ...
- 记录Ubuntu 16.04 安装Docker CE
一.Docker的两个版本 Docker有两个版本: 社区版(CE) 企业版(EE) Docker Community Edition(CE)非常适合希望开始使用Docker并尝试使用基于容器的应用程 ...
随机推荐
- javascript选择排序
function selectionSort(arr){ var index,value; for(var i = 0;i < arr.length;i ++){ index = i; //先记 ...
- MYSQL低权限读文件
技巧:Reading files in MySQL with file_priv = no. 当用户无权限调用load_file()函数的时候可以用以下方式读取文件内容: 1.建立test(不分配fi ...
- 【Python⑤】python序列---list和tuple
sequence 序列 sequence(序列)是一组有顺序的对象的集合.序列可以包含一个或多个元素,也可以没有任何元素. 我们之前所说的基本数据类型,都可以作为序列的对象.对象还可以是另一个序列.序 ...
- python网络编程【四】(域名系统)
域名系统(DNS)是一个分布式的数据库,它主要用来把主机名转换成IP地址.DNS以及相关系统之所以存在,主要有以下两个原因: (1).它们可以使人们比较容易地记住名字. (2).它允许服务器改变IP地 ...
- Yii2 rules 添加时间比较功能
php比较类文件:yiisoft\yii2\validators\CompareValidator.php JS比较类文件: yiisoft\yii2\assets\yii.validation.js ...
- Calculator(1.0)
Calculator(1.0) Github链接 解题过程中遇到的困难 对于c++中类和对象的使用不够明确,看了c++的视频教程学会了用类和对象来写程序. 不会使用<queue>,在网上查 ...
- 搬运:Python for Windows——监控Windows某个目录下文件的变化
https://win32com.goermezer.de/content/view/286/285/ 这个网站真是给力,不多说,代码直接搬运过来,还有我的测试结果,拿走不谢! import os i ...
- java 中的SimpleDateFormat、Date函数以及字符串和Date类型互转
SimpleDateFormat是一个以与语言环境有关的方式来格式化和解析日期的具体类.它允许进行格式化(日期 -> 文本).解析(文本 -> 日期)和规范化. SimpleDateFor ...
- Result Maps collection does not contain value for java.lang.Integer异常处理
使用Mybatis的时候出现这个问题是因为配置文件的问题造成的,mybatis需要写大量的配置文件, 尽管有mybatis-generator,但是里面的内容有很多还是要自己去写的,在这过程中难免会出 ...
- alert弹层无法取消问题解决办法
最近做H5移动端开发的时候,js代码写了个alert,在Android手机上能正常运行,但是在IOS上运行弹出之后却无法取消掉, 而且页面卡死,点不了任何东西,这种情况是非常不好的,用户体验非常糟糕. ...