summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/debian_ubuntu.sh44
-rw-r--r--doc/installation.md88
2 files changed, 97 insertions, 35 deletions
diff --git a/doc/debian_ubuntu.sh b/doc/debian_ubuntu.sh
new file mode 100644
index 00000000000..0afd10d1ada
--- /dev/null
+++ b/doc/debian_ubuntu.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+sudo apt-get update
+sudo apt-get upgrade
+
+sudo apt-get install -y git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline5-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server git-core python-dev python-pip
+
+wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
+tar xfvz ruby-1.9.2-p290.tar.gz
+cd ruby-1.9.2-p290
+./configure
+make
+sudo make install
+
+sudo adduser \
+ --system \
+ --shell /bin/sh \
+ --gecos 'git version control' \
+ --group \
+ --disabled-password \
+ --home /home/git \
+ git
+
+sudo adduser --disabled-login --gecos 'gitlab system' gitlab
+
+sudo usermod -a -G git gitlab
+
+sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
+
+cd /home/git
+sudo -H -u git git clone git://github.com/gitlabhq/gitolite /home/git/gitolite
+
+sudo -u git -H /home/git/gitolite/src/gl-system-install
+sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
+sudo chmod 777 /home/git/gitlab.pub
+
+sudo -u git -H sed -i 's/0077/0007/g' /home/git/share/gitolite/conf/example.gitolite.rc
+sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; gl-setup -q /home/git/gitlab.pub"
+
+sudo chmod -R g+rwX /home/git/repositories/
+sudo chown -R git:git /home/git/repositories/
+
+sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin
+rm -rf /tmp/gitolite-admin
diff --git a/doc/installation.md b/doc/installation.md
index 1ee09795eba..00a483772ba 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -1,40 +1,45 @@
## Platform requirements:
-**The project is designed for the Linux operating system. **
+**The project is designed for the Linux operating system.**
It may work on FreeBSD and Mac OS, but we don't test our application for these systems and can't guarantee stability and full functionality.
-We officially support next Linux Distributions:
+We officially support (recent versions of) these Linux distributions:
-- Ubuntu
-- Debian
+- Ubuntu Linux
+- Debian/GNU Linux
It should work on:
- Fedora
- CentOs
-- Red Hat
+- RedHat
-It can work on:
+You might have some luck using these, but no guarantees:
- - Mac Os
+ - MacOS X
- FreeBSD
-It 100% **wont** work on Windows
-
+Gitlab does **not** run on Windows and we have no plans of making Gitlab compatible.
## This installation guide created for Debian/Ubuntu and properly tested.
The installation consists of 6 steps:
-1. install packeges.
-2. install ruby
-3. install gitolite
-4. install gitlab and configuration. Check status configuration.
-5. server up.
-6. run resque process (for processing queue).
+1. Install packages / dependencies
+2. Install ruby
+3. Install gitolite
+4. Install and configure Gitlab.
+5. Start the web front-end
+6. Start a Resque worker (for background processing)
+
+### IMPORTANT
+
+Please make sure you have followed all the steps below before posting to the mailinglist with installation and configuration questions.
-** Before submit an installation issue - please check if you followed all steps **
+Only create a Github Issue if you want a specific part of this installation guide updated.
+
+Also read the [Read this before you submit an issue](https://github.com/gitlabhq/gitlabhq/wiki/Read-this-before-you-submit-an-issue) wiki page.
> - - -
> First 3 steps can be easily skipped with simply install script:
@@ -43,7 +48,7 @@ The installation consists of 6 steps:
> apt-get install curl sudo
>
> # 3 steps in 1 command :)
-> curl http://dl.dropbox.com/u/936096/debian_ubuntu.sh | sh
+> curl https://raw.github.com/gitlabhq/gitlabhq/master/doc/debian_ubuntu.sh | sh
>
> Now you can go to step 4"
> - - -
@@ -56,11 +61,14 @@ The installation consists of 6 steps:
sudo apt-get upgrade
sudo apt-get install -y git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server git-core python-dev python-pip sendmail
+
+ # If you want to use MySQL:
+ sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# 2. Install ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
- tar xfv ruby-1.9.2-p290.tar.gz
+ tar xzfv ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290
./configure
make
@@ -79,8 +87,6 @@ Create user for git:
--home /home/git \
git
-
-
Create user for gitlab:
# ubuntu/debian
@@ -123,8 +129,7 @@ Permissions:
# if succeed you can remove it
sudo rm -rf /tmp/gitolite-admin
-** IMPORTANT! If you cant clone `gitolite-admin` repository - DONT PROCEED INSTALLATION**
-
+**IMPORTANT! If you cant clone `gitolite-admin` repository - DONT PROCEED INSTALLATION**
# 4. Install gitlab and configuration. Check status configuration.
@@ -159,7 +164,7 @@ Permissions:
Checking status:
- sudo -u gitlab bundle exec rake gitlab_status
+ sudo -u gitlab bundle exec rake gitlab_status RAILS_ENV=production
# OUTPUT EXAMPLE
@@ -197,8 +202,8 @@ Application can be started with next command:
./resque.sh
-** Ok - we have a working application now. **
-** But keep going - there are some thing that should be done **
+**Ok - we have a working application now. **
+**But keep going - there are some thing that should be done **
# Nginx && Unicorn
@@ -219,17 +224,30 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section:
}
server {
- listen 80;
- server_name mygitlab.com;
-
+ listen YOUR_SERVER_IP:80;
+ server_name gitlab.YOUR_SUBDOMAIN.com;
+ root /home/gitlab/gitlab/public;
+
+ # individual nginx logs for this gitlab vhost
+ access_log /var/log/nginx/gitlab_access.log;
+ error_log /var/log/nginx/gitlab_error.log;
+
location / {
-
- root /home/gitlab/gitlab/public;
-
- if (!-f $request_filename) {
- proxy_pass http://gitlab;
- break;
- }
+ # serve static files from defined root folder;.
+ # @gitlab is a named location for the upstream fallback, see below
+ try_files $uri $uri/index.html $uri.html @gitlab;
+ }
+
+ # if a file, which is not found in the root folder is requested,
+ # then the proxy pass the request to the upsteam (gitlab unicorn)
+ location @gitlab {
+ proxy_redirect off;
+ # you need to change this to "https", if you set "ssl" directive to "on"
+ proxy_set_header X-FORWARDED_PROTO http;
+ proxy_set_header Host gitlab.YOUR_SUBDOMAIN.com:80;
+ proxy_set_header X-Real-IP $remote_addr;
+
+ proxy_pass http://gitlab;
}
}