因为 正文gitLab介绍 GitLab 是利用 依赖组件:ruby 1.9.3+,MySQL,git,redis, Sidekiq。最低配置CPU 1G,RAM 1G+swap可以支持100用户。 先连接SSH 首先要确定 步骤: 1, 有人说首先要在 ps -e|grep ssh 如果结果中只有 sudo apt-get install openssh-server 安装ssh服务 sudo /etc/init.d/ssh start 启动ssh服务 初始化root密码 sudo passwd
安装gitlib整合包官方有安装包 与脚本下载, 官方安装指南 。同样GITHUB上有个社区非官方的 安装指南 。 但这儿里推荐 以 ubuntu 为演示环境,来安装这个包,切换到 如果没有权限,先授权账号: chmod 777 bitnami-gitlab-8.5.7-0-linux-x64-installer.run 然后切换 ./bitnami-gitlab-8.5.7-0-linux-x64-installer.run 执行后就会弹出图形化界面,一步步确认就行,如下图
启动命令 第一次安装好了就默认启动了 /opt/gitlab-8.5.7-0
需要 sudo ./ctlscript.sh start
登陆系统启动后,就可以访问系统页面了,这里先通过ifconfig命令获取当前的ip地址 我的是 http://192.168.153.128/users/sign_in
使用我之前配置的 404 页面,把地址
http://192.168.153.128/users/sign_in
后面的
创建项目前的设置如果你是自己一个人玩就直接创建项目即可,因为我这边是给团队使用的,所以需要创建一下用户组,以及添加组成员,配置权限等,下面来介绍这些配置 配置服务器邮件 添加人员或者自己注册的时候需要发邮件激活,所以要先配置服务器,我在 How to configure the email settings of GitLab? You can configure the SMTP settings during the installation process. If you are using the Virtual Machine or AMI, you can configure it manually. For example, these are the options to configure it using a GMail account: /opt/bitnami/apps/gitlab/htdocs/config/environments/production.rb config.action_mailer.raise_delivery_errors = true 简单的说就是修改 配置好了邮箱,就要测试一下,我们在
可以看到,非管理员登陆右上角就没有 创建小组,添加组内成员让组内成员自己注册账号激活后,我们就准备创建小组了,创建小组是为了方便管理,创建项目的时候直接指定小组,这样小组内的成员都可以看到项目
新增项目 小组创建好了就可以新增一个项目了,这里创建的时候选择
配置SSH key 这里切换到 但是要下载到本地还需要配置
远程下载项目 这里模拟
指定一个目录存放该项目,执行 $ git clone git@192.168.153.128:edw/springmvctouchbaidu.git Cloning into 'springmvctouchbaidu'... The authenticity of host '192.168.153.128 (192.168.153.128)' can't be established. ECDSA key fingerprint is SHA256:1SgfW1DLmaZ9m/E82vVtWjBK1AaP+LMW5U4ng8nv6uE. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.153.128' (ECDSA) to the list of known hosts. remote: 对象计数中: 339, 完成. remote: 压缩对象中: 100% (242/242), 完成. remote: Total 339 (delta 68), reused 339 (delta 68) Receiving objects: 100% (339/339), 12.97 MiB | 14.44 MiB/s, done. Resolving deltas: 100% (68/68), done. Checking connectivity... done. 搞定,下载下来了。 配置权限 前面文章也说过,一般一个实际项目中 比如我添加
下面模拟一下tengj用户提交代码:
总结 ok,花了三天时间终于搞定了,截图还是蛮累人的哈哈,算是比较详细的记录了我这次安装 |
|