linux7 redmine 版本管理软件安装
环境清单:
Redmine version 4.1.1.stable Ruby version 2.4.2-p198 (2017-09-14) [x86_64-linux] Rails version 5.2.4.2 Environment production Database adapter SQLite Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp
一、安装redmine
下载redmine文件
wget https://www.redmine.org/releases/redmine-4.1.1.tar.gz tar -zxvf redmine-4.1.1.tar.gz mv redmine-4.1.1 redmine cd redmine
二、安装包
yum install -y patch libyaml-devel glibc-headers autoconf gcc-c++ glibc-devel patch readline-devel zlib-devel libffi-devel openssl-devel bzip2 automake libtool bison sqlite-devel ImageMagick ImageMagick-devel
三、安装SQLite数据库
wget https://www.sqlite.org/2021/sqlite-autoconf-3340100.tar.gz tar xvzf sqlite-autoconf-3340100.tar.gz cd sqlite-autoconf-3340100 ./configure --prefix=/usr/local make make install
测试数据库
修改配置文件
cp database.yml.example database.yml #覆盖以下文本 # Default setup is given for MySQL 5.7.7 or later. # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. # Line indentation must be 2 spaces (no tabs). production: adapter: sqlite3 database: db/redmine.sqlite3 development: adapter: sqlite3 database: db/redmine_development.sqlite3 test: adapter: sqlite3 database: db/redmine_test.sqlite3 # PostgreSQL configuration example #production: # adapter: postgresql # database: redmine # host: localhost # username: postgres # password: "postgres" # SQLite3 configuration example #production: # adapter: sqlite3 # database: db/redmine.sqlite3 # SQL Server configuration example #production: # adapter: sqlserver # database: redmine # host: localhost # username: jenkins # password: jenkins
四、安装 RVM
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
安装完成后,会列出一些安装信息,其中有一行要注意:
... To start using RVM you need to run `source /etc/profile.d/rvm.sh` .... source /etc/profile.d/rvm.sh
检查一下是否安装正确
五、安装 Ruby
列出已知的 ruby 版本
rvm list known
可以选择现有的 rvm 版本来进行安装(下面以 rvm 2.4.2 版本的安装为例)
rvm install 2.4.2
验证ruby
六、安装依赖
安装
#如果Ruby2.5或更早版本 gem install bundler #安装依赖 bundle install --without development test
可选依赖
#RMagick #RMagick is an interface between the Ruby programming language and the ImageMagick image processing library. The library is necessary for Redmine prior to 4.1.0 to export gantt charts to PNG or PDF. #If ImageMagick (6.4.9 - 6.9.10) is not installed on your system and you are installing Redmine 4.0 or earlier, you should skip the installation of the rmagick gem using: bundle install --without development test rmagick
七、数据库创建
RAILS_ENV=production bundle exec rake db:migrate
八、Session存错创建
bundle exec rake generate_secret_token
九、默认数据创建
RAILS_ENV=production bundle exec rake redmine:load_default_data
十、文件授权
mkdir -p tmp tmp/pdf public/plugin_assets chown -R redmine:redmine files log tmp public/plugin_assets chmod -R 755 files log tmp public/plugin_assets find files log tmp public/plugin_assets -type f -exec chmod -x {} +
启动、测试访问
bundle exec rails server webrick -e production
开启端口
firewall-cmd --zone=public --add-port=3000/tcp --permanent
重启防火墙
firewall-cmd --reload
访问http://ip:3000
用户名/密码:admin/admin
参考:redmine官网