Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
a962217d
Commit
a962217d
authored
Jun 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'install-guide-improvements' of /home/git/repositories/gitlab/gitlabhq
parents
48d37272
76f2e065
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
31 deletions
+56
-31
doc/install/databases.md
doc/install/databases.md
+18
-1
doc/install/installation.md
doc/install/installation.md
+36
-28
lib/support/init.d/gitlab
lib/support/init.d/gitlab
+1
-1
lib/support/nginx/gitlab
lib/support/nginx/gitlab
+1
-1
No files found.
doc/install/databases.md
View file @
a962217d
...
@@ -11,10 +11,17 @@ GitLab supports the following databases:
...
@@ -11,10 +11,17 @@ GitLab supports the following databases:
# Install the database packages
# Install the database packages
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Pick a database root password (can be anything), type it and press enter
# Retype the database root password and press enter
# Login to MySQL
# Login to MySQL
mysql -u root -p
mysql -u root -p
# Create a user for GitLab. (change $password to a real password)
# Type the database root password
# Create a user for GitLab
# do not type the 'mysql>', this is part of the prompt
# change $password in the command below to a real password you pick
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
# Create the GitLab production database
# Create the GitLab production database
...
@@ -29,6 +36,16 @@ GitLab supports the following databases:
...
@@ -29,6 +36,16 @@ GitLab supports the following databases:
# Try connecting to the new database with the new user
# Try connecting to the new database with the new user
sudo -u git -H mysql -u gitlab -p -D gitlabhq_production
sudo -u git -H mysql -u gitlab -p -D gitlabhq_production
# Type the password you replaced $password with earlier
# You should now see a 'mysql>' prompt
# Quit the database session
mysql> \q
# You are done installing the database and can go back to the rest of the installation.
## PostgreSQL
## PostgreSQL
# Install the database packages
# Install the database packages
...
...
doc/install/installation.md
View file @
a962217d
...
@@ -36,10 +36,10 @@ The GitLab installation consists of setting up the following components:
...
@@ -36,10 +36,10 @@ The GitLab installation consists of setting up the following components:
`sudo`
is not installed on Debian by default. Make sure your system is
`sudo`
is not installed on Debian by default. Make sure your system is
up-to-date and install it.
up-to-date and install it.
# run as root
# run as root
!
apt-get update
apt-get update
-y
apt-get upgrade
apt-get upgrade
-y
apt-get install sudo
apt-get install sudo
-y
**Note:**
**Note:**
Vim is an editor that is used here whenever there are files that need to be
Vim is an editor that is used here whenever there are files that need to be
...
@@ -55,7 +55,7 @@ Install the required packages:
...
@@ -55,7 +55,7 @@ Install the required packages:
Make sure you have the right version of Python installed.
Make sure you have the right version of Python installed.
# Install Python
# Install Python
sudo apt-get install python
sudo apt-get install
-y
python
# Make sure that Python is 2.5+ (3.x is not supported at the moment)
# Make sure that Python is 2.5+ (3.x is not supported at the moment)
python --version
python --version
...
@@ -73,15 +73,17 @@ Make sure you have the right version of Python installed.
...
@@ -73,15 +73,17 @@ Make sure you have the right version of Python installed.
mail server. By default, Debian is shipped with exim4 whereas Ubuntu
mail server. By default, Debian is shipped with exim4 whereas Ubuntu
does not ship with one. The recommended mail server is postfix and you can install it with:
does not ship with one. The recommended mail server is postfix and you can install it with:
sudo apt-get install postfix
sudo apt-get install -y postfix
Then select 'Internet Site' and press enter to confirm the hostname.
# 2. Ruby
# 2. Ruby
Remove
old 1.8 ruby
if present
Remove
the old Ruby 1.8
if present
sudo apt-get remove ruby1.8
sudo apt-get remove
-y
ruby1.8
Download and compile it:
Download
Ruby
and compile it:
mkdir /tmp/ruby && cd /tmp/ruby
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz
curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz
...
@@ -92,7 +94,7 @@ Download and compile it:
...
@@ -92,7 +94,7 @@ Download and compile it:
Install the Bundler Gem:
Install the Bundler Gem:
sudo gem install bundler
sudo gem install bundler
--no-ri --no-rdoc
# 3. System Users
# 3. System Users
...
@@ -106,28 +108,25 @@ Create a `git` user for Gitlab:
...
@@ -106,28 +108,25 @@ Create a `git` user for Gitlab:
GitLab Shell is a ssh access and repository management software developed specially for GitLab.
GitLab Shell is a ssh access and repository management software developed specially for GitLab.
# Login as git
sudo su git
# Go to home directory
# Go to home directory
cd /home/git
cd /home/git
# Clone gitlab shell
# Clone gitlab shell
git clone https://github.com/gitlabhq/gitlab-shell.git
sudo -u git -H
git clone https://github.com/gitlabhq/gitlab-shell.git
cd gitlab-shell
cd gitlab-shell
# switch to right version
# switch to right version
git checkout v1.4.0
sudo -u git -H
git checkout v1.4.0
cp config.yml.example config.yml
sudo -u git -H
cp config.yml.example config.yml
# Edit config and replace gitlab_url
# Edit config and replace gitlab_url
# with something like 'http://domain.com/'
# with something like 'http://domain.com/'
vim config.yml
sudo -u git -H
vim config.yml
# Do setup
# Do setup
./bin/install
sudo -u git -H
./bin/install
# 5. Database
# 5. Database
...
@@ -152,8 +151,7 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install
...
@@ -152,8 +151,7 @@ To setup the MySQL/PostgreSQL database and dependencies please see [`doc/install
sudo -u git -H git checkout 5-3-stable
sudo -u git -H git checkout 5-3-stable
**Note:**
**Note:**
You can change
`5-3-stable`
to
`master`
if you want the
*bleeding edge*
version, but
You can change
`5-3-stable`
to
`master`
if you want the
*bleeding edge*
version, but do so with caution!
do so with caution!
## Configure it
## Configure it
...
@@ -205,10 +203,18 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
...
@@ -205,10 +203,18 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
# Mysql
# Mysql
sudo -u git cp config/database.yml.mysql config/database.yml
sudo -u git cp config/database.yml.mysql config/database.yml
or
# PostgreSQL
# PostgreSQL
sudo -u git cp config/database.yml.postgresql config/database.yml
sudo -u git cp config/database.yml.postgresql config/database.yml
Make sure to update username/password in config/database.yml.
# Make sure to update username/password in config/database.yml.
# You only need to adapt the production settings (first part).
# If you followed the database guide then please do as follows:
# Change 'root' to 'gitlab'
# Change 'secure password' with the value you have given to $password
# You can keep the double quotes around the password
sudo -u git -H vim config/database.yml
## Install Gems
## Install Gems
...
@@ -216,10 +222,10 @@ Make sure to update username/password in config/database.yml.
...
@@ -216,10 +222,10 @@ Make sure to update username/password in config/database.yml.
sudo gem install charlock_holmes --version '0.6.9.4'
sudo gem install charlock_holmes --version '0.6.9.4'
# For MySQL (note, the option says "without")
# For MySQL (note, the option says "without
... postgres
")
sudo -u git -H bundle install --deployment --without development test postgres
sudo -u git -H bundle install --deployment --without development test postgres
# Or for PostgreSQL
# Or for PostgreSQL
(note, the option says "without ... mysql")
sudo -u git -H bundle install --deployment --without development test mysql
sudo -u git -H bundle install --deployment --without development test mysql
...
@@ -227,6 +233,10 @@ Make sure to update username/password in config/database.yml.
...
@@ -227,6 +233,10 @@ Make sure to update username/password in config/database.yml.
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
# Type 'yes' to create the database.
# When done you see 'Administrator account created:'
## Install Init Script
## Install Init Script
...
@@ -269,7 +279,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the
...
@@ -269,7 +279,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the
[
`Advanced Setup Tips`
](
./installation.md#advanced-setup-tips
)
section.
[
`Advanced Setup Tips`
](
./installation.md#advanced-setup-tips
)
section.
## Installation
## Installation
sudo apt-get install nginx
sudo apt-get install
-y
nginx
## Site Configuration
## Site Configuration
...
@@ -280,10 +290,8 @@ Download an example site config:
...
@@ -280,10 +290,8 @@ Download an example site config:
Make sure to edit the config file to match your setup:
Make sure to edit the config file to match your setup:
# **YOUR_SERVER_FQDN** to the fully-qualified
# Change YOUR_SERVER_FQDN to the fully-qualified
# domain name of your host serving GitLab. Also, replace
# domain name of your host serving GitLab.
# the 'listen' line with the following:
# listen 80 default_server; # e.g., listen 192.168.1.1:80;
sudo vim /etc/nginx/sites-available/gitlab
sudo vim /etc/nginx/sites-available/gitlab
## Restart
## Restart
...
...
lib/support/init.d/gitlab
View file @
a962217d
...
@@ -51,7 +51,7 @@ start() {
...
@@ -51,7 +51,7 @@ start() {
exit
1
exit
1
else
else
if
[
`
whoami
`
=
root
]
;
then
if
[
`
whoami
`
=
root
]
;
then
execute
"rm
$SOCKET_PATH
/gitlab.socket"
execute
"rm
-f
$SOCKET_PATH
/gitlab.socket"
execute
"RAILS_ENV=production bundle exec puma
$DAEMON_OPTS
"
execute
"RAILS_ENV=production bundle exec puma
$DAEMON_OPTS
"
execute
"mkdir -p
$PID_PATH
&&
$START_SIDEKIQ
> /dev/null 2>&1 &"
execute
"mkdir -p
$PID_PATH
&&
$START_SIDEKIQ
> /dev/null 2>&1 &"
echo
"
$DESC
started"
echo
"
$DESC
started"
...
...
lib/support/nginx/gitlab
View file @
a962217d
...
@@ -7,7 +7,7 @@ upstream gitlab {
...
@@ -7,7 +7,7 @@ upstream gitlab {
}
}
server {
server {
listen
YOUR_SERVER_IP
:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
listen
*
:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
server_tokens off; # don't show the version number, a security best practice
server_tokens off; # don't show the version number, a security best practice
root /home/git/gitlab/public;
root /home/git/gitlab/public;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment