Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redmine 3.3Building

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Environment introduction:

CentOS Linux release 7.6.1810 (Core)

MySQL5.7

Redmine 3.3

Ruby-2.3.3

Rails 4.2.6

Reference document: http://www.redmine.org/projects/redmine/wiki/RedmineInstall

1. Environmental preparation

The official yum source downloads the software slowly, replace the yum source with Ali's yum source, and install the epel source

Mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.backup

Curl-o / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Mv / etc/yum.repos.d/epel.repo / etc/yum.repos.d/epel.repo.backup

Wget-O / etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

Yum clean all

Yum makecache

Install rvm and ruby

Curl-L https://get.rvm.io | bash-s stable

An error will be reported at this time, and follow the prompts returned to execute the corresponding command.

Gpg-keyserver hkp://keys.gnupg.net-recv-keys D39DC0E3

(replace with the execution command you prompted)

Set up the Ruby system environment

Source / etc/profile.d/rvm.sh

Rvm reload

Rvm install 2.3.3

Switch the source of Ali

Gem source-r https://rubygems.org/

Gem source-a http://mirrors.aliyun.com/rubygems/

Installation

Gem install rake-v 12.0.0

Gem install rails-v 4.2.6

Install mysql database (5.7)

Wget https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm

Install the mysql source

Yum-y install mysql80-community-release-el7-2.noarch.rpm

(note that MySQL8.0 is installed by default, so after installing the yum source, modify the configuration of the yum source, disable mysql8.0, and open the mysql5.7 source before installing.)

Yum repolist enabled | grep mysql.*

Yum install mysql-community-server

Systemctl start mysqld.service

Run the command to check the running status

Systemctl status mysqld.service

Check the initial password

Grep "password" / var/log/mysqld.log

Log in

Mysql-uroot-p

Modify the password

Mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' *'

Mysql > FLUSH PRIVILEGES

Set up automatic start

Systemctl enable mysqld

Systemctl daemon-reload

two。 Database operation

CREATE DATABASE redmine CHARACTER SET utf8mb4

CREATE USER 'redmine'@'localhost' IDENTIFIED BY' redmine'

GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'

3. Change the configuration file

Extract the software package redmine-3.3.0.tar.gz

Tar xf redmine-3.3.0.tar.gz-C / opt

Cd / opt/redmine-3.3.0

Cp database.yml.example database.yml

Modify the following content of database.yml (this piece should be careful, do not change the database name indiscriminately, otherwise there will be problems, it had better be consistent)

Production:

Adapter: mysql2

Database: redmine

Host: localhost

Username: redmine

Password: "redmine"

Redmine uses Bundler to manage gem dependencies. You need to install Bundler first.

Gem install bundler

Then you can install all the gems required by Redmine using the following command:

Bundle install-without development test

(error is reported after executing this command, workaround yum-y install ImageMagick-devel, and then execute undle install-- without development test again)

Session store secret generation:

Bundle exec rake generate_secret_token

Create the database structure by running the following command under the application root directory (/ opt/redmine-3.3.0):

RAILS_ENV=production bundle exec rake db:migrate

Set the database default dataset and insert the default configuration data into the database by running the following command:

RAILS_ENV=production bundle exec rake redmine:load_default_data

Enter zh

At this point, the redmine installation is complete.

3. Start redmine

Cd / opt/redmine-3.3.0/bin

Echo-e'#! / bin/bash\ nbundle exec rails server webrick-e production-p 3000-b 0.0.0.0-d'> > start.sh

Chmod + x start.sh

. / start.sh

4. Visit redmine

Http://your_ip:3000

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report