Commit 5867a5c21da4fa17b605d93c4e1cb8e16a885d05

Authored by Dmitriy Zaporozhets
2 parents 731b6be9 6b77d926

Merge pull request #1166 from three18ti/master

Updated MySQL docs and Ubuntu auto-install script
Showing 2 changed files with 20 additions and 5 deletions   Show diff stats
doc/debian_ubuntu.sh
... ... @@ -3,7 +3,7 @@
3 3 sudo apt-get update
4 4 sudo apt-get upgrade
5 5  
6   -sudo apt-get install -y git git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline-gplv2-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server python-dev python-pip libyaml-dev
  6 +sudo apt-get install -y git git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline-gplv2-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server python-dev python-pip libyaml-dev postfix
7 7  
8 8 wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
9 9 tar xfvz ruby-1.9.3-p194.tar.gz
... ...
doc/installation.md
... ... @@ -60,7 +60,7 @@ Also read the [Read this before you submit an issue](https://github.com/gitlabhq
60 60 sudo apt-get update
61 61 sudo apt-get upgrade
62 62  
63   - sudo apt-get install -y wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline6-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server git-core python-dev python-pip libyaml-dev sendmail
  63 + sudo apt-get install -y wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline6-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server git-core python-dev python-pip libyaml-dev postfix
64 64  
65 65 # If you want to use MySQL:
66 66 sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
... ... @@ -153,8 +153,22 @@ Permissions:
153 153  
154 154 # Or
155 155 # Mysql
  156 + # Install MySQL as directed in Step #1
  157 +
  158 + # Login to MySQL
  159 + $ mysql -u root -p
  160 +
  161 + # Create the gitlabhq production database
  162 + mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
  163 +
  164 + # Create the MySQL User change $password to a real password
  165 + mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
  166 +
  167 + # Grant proper permissions to the MySQL User
  168 + mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
  169 +
  170 + # Exit MySQL Server and copy the example config, make sure to update username/password in config/database.yml
156 171 sudo -u gitlab cp config/database.yml.example config/database.yml
157   - # Change username/password of config/database.yml to real one
158 172  
159 173 #### Install gems
160 174  
... ... @@ -206,8 +220,9 @@ You can login via web using admin generated with setup:
206 220 sudo -u gitlab bundle exec rake environment resque:work QUEUE=* RAILS_ENV=production BACKGROUND=yes
207 221  
208 222 # Gitlab start script
209   - ./resque.sh
210   -
  223 + sudo -u gitlab ./resque.sh
  224 + # if you run this as root /home/gitlab/gitlab/tmp/pids/resque_worker.pid will be owned by root
  225 + # causing the resque worker not to start via init script on next boot/service restart
211 226  
212 227 **Ok - we have a working application now. **
213 228 **But keep going - there are some thing that should be done **
... ...