Escolar Documentos
Profissional Documentos
Cultura Documentos
04 (Trusty Tahr)
https://www.linode.com/docs/applications/deve...
In This Guide:
System
Requirements
Contribute on GitHub
Prepare System
for Deployment
Install Package
Dependencies
Install Ruby
Setup PostgreSQL
Database for
GitLab
Install GitLab
Set Up Nginx
Virtual Host for
GitLab
Open GitLab on
Your Browser
Securing GitLab
RSS feed
(https://www.linode.com
/docs/rss)
Monthly Guides
Update
Email address
Sign Up
This guide will help you install and configure GitLab on your
Ubuntu 14.04 (Trusty Tahr) Linode. We will be using the
latest Ruby and GitLab as of this writing, so check for the
latest version. We will assume that you want to install GitLab
on git.example.com and you have configured the DNS
properly. If you are new to Linux system administration, you
might want to consider the Introduction to Linux Concepts
guide (/docs/tools-reference/introduction-to-linux-concepts)
and Linux Administration Basics guide (/docs/tools-reference
/linux-system-administration-basics) guides.
Note
This guide is written for non-root users. Commands that require
elevated privileges are prefixed with sudo. If you are not familiar with
the sudo command, you can check out our Users and Groups (/docs
/tools-reference/linux-users-and-groups) guide.
System Requirements
GitLab is a large and heavy application. To get the most of
GitLab, the recommended hardware is as follows:
CPU: 2 cores to support up to 500 users.
Memory: 2 GB to support up to 500 users.
1 de 6
13-05-2016 15:24
https://www.linode.com/docs/applications/deve...
2. Install Git:
1
Install Ruby
While GitLab is a Ruby on Rails application, using ruby
version managers such as RVM (http://rvm.io/) and rbenv
(https://github.com/sstephenson/rbenv) is not supported. For
example, GitLab shell is called from OpenSSH and having a
version manager can prevent pushing and pulling over SSH.
Thus GitLab can only work with system-wide Ruby
installation. In addition, GitLab requires Ruby 2.0 or higher
while the default version on Ubuntu 14.04 is 1.9.3.
1. Remove the old Ruby if present:
1
ruby -v
version
-----------------------------------------------------------------PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ub
(1 row)
Install GitLab
In this section you will install GitLab and make some
configuration changes.
1. We will install GitLab into home directory of the user git.
Change the current working directory:
1
2 de 6
cd /home/git
13-05-2016 15:24
https://www.linode.com/docs/applications/deve...
You need to change the value of host to the fullyqualified domain of your server. Also set the email_from
and support_email to the email addresses intended for
GitLab.
File excerpt: /home/git/gitlab/config
/gitlab.yml
1
2
3
4
5
6
7
8
9
production: &base
gitlab:
host: git.example.com
port: 80
https: false
...
email_from: gitlab@example.com
...
support_email: support@example.com
Note
If you specified a database name other than
gitlabhq_production when creating the PostgreSQL
database in the previous section, edit the
config/database.yml file to match with your database name.
gitlab_url
of your server.
File excerpt: /home/git/gitlabshell/config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
3 de 6
user: git
gitlab_url: http://git.example.com/
http_settings:
self_signed_cert: false
repos_path: "/home/git/repositories/"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
bin: "/usr/bin/redis-cli"
host: localhost
port: 6379
namespace: resque:gitlab
log_level: INFO
audit_usernames: false
13-05-2016 15:24
https://www.linode.com/docs/applications/deve...
This will create the necessary database tables and seed the databas
You will lose any previous data stored in the database.
Do you want to continue (yes/no)?
Sample output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
System information
System:
Ubuntu 14.04
Current User:
git
Using RVM:
no
Ruby Version:
2.1.2p95
Gem Version:
2.2.2
Bundler Version:1.6.3
Rake Version:
10.3.1
Sidekiq Version:2.17.0
GitLab information
Version:
6.9.2
Revision:
e46b644
Directory:
/home/git/gitlab
DB Adapter:
postgresql
URL:
http://git.example.com
HTTP Clone URL:
http://git.example.com/some-project.git
SSH Clone URL:
git@git.example.com:some-project.git
Using LDAP:
no
Using Omniauth: no
GitLab Shell
Version:
Repositories:
Hooks:
Git:
1.9.4
/home/git/repositories/
/home/git/gitlab-shell/hooks/
/usr/bin/git
Note
Set the value for user.email according to what is set in
config/gitlab.yml
server_name
to the fully-qualified
4 de 6
13-05-2016 15:24
https://www.linode.com/docs/applications/deve...
1
2
3
4
listen 80;
server_name git.example.com;
server_tokens off;
root /home/git/gitlab/public;
sudo rm /etc/nginx/sites-enabled/default
server_names_hash_bucket_size 64;
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
If most of the items are green and some are purple (which is
okay since you dont have any git project yet), then you have
successfully installing GitLab. Below are the sample output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
5 de 6
13-05-2016 15:24
https://www.linode.com/docs/applications/deve...
You can login using root as the username and 5iveL!fe for
the password.
Securing GitLab
Now that you have GitLab running on your server, you might
want to add SSL support to secure your GitLab site. Refer to
the SSL Certificates with Nginx (/docs/security/ssl/sslcertificates-with-nginx) guide to protect your site with SSL.
More Informaon
You may wish to consult the following resources for additional
information on this topic. While these are provided in the hope
that they will be useful, please note that we cannot vouch for
the accuracy or timeliness of externally hosted materials.
GitLab Community Edition (https://www.gitlab.com
/gitlab-ce/)
GitLab Documentation (https://www.gitlab.com
/documentation/)
GitLab Requirements (https://gitlab.com/gitlab-org/gitlabce/blob/master/doc/install/requirements.md)
GitLab Manual Installation (https://gitlab.com/gitlaborg/gitlab-ce/blob/master/doc/install/installation.md)
This guide is published under a CC BY-ND 3.0 (http://creativecommons.org/licenses
/by-nd/3.0/us/) license.
Overview
Resources
Company
Contact Us
(hps://www.linode.com
(hps://www.linode.com
(hps://www.linode.com
(hps://www.linode.com
/linodes)
/docs)
/about)
/contact)
Plans & Pricing (https://www.linode.com/pricing)
Guides & Tutorials (https://www.linode.com/docs)
About Us (https://www.linode.com/about)
855-4-LINODE (tel:+18554546633)
Features (https://www.linode.com/linodes)
Speed Test (https://www.linode.com/speedtest)
Blog (https://blog.linode.com)
(855-454-6633) (tel:+18554546633)
Add-Ons (https://www.linode.com/addons)
Forum (https://forum.linode.com/)
Press (https://www.linode.com/press)
Intl.: +1 609-380-7100 (tel:+16093807100)
Managed (https://www.linode.com/managed)
Chat (https://www.linode.com/chat)
Referral System (https://www.linode.com/referrals)
Email us (mailto:support@linode.com)
Professional Services System
(https://www.linode.com/professional-services)
Status (http://status.linode.com/)
Careers (https://www.linode.com/careers)
(https://facebook.com/linode) (https://twitter.com/linode) (https://plus.google.com/+linode/
6 de 6
13-05-2016 15:24