如何在Linux(Ubuntu)上安装Redmine

费话就不多说了,本文主要描述如何在如何在Linux(Ubuntu)上安装Redmine。通过这篇文章你将了解如下内容。

TL;DR

  • 在Linux(Ubuntu)上安装Redmine的基本流程
  • 配置phpMyAdmin的远程登录权限
  • 配置Redmine默认访问端口
  • Linux常用操作命令

在Linux(Ubuntu)上安装Redmine的流程

  • 首先下载最新版的Redmine安装包

  • 通过scp命令拷贝本地文件到远程服务器

scp /Users/CharlieChu/Desktop/bitnami-redmine-3.3.2-2-linux-x64-installer.run root@<remote-ip>:/home

bitnami-redmine-3.3.2-2-linux-x64-installer.run 100%  151MB   1.2MB/s   02:07

scp命令

  • 通过ssh连接到远程Linux服务器
ssh root@<remote-ip>

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-63-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

ssh命令

  • 通过cd命令进入到.run文件所在的目录
cd /home
/home# ls
bitnami-redmine-3.3.2-2-linux-x64-installer.run
  • 输入"chmod +x *.run"
chmod +x *.run

chmod命令

  • 输入"./*.run",.run文件就开始运行了,出现如下界面
root@xxxxxx:/home# ./*.run

这样Redmine就安装成功了。

  • 删除安装包

通过rm命令删除Redmine安装包

rm -rf bitnami-redmine-3.3.2-2-linux-x64-installer.run

rm命令 rm -rf file (-r 就是向下递归,不管有多少级目录一并删除. -f 就是直接强行删除)

配置Redmine默认访问端口

Redmine作为内部使用的项目管理系统,默认占用80端口太过于浪费了,这里把Redmine访问端口改成8082。需要修改如下5处配置。

  • 打开 httpd-app.conf 修改PassengerPreStart http://127.0.0.1:80/redmine该行,然后保存退出。
cd /opt/redmine-3.3.2-2/apps/redmine/conf
vim httpd-app.conf

vim命令:打开、保存退出等命令。

可以通过cat命令查看该文件是否修改成功。

cat httpd-app.conf

cat命令

  • 打开 httpd-vhosts.conf 修改<VirtualHost *:80>该行。
vim httpd-vhosts.conf
  • 打开/opt/redmine-3.3.2-2/apache2/scripts/ctl.sh,修改这一段httpd started at port 80
cd ~
vim /opt/redmine-3.3.2-2/apache2/scripts/ctl.sh
  • 打开/opt/redmine-3.3.2-2/apache2/conf/bitnami/bitnami.conf,修改这一段<VirtualHost _default_:80>
cd /opt/redmine-3.3.2-2/apache2/conf/bitnami/
vim bitnami.conf
  • 打开/opt/redmine-3.3.2-2/apache2/conf/httpd.conf,修改第52和212行-Listen 8082ServerName localhost:80的端口信息。
vim /opt/redmine-3.3.2-2/apache2/conf/httpd.conf
:set number

:set number
跳转到指定行

  • 重启Redmine即可。
/opt/redmine-3.3.1-0/ctlscript.sh restart

Syntax OK
/opt/redmine-3.3.2-2/apache2/scripts/ctl.sh : httpd stopped
/opt/redmine-3.3.2-2/mysql/scripts/ctl.sh : mysql stopped
170324 11:33:36 mysqld_safe Logging to '/opt/redmine-3.3.2-2/mysql/data/mysqld.log'.
170324 11:33:36 mysqld_safe Starting mysqld.bin daemon with databases from /opt/redmine-3.3.2-2/mysql/data
/opt/redmine-3.3.2-2/mysql/scripts/ctl.sh : mysql  started at port 3306
Syntax OK
/opt/redmine-3.3.2-2/apache2/scripts/ctl.sh : httpd started at port 8082

配置phpMyAdmin的远程登录权限

利用如下命令打开httpd-app.conf

vim /opt/redmine-3.3.2-2/apps/phpmyadmin/conf/httpd-app.conf

查找到如下内容:

<IfVersion >= 2.3>
Require local

将其修改为:

<IfVersion >= 2.3>
Require all granted

找回用户名和密码信息

远程登录phpMyAdmin时,如果忘记了用户名和密码,则可以登录到服务器去查看密码了:

vim /opt/redmine-3.3.2-2/apps/redmine/htdocs/config/database.yml

这样你就可以看到对应的用户名和密码等信息了。

个人博客

我的个人博客

欢迎点赞!

原文地址:https://www.cnblogs.com/charliechu/p/7631429.html