rpm方式安装部署gitlab
2016-03-03 21:01
148 查看
前几天准备搭建gitlab,网上找了一堆教程发现大部分都是手动安装各个组件,国内的基本都是copy外国的文档。而且手动安装里用到很多源码安装,所以难免遇到很多坑,经常编译不过,一堆莫名其妙的错误。于是改变安装方式。
本人服务器的系统版本是centos6.5 ,yum update后更新成6.7final,用omnibus方式部署。
步骤:
如果希望使用 Exim, 请 把它当做SMTP来配置.
在Centos 6和7上, 下面的命令也会配置系统防火墙,把HTTP和SSH端口开放.
初始用户密码:
root
5iveL!fe
另外:
gitlab 默认仓库路径在:/var/opt/gitlab/git-data/repositories/,
配置文件为:/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
访问日志路径:/var/log/gitlab/gitlab-rails/production.log
---------------------------------------------------------------------
启动 gitlabgitlab gitlab gitlab # /opt/gitlab/bin/gitlab-ctl start
ok: run: nginx: (pid 2505) 0s
ok: run: postgresql: (pid 2509) 1s
ok: run: redis: (pid 2518) 0s
ok: run: sidekiq: (pid 2523) 1s
ok: run: unicorn: (pid 2528) 0s
--------------------------------------------------------------------
登录成功,首次登录需修改密码,我修改为:12345678,然后重新登录,就可以开始gitlab之旅了。
配置:
sudo mkdir -p /etc/gitlab
sudo touch /etc/gitlab/gitlab.rb
sudo chmod 600 /etc/gitlab/gitlab.rb
Configuring the external URL for GitLab:
向:/etc/gitlab/gitlab.rb 文件中添加:
external_url "http://gitlab.example.com"
更改配置后,执行如下命令(加载配置生效):
sudo gitlab-ctl reconfigure
服务打开、关闭、重启:
# Start all GitLab components
sudo gitlab-ctl start
# Stop all GitLab components
sudo gitlab-ctl stop
# Restart all GitLab components
sudo gitlab-ctl restart
卸载:
# Stop gitlab and remove its supervision process
sudo gitlab-ctl uninstall
# Debian/Ubuntu
sudo dpkg -r gitlab
# Redhat/Centos
sudo rpm -e gitlab
本人服务器的系统版本是centos6.5 ,yum update后更新成6.7final,用omnibus方式部署。
步骤:
1. 安装配置依赖项
如果已经安装了Postfix来发送邮件请在安装期间选择 'Internet Site' . 你也可以用Sendmail或者 使用自定义的SMTP服务器来代替Postfix.如果希望使用 Exim, 请 把它当做SMTP来配置.
在Centos 6和7上, 下面的命令也会配置系统防火墙,把HTTP和SSH端口开放.
sudo yum install curl openssh-server postfix cronie sudo service postfix start sudo chkconfig postfix on sudo lokkit -s http -s ssh
2. 添加并安装GitLab软件包
curl http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash sudo yum install gitlab-ce
3. 配置和使用GitLab
sudo gitlab-ctl reconfigure
4. 在浏览器访问GitLab主机名
在web上输入ip地址直接登陆初始用户密码:
root
5iveL!fe
另外:
gitlab 默认仓库路径在:/var/opt/gitlab/git-data/repositories/,
配置文件为:/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
访问日志路径:/var/log/gitlab/gitlab-rails/production.log
---------------------------------------------------------------------
启动 gitlabgitlab gitlab gitlab # /opt/gitlab/bin/gitlab-ctl start
ok: run: nginx: (pid 2505) 0s
ok: run: postgresql: (pid 2509) 1s
ok: run: redis: (pid 2518) 0s
ok: run: sidekiq: (pid 2523) 1s
ok: run: unicorn: (pid 2528) 0s
--------------------------------------------------------------------
登录成功,首次登录需修改密码,我修改为:12345678,然后重新登录,就可以开始gitlab之旅了。
配置:
sudo mkdir -p /etc/gitlab
sudo touch /etc/gitlab/gitlab.rb
sudo chmod 600 /etc/gitlab/gitlab.rb
Configuring the external URL for GitLab:
向:/etc/gitlab/gitlab.rb 文件中添加:
external_url "http://gitlab.example.com"
更改配置后,执行如下命令(加载配置生效):
sudo gitlab-ctl reconfigure
服务打开、关闭、重启:
# Start all GitLab components
sudo gitlab-ctl start
# Stop all GitLab components
sudo gitlab-ctl stop
# Restart all GitLab components
sudo gitlab-ctl restart
卸载:
# Stop gitlab and remove its supervision process
sudo gitlab-ctl uninstall
# Debian/Ubuntu
sudo dpkg -r gitlab
# Redhat/Centos
sudo rpm -e gitlab
相关文章推荐
- npm配置镜像、设置代理
- Chipmunk物理引擎
- POPPM产品经理培训课程 -- 独家开发
- ubuntu server 14.04 编译安装xen4.4.2配置vtpm(二)——Dom0内核编译
- cannot find development files install either libnl1 or libnl3
- iOS开发-BUG:解决在使用MPMoviePlayerController播放视频后导航栏上移的问题
- JPMemory 使用文档
- IPMI 配置BMC用户设置
- 内核模块相关命令:lsmod,depmod,modprob,modinfo,insmod,rmmod
- BA/PM Competency Module
- npm的permission问题
- rpm命令参数详解
- homework1-spm
- EM35x Development Kit开发环境搭建
- 产品经理必备软件——Axure使用详解(2)
- 源码包与RPM包的区别
- 对于 APM 用户的一次真实调查分析(下)
- 对于 APM 用户的一次真实调查分析(下)
- JBPM4"公司请假流程"实例步骤
- 如何向外行解释产品经理频繁更改需求为什么会令程序员烦恼?