Ubuntu 14.04.3安装 gitlab-ce_7.10.4(web服务)

1:系统和软件:

root@ubuntu1:/home/ubuntu1# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty

2:下载gitlab安装包:

https://about.gitlab.com/downloads/archives/

注:下载相应的系统对应的版本。

3:安装需要的openssh和mail服务:

sudo apt-get install openssh-server
sudo apt-get install postfix 

注:邮件选择:No configuration!之后自己配置!
4:安装“gitlab-ce_7.10.4~omnibus-1_amd64.deb”,[内含Ruby、Redis,Nginx和PostgreSQL]:

sudo dpkg -i gitlab-ce_7.10.4~omnibus-1_amd64.deb

5:配置访问域名端口和邮箱:

sudo vim /etc/gitlab/gitlab.rb

#unicorn端口冲突--配置9090,默认8080!
unicorn['port'] = 9090
#配置gitlab的域名或ip和端口
external_url 'http://192.168.1.110:8080'
#配置邮件
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "eg.smtp.163.com"
gitlab_rails['smtp_port'] =25
gitlab_rails['smtp_user_name'] = "your email"
gitlab_rails['smtp_password'] = "your passwd"
gitlab_rails['smtp_domain'] = "eg.smtp.163.com"
gitlab_rails['smtp_authentication'] = :login
gitlab_rails['smtp_enable_starttls_auto'] = true
#163邮箱,修改gitlab配置的发信人
gitlab_rails['gitlab_email_from'] = "your email"
user["git_user_email"] = "your email"

注:若nginx有权限问题问题则将nginx.conf中启动用户修改成root.

6:GitLab进行重加载gitlab.rb配置启动:

sudo gitlab-ctl reconfigure

7:检测GitLab状态:

sudo gitlab-ctl status
run: logrotate: (pid 16722) 2161s; run: log: (pid 3316) 45362s
run: nginx: (pid 3297) 45364s; run: log: (pid 3296) 45364s
run: postgresql: (pid 3180) 45383s; run: log: (pid 3179) 45383s
run: redis: (pid 3081) 45389s; run: log: (pid 3080) 45389s
run: sidekiq: (pid 3272) 45370s; run: log: (pid 3271) 45370s
run: unicorn: (pid 3244) 45372s; run: log: (pid 3243) 45372s

注:若状态都为down,则使用,启动:

sudo gitlab-ctl start
ok: run: logrotate: (pid 14246) 1s
ok: run: nginx: (pid 14249) 0s
ok: run: postgresql: (pid 14257) 0s
ok: run: redis: (pid 14265) 1s
ok: run: sidekiq: (pid 14269) 0s
ok: run: unicorn: (pid 14273) 1s

8:检查GitLab的日志:

sudo gitlab-ctl tail

9:请求git的web版:http://192.168.1.110:8080/

  由于GitLab包自带了Ruby、Redis,Nginx和PostgreSQL,所以也就不需要考虑太多兼容性的问题。

  直接Web登录GitLab所在的服务器,并使用帐号root,密码5iveL!fe来登录GitLab{此密码为默认}。

  首次登录GitLab会强行让你重置密码,然后就可以进入GitLab了。

10:停止服务

sudo gitlab-ctl stop
ok: down: logrotate: 0s, normally up
ok: down: nginx: 1s, normally up
ok: down: postgresql: 0s, normally up
ok: down: redis: 1s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 1s, normally up

问题1:注:错误码对应解释网易服务器smtp机器要求身份验证帐号和发信帐号必须一致,如果用户在发送邮件时,身份验证帐号和发件人帐号是不同的,因此拒绝发送。修改gitlab.rb,修改发信人和身份验证帐号一致,163发信OK。

问题2:Nginx默认监听80端口,unicorn默认监听8080端口,如使用此两个端口请修改配置!

日志附件:

1:

root@dubbo:/home/install# sudo dpkg -i gitlab-ce_7.10.4~omnibus-1_amd64.deb
Selecting previously unselected package gitlab-ce.
(Reading database ... 56801 files and directories currently installed.)
Preparing to unpack gitlab-ce_7.10.4~omnibus-1_amd64.deb ...
Unpacking gitlab-ce (7.10.4~omnibus-1) ...
Setting up gitlab-ce (7.10.4~omnibus-1) ...
dpkg-query: package 'gitlab' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
gitlab: Thank you for installing GitLab!
gitlab: Configure and start GitLab by running the following command:
gitlab:
gitlab: sudo gitlab-ctl reconfigure
gitlab:
gitlab: GitLab should be reachable at http://dubbo
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
It looks like GitLab has not been installed yet; skipping the upgrade script.

