Last active
August 29, 2015 14:14
-
-
Save enlacee/f4fb3cddc6c24cca1bad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Install Redmine (http://www.redmine.org) from scratch | |
### This script is intended for Ubuntu/Debian-based systems | |
### Copyright (c) 2014, Nikolay Khodov (https://github.com/nikolaykhodov) | |
### All rights reserved. | |
### Redistribution and use in source and binary forms, with or without | |
### modification, are permitted provided that the following conditions are | |
### met: | |
### | |
### * Redistributions of source code must retain the above copyright | |
### notice, this list of conditions and the following disclaimer. | |
### * Neither the name of Nikolay Khodov nor the names of its | |
### contributors may be used to endorse or promote products derived from | |
### this software without specific prior written permission. | |
### | |
### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
### "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
### LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
### A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
### OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
### SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
### LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
### DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
### THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
### OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
# Install library headers for building extensions | |
sudo apt-get update | |
sudo apt-get install build-essential git-cvs rake rubygems libxslt-dev libxml2-dev libmagickwand-dev libsqlite3-dev libmysql-ruby libmysqlclient-dev | |
sudo gem install bundle sqlite3 | |
# Clone redmine repo to ./redmine | |
git clone git://github.com/redmine/redmine.git | |
cd redmine | |
cp config/database.yml.example config/database.yml | |
### Here vim will be executed to change DB settings: | |
### production: | |
### adapter: sqlite3 | |
### dbfile: db/redmine.db | |
vim config/database.yml | |
# Prepare | |
bundle install | |
rake generate_secret_token | |
rake db:migrate RAILS_ENV="production" | |
### Here you might be asked about default locale | |
rake redmine:load_default_data RAILS_ENV="production" | |
# Create start.sh for quick launching Redmine | |
echo '#!/bin/bash' > ./start.sh | |
echo 'ruby script/rails server -e production -b 127.0.0.1' >> ./start.sh | |
chmod u+x ./start.sh | |
# Start Redmine server | |
ruby script/rails server -e production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment