[바이오] Tera 구축사례

sudo apt update

sudo apt install -y apache2 ruby ruby-dev build-essential libapache2-mod-passenger libmysqlclient-dev

sudo gem install bundler

sudo systemctl is-enabled apache2
sudo systemctl status apache2

#마리아디비에서
create database redmine;

sudo mkdir /home/redmine
cd /opt
sudo ln -s /home/redmine redmine
cd ./redmine

sudo wget https://www.redmine.org/releases/redmine-5.0.5.tar.gz
sudo tar -xvzf redmine-5.0.5.tar.gz

cd /opt
sudo ln -s /home/redmine/redmine-5.0.5 redmine

cd /opt/redmine/
sudo cp config/database.yml.example config/database.yml
sudo vi config/database.yml

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: “secretPassword”

Use “utf8” instead of “utfmb4” for MySQL prior to 5.7.7

encoding: utf8mb4

sudo bundle config set --local without ‘development test’
sudo bundle install
sudo bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
sudo RAILS_ENV=production bundle exec rake redmine:load_default_data
en 입력

cd /etc/apache2/sites-available
vi 000-default.conf

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    RailsEnv production
    DocumentRoot /opt/redmine/public
    #DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory "/opt/redmine/public">
        Allow from all
        Require all granted
    </Directory>
---

sudo apachectl configtest
sudo systemctl restart apache2

http://localhost:80
[로그인] 버튼
admin
admin