2:

root@dubbo:/home/dubbo# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:32000         0.0.0.0:*               LISTEN      2334/java
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      14288/config.ru
tcp        0      0 0.0.0.0:8500            0.0.0.0:*               LISTEN      14249/nginx
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      958/sshd
tcp        0      0 127.0.0.1:48350         0.0.0.0:*               LISTEN      14265/redis-server
tcp6       0      0 :::22                   :::*                    LISTEN      958/sshd 

3:

root@dubbo:/home/dubbo# ps -ef | grep gitlab
root       894     1  0 Jul11 ?        00:00:15 runsvdir -P /opt/gitlab/service log: ...........................................................................................................................................................................................................................................................................................................................................................................................................
root       906   902  0 Jul11 ?        00:00:00 svlogd -tt /var/log/gitlab/sidekiq
root       908   901  0 Jul11 ?        00:00:00 svlogd -tt /var/log/gitlab/nginx
root       910   899  0 Jul11 ?        00:00:00 svlogd -tt /var/log/gitlab/unicorn
root       911   898  0 Jul11 ?        00:00:02 svlogd -tt /var/log/gitlab/redis
root       915   903  0 Jul11 ?        00:00:00 svlogd -tt /var/log/gitlab/logrotate
root       917   900  0 Jul11 ?        00:00:00 svlogd -tt /var/log/gitlab/postgresql
root     14249   901  0 18:27 ?        00:00:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
gitlab-+ 14250 14249  0 18:27 ?        00:00:00 nginx: worker process
gitlab-+ 14251 14249  0 18:27 ?        00:00:00 nginx: worker process
gitlab-+ 14252 14249  0 18:27 ?        00:00:00 nginx: worker process
gitlab-+ 14253 14249  0 18:27 ?        00:00:00 nginx: worker process
gitlab-+ 14254 14249  0 18:27 ?        00:00:00 nginx: worker process
gitlab-+ 14255 14249  0 18:27 ?        00:00:00 nginx: worker process
gitlab-+ 14257   900  0 18:27 ?        00:00:00 /opt/gitlab/embedded/bin/postgres -D /var/opt/gitlab/postgresql/data
gitlab-+ 14259 14257  0 18:27 ?        00:00:00 postgres: checkpointer process
gitlab-+ 14260 14257  0 18:27 ?        00:00:00 postgres: writer process
gitlab-+ 14261 14257  0 18:27 ?        00:00:00 postgres: wal writer process
gitlab-+ 14262 14257  0 18:27 ?        00:00:00 postgres: autovacuum launcher process
gitlab-+ 14263 14257  0 18:27 ?        00:00:00 postgres: stats collector process
gitlab-+ 14265   898  0 18:27 ?        00:00:01 /opt/gitlab/embedded/bin/redis-server 127.0.0.1:0
git      14269   902  0 18:27 ?        00:00:12 sidekiq 3.3.0 gitlab-rails [0 of 25 busy]
git      14288     1  0 18:27 ?        00:00:08 unicorn master -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14349 14288  0 18:27 ?        00:00:00 unicorn worker[0] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14352 14288  0 18:27 ?        00:00:00 unicorn worker[1] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14355 14288  0 18:27 ?        00:00:00 unicorn worker[2] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14358 14288  0 18:27 ?        00:00:00 unicorn worker[3] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14361 14288  0 18:27 ?        00:00:00 unicorn worker[4] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14364 14288  0 18:27 ?        00:00:00 unicorn worker[5] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git      14367 14288  0 18:27 ?        00:00:00 unicorn worker[6] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
gitlab-+ 14377 14257  0 18:27 ?        00:00:00 postgres: gitlab gitlabhq_production [local] idle
gitlab-+ 14382 14257  0 18:27 ?        00:00:00 postgres: gitlab gitlabhq_production [local] idle
gitlab-+ 14385 14257  0 18:27 ?        00:00:00 postgres: gitlab gitlabhq_production [local] idle
gitlab-+ 14554 14257  0 18:28 ?        00:00:00 postgres: gitlab gitlabhq_production [local] idle
gitlab-+ 14753 14257  0 18:30 ?        00:00:00 postgres: gitlab gitlabhq_production [local] idle
root     16860 11942  0 19:05 pts/0    00:00:00 grep --color=auto gitlab
时间: 2024-09-16 00:41:38

Ubuntu 14.04.3安装 gitlab-ce_7.10.4(web服务)的相关文章

怎样在ubuntu 14.04上安装轻量级的Budgie桌面

怎样在ubuntu 14.04上安装轻量级的Budgie桌面 如果你在推特上关注了我们,你可能看见了我们最近分享的一张截图,和这张截图一起的还有对它所展示的桌面进行命名的邀请. 你猜对了吗? 答案就是Budgie -- 一种为基于openSUSE 的linux发行版Evolve OS所设计.但不仅仅只能用于 Evolve OS的简易桌面环境. 我们第一次提到Budgie是在三月份,当时我们被它的整洁.小巧的美感.灵活的架构,还有再次使用在当今大多数发行版中所使用的GNOME 3.10 成熟技术中

如何在Ubuntu 14.04上安装轻量级web服务器Cherokee

如何在Ubuntu 14.04上安装轻量级web服务器Cherokee Cherokee 是一个免费,开源,高性能轻量级的全功能web服务器,支持大部分主流操作系统(Linux. Mac OS X. Solaris 和 BSD).它支持TLS/SSL.FastCGI. SCGI. PHP. uWSGI. SSI. CGI. LDAP. HTTP代理. 视频流处理. 内容缓存. 流量控制. 虚拟主机.Apache兼容的日志文件,以及负载均衡等功能. 今天我们介绍一下怎样在Ubuntu Server

如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy

如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy 这是一款提取网站数据的开源工具.Scrapy框架用Python开发而成,它使抓取工作又快又简单,且可扩展.我们已经在virtual box中创建一台虚拟机(VM)并且在上面安装了Ubuntu 14.04 LTS. 安装 Scrapy Scrapy依赖于Python.开发库和pip.Python最新的版本已经在Ubuntu上预装了.因此我们在安装Scrapy之前只需安装pip和python开发库就可以了. pip是作为pytho

在Ubuntu 14.04上安装 Webmin

在Ubuntu 14.04上安装 Webmin Webmin是一个开源的基于网页的Unix/Linux系统管理工具.通过使用Webmin,你可以在浏览器上设置和安装所有的系统服务,包括:DNS.DHCP.Apache.NFS和Samba等等.因此,有了这个,你就再也不需要去记住所有的修改配置的命令了. 使用官方软件源在Ubuntu 14.04 LTS上安装Webmin 添加webmin的官方仓库: 修改 /etc/apt/sources.list, sudo vi /etc/apt/source

Ubuntu 14.04上安装 Windows 应用的兼容层Wine步骤

Wine ("Wine Is Not an Emulator" 的首字母缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,Mac OSX 及 BSD 等)上运行 Windows 应用的兼容层. Wine 不是像虚拟机或者模拟器一样模仿内部的 Windows 逻辑,而是? Windows API 调用翻译成为动态的 POSIX 调用,免除了性能和其他一些行为的内存占用,让你能够干净地集合 Windows 应用到你的桌面. 下面跟大家分享如何在Ubuntu

如何在Ubuntu 14.04中安装最新版Eclipse

想必很多开发人员都知道,Ubuntu 软件源中提供的并不是最新版本的 Eclipse,本教程就教大家如何在 Ubuntu 14.04 中快速安装 Eclipse 官方发布的最新版本. 到目前为止,Eclipse 的官方最新版本为 Eclipse Kepler (4.3.2),我们可以使用如下步骤在 Ubuntu 14.04 或其它 Ubuntu 版本中进行快速安装. 1.安装OpenJDK Java 7 如果你的系统中没有安装 Java,我们需要按如下步骤事先安装好 OpenJDK Java 7

ubuntu 14.04 server 安装virtualbox (虚拟机)deb

安装之前 ,请先更新 sudo apt-get update sudo apt-get upgrade sudo apt-get update 风来了.呆狐狸 1.下载 deb https://www.virtualbox.org/wiki/Linux_Downloads wget http://download.virtualbox.org/virtualbox/4.3.18/virtualbox-4.3_4.3.18-96516~Ubuntu~raring_amd64.deb 2.安装dkm

Ubuntu 14.04 jdk安装与配置

(1)jdk安装     需要在ubuntu下使用Pycharm,但是Pycharm是用Java写的,所以必须安装jdk.安装的方法很多,上官网找了适合Ubuntu的,给出下面的文档: ============================================ Installation of the 64-bit JDK on Linux Platforms This procedure installs the Java Development Kit (JDK) for 64-

Ubuntu 14.04下安装MySQL_Mysql

1.更新源列表打开"终端窗口",输入"sudo apt-getupdate"-->回车-->"输入root用户的密码"-->回车,就可以了.如果不运行该命令,直接安装mysql,会出现"有几个软件包无法下载,您可以运行apt-getupdate------"的错误提示,导致无法安装. 2.安装mysql 打开"终端窗口",输入"sudo apt-get install mysql