개요
본 포스팅 에서는 프로젝트 관리 툴로 널리 사용되는 redmine(최신 버전)설치에 대해 알아보겠습니다.
redmine은 Ruby on Rails 프레임워크를 사용하여 작성된 프로젝트 관리 웹어플리케이션 입니다.
redmine 에 대한 자세한 설명은 다음 링크를 참고 하시길 바랍니다.
ruby, mariadb, apache 설치
RVM을 통한 ruby 설치
현재 redmine stable 버전(4.0)은 ruby 2.2 이상을 요구합니다.
애석하게도 centos7의 기본 ruby 버전은 2.0 이기 때문에 rvm을 이용하여 ruby 최신버전을 설치합니다.
GPG 키 설치
$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net gpg: requesting key 39499BDB from hkp server keys.gnupg.net gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported gpg: key 39499BDB: public key "Piotr Kuczynski <piotr.kuczynski@gmail.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 2 gpg: imported: 2 (RSA: 2)
RVM 설치
$ \curl -sSL https://get.rvm.io | bash -s stable Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc gpg: Signature made 2019년 07월 10일 (수) using RSA key ID 39499BDB gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB GPG verified '/usr/local/rvm/archives/rvm-1.29.9.tgz' Creating group 'rvm' Installing RVM to /usr/local/rvm/ Installation of RVM in /usr/local/rvm/ is almost complete: * First you need to add all users that will be using rvm to 'rvm' group, and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`. * To start using RVM you need to run `source /etc/profile.d/rvm.sh` in all your open shell windows, in rare cases you need to reopen all shell windows. * Please do NOT forget to add your users to the rvm group. The installer no longer auto-adds root or users to the rvm group. Admins must do this. Also, please note that group memberships are ONLY evaluated at login time. This means that users must log out then back in before group membership takes effect! Thanks for installing RVM 🙏 Please consider donating to our open collective to help us maintain RVM. 👉 Donate: https://opencollective.com/rvm/donate
ruby 설치
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc gpg: Signature made 2019년 07월 10일 (수) using RSA key ID 39499BDB gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB GPG verified '/usr/local/rvm/archives/rvm-1.29.9.tgz' Upgrading the RVM installation in /usr/local/rvm/ Upgrade of RVM in /usr/local/rvm/ is complete. * Please do NOT forget to add your users to the rvm group. The installer no longer auto-adds root or users to the rvm group. Admins must do this. Also, please note that group memberships are ONLY evaluated at login time. This means that users must log out then back in before group membership takes effect! Thanks for installing RVM 🙏 Please consider donating to our open collective to help us maintain RVM. 👉 Donate: https://opencollective.com/rvm/donate Ruby enVironment Manager 1.29.9 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin Searching for binary rubies, this might take some time. No binary rubies available for: centos/7/x86_64/ruby-2.6.3. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for centos. Installing requirements for centos. Installing required packages: patch, autoconf, automake, bison, bzip2, gcc-c++, libffi-devel, libtool, patch, readline-devel, ruby, sqlite-devel..............| Requirements installation successful. Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.6.3, this may take a while depending on your cpu(s)... ruby-2.6.3 - #downloading ruby-2.6.3, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13.8M 100 13.8M 0 0 252k 0 0:00:56 0:00:56 --:--:-- 554k ruby-2.6.3 - #extracting ruby-2.6.3 to /usr/local/rvm/src/ruby-2.6.3..... ruby-2.6.3 - #configuring...................................................................... ruby-2.6.3 - #post-configuration.. ruby-2.6.3 - #compiling............................................................................................... ruby-2.6.3 - #installing................................ ruby-2.6.3 - #making binaries executable.. ruby-2.6.3 - #downloading rubygems-3.0.6 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 866k 100 866k 0 0 1069k 0 --:--:-- --:--:-- --:--:-- 1069k No checksum for downloaded archive, recording checksum in user configuration. ruby-2.6.3 - #extracting rubygems-3.0.6..... ruby-2.6.3 - #removing old rubygems........ ruby-2.6.3 - #installing rubygems-3.0.6............................................... ruby-2.6.3 - #gemset created /usr/local/rvm/gems/ruby-2.6.3@global ruby-2.6.3 - #importing gemset /usr/local/rvm/gemsets/global.gems................................................................ ruby-2.6.3 - #generating global wrappers....... ruby-2.6.3 - #gemset created /usr/local/rvm/gems/ruby-2.6.3 ruby-2.6.3 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list ruby-2.6.3 - #generating default wrappers....... ruby-2.6.3 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). Install of ruby-2.6.3 - #complete Ruby was built without documentation, to build it run: rvm docs generate-ri Creating alias default for ruby-2.6.3.... * To start using RVM you need to run `source /usr/local/rvm/scripts/rvm` in all your open shell windows, in rare cases you need to reopen all shell windows.
ruby 버전 확인
$ source /etc/profile.d/rvm.sh $ ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
RVM 설치에 대한 자세한 내용은 다음 링크를 참고하세요.
RVM: Ruby Version Manager – Installing RVM
RVM supports most UNIX like systems and Windows (with Cygwin or Bash on Ubuntu on Windows). The basic requirements are bash, curl, gpg2 and overall GNU version of tools – but RVM tries to autodetect it and install anything that is needed.
mariadb yum repository 등록
/etc/yum.repos.d/mariadb.repo 파일에 아래 내용을 저장합니다.
# MariaDB 10.3 CentOS repository list - created 2019-10-24 06:16 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
mariadb 설치
$ yum install MariaDB-server MariaDB-client
mariadb 설정 파일 수정
설정파일 위치는 /etc/my.cnf.d/server.cnf 입니다.
[mysqld]
skip-name-resolve
init_connect = "SET collation_connection = utf8mb4_unicode_ci"
init_connect = "SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci"
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
log_bin
max_binlog_size = 50M
expire_logs_days = 7
mariadb client 설정파일 수정
/etc/my.cnf.d/mysql-clients.cnf 파일을 수정하면 됩니다.
[mysql]
default-character-set = utf8mb4
mariadb 실행 후 확인
$ systemctl start mariadb
$ mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 11 Server version: 10.3.18-MariaDB-log MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
MariaDB [(none)]> status mysql Ver 15.1 Distrib 10.3.18-MariaDB, for Linux (x86_64) using readline 5.1 Connection id: 11 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server: MariaDB Server version: 10.3.18-MariaDB-log MariaDB Server Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn. characterset: utf8mb4 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 3 min 51 sec Threads: 8 Questions: 8 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 11 Queries per second avg: 0.034 -------------- MariaDB [(none)]>
characterset 값이 모두 utf8mb4임을 확인하고 다음으로 넘어갑니다.
mariadb root 패스워드 변경
MariaDB [(none)]> update mysql.user set password=password('PASSWORD') where user='root'; Query OK, 4 rows affected (0.001 sec) Rows matched: 4 Changed: 4 Warnings: 0 MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.001 sec) MariaDB [(none)]>
apache 설치
$ yum -y install httpd
다음 포스팅에 계속….