1. 程式人生 > >Ubuntu安裝Redmine簡易教程

Ubuntu安裝Redmine簡易教程

http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step

HowTo Install Redmine on Ubuntu step by step

  • HowTo Install Redmine on Ubuntu step by step
    • Prerequisite: check your ubuntu version against intended Redmine version
    • Introduction
    • Prerequisites: Apache, mod-passenger, and MySQL
    • Installing and configuring the Ubuntu Redmine package
    • Configuring Apache
    • Backing up Redmine
  • Additional semi-optional packages
    • Email setup
    • Revision control repository setup

Prerequisite: check your ubuntu version against intended Redmine version

Before using or studying this guide you should check which Redmine version you are going for. Be aware that only latest stable releases will be fully compatible with current releases of plugins.

Generally you could also consider only installing ruby from ubuntu-repos and then heading for a release of redmine from redmine’s download page: http://www.redmine.org/projects/redmine/wiki/Download (this is the more common way of installing redmine on ubuntu). In this case this guide is not suited for you and you should check for an alternate guide. Google provides lots of resources for this alternate installation procedure.

If you are sure that you want to install from ubuntu-repositories, keep on reading:

Introduction

This tutorial walks you step-by-step through installing Redmine on a clean/fresh Ubuntu 12.04 installation. This is intended to be a complete cookbook method for getting Redmine installed and running. It makes no assumptions about other things being installed or configured. Since I have had some issues when using the graphical package managers, we will be doing this from the command line prompt to keep things as clear and clean as possible.

I recommend that you install any Ubuntu updates prior to beginning this process. There are almost always some waiting to be applied after Ubuntu is first set up.

Prerequisites: Apache, mod-passenger, and MySQL

There are several support packages that we will install first. The apache installation is pretty simple if you just follow the prompts and accept the defaults.

$ sudo apt-get install apache2 libapache2-mod-passenger

Installing mysql takes just a little more, so the details are spelled out.

$ sudo apt-get install mysql-server mysql-client

The installation process for mysql is going to prompt you for a password for the “root” access for the database server, then ask you to confirm the password in a follow-up screen. This sets the database adminstration password.

Package configuration

  ┌────────────────────┤ Configuring mysql-server-5.5 ├─────────────────────┐

  │ While not mandatory, it is highly recommended that you set a password   │

  │ for the MySQL administrative "root" user.                               │

  │                                                                         │

  │ If this field is left blank, the password will not be changed.          │

  │                                                                         │

  │ New password for the MySQL "root" user:                                 │

  │                                                                         │

  │ _______________________________________________________________________ │

  │                                                                         │

  │                                 <Ok>                                    │

  │                                                                         │

  └─────────────────────────────────────────────────────────────────────────┘

  ┌────┤ Configuring mysql-server-5.5 ├──────────┐

  │                                              │

  │ Repeat password for the MySQL "root" user.   │

  │                                              │

  │                                              │

  │ ____________________________________________ │

  │                                              │

  │                   <Ok>                       │

  │                                              │

  └──────────────────────────────────────────────┘

Installing and configuring the Ubuntu Redmine package

Now it is time to install redmine itself.

$ sudo apt-get install redmine redmine-mysql

You want to allow dbconfig-common to configure the database when prompted so select Yes from the prompt in the panel below.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

Package configuration

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐

│                                                                           │

│ The redmine/instances/default package must have a database installed and  │

│ configured before it can be used.  This can be optionally handled with    │

│ dbconfig-common.                                                          │

│                                                                           │

│ If you are an advanced database administrator and know that you want to   │

│ perform this configuration manually, or if your database has already      │

│ been installed and configured, you should refuse this option.  Details    │

│ on what needs to be done should most likely be provided in                │

│ /usr/share/doc/redmine/instances/default.                                 │

│                                                                           │

│ Otherwise, you should probably choose this option.                        │

│                                                                           │

│ Configure database for redmine/instances/default with dbconfig-common?    │

│                                                                           │

│                    <Yes>                       <No>                       │

│                                                                           │

└───────────────────────────────────────────────────────────────────────────┘

Then you want to provide the “root” password for the database, so that the installer can create the redmine database. This is the password set when you installed mysql.

Package configuration

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐

│ Please provide the password for hte administrative account with which     │

│ this package should create its MySQL database and user.                   │

│                                                                           │

│ Password of the database's administrative user:                           │

│                                                                           │

│ ******__________________________________________________________________  │

│                                                                           │

│                   <Ok>                       <Cancel>                     │

│                                                                           │

└───────────────────────────────────────────────────────────────────────────┘

Tell the redmine installer we are using mysql for this installation by highlighting “mysql” from the list of database choices:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

Package configuration

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐

│ The redmine/instances/default package can be configured to use one of     │

│ several database types. Below, you will be presented with the available   │

│ choices.                                                                  │

│                                                                           │

│ Database type to be used by redmine/instances/default:                    │

│                                                                           │

│                                  sqlite3                                  │

│                                  pgsql                                    │

│                                  mysql                                    │

│                                                                           │

│                                                                           │

│                    <Ok>                        <Cancel>                   │

│                                                                           │

└───────────────────────────────────────────────────────────────────────────┘

Now you are asked to provide a password that will be used to protect the redmine database. Redmine itself will use this when it wants to access mysql.

Package configuration

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐

│ Please provide a password for redmine/instances/default to register with  │

│ the database server.  If left blank, a random password will be            │

│ generated.                                                                │

│                                                                           │

│ MySQL application password for redmine/instances/default:                 │

│                                                                           │

│ *******__________________________________________________________________ │

│                                                                           │

│                    <Ok>                        <Cancel>                   │

│                                                                           │

└───────────────────────────────────────────────────────────────────────────┘

Now confirm the redmine password.

Package configuration

   ┌────┤ Configuring redmine ├─────┐

   │                                │

   │                                │

   │ Password confirmation:         │

   │                                │

   │ *******_______________________ │

   │                                │

   │     <Ok>         <Cancel>      │

   │                                │

   └────────────────────────────────┘

Configuring Apache

安裝依賴並設定目錄許可權(官方缺少):

$ sudo gem install bundler

$ chown www-data:www-data -R /usr/share/redmine

You need to modify two files for apache. The first is /etc/apache2/mods-available/passenger.conf which needs the text PassengerDefaultUser www-data added as seen here:

<IfModule mod_passenger.c>

  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini

  PassengerDefaultRuby /usr/bin/ruby

  PassengerDefaultUser www-data

</IfModule>

Now create a symlink to connect Redmine into the web document space:

$ sudo ln -s /usr/share/redmine/public /var/www/redmine

And modify /etc/apache2/sites-available/000-default.conf to insert the following with the other sections so that apache knows to follow the symlink into Rails:(已修改適配Ubuntu-13.04)

DocumentRoot /var/www

<Directory /var/www/redmine>

    RailsBaseURI /redmine

    PassengerResolveSymlinksInDocumentRoot on

</Directory>

Now restart apache:

$ sudo service apache2 restart

You should now be able to access redmine from the local host

$ firefox http://127.0.0.1/redmine

In the upper right corner of the browser window you should see the “Sign in” link. Click that and enter “admin” at both the Login: and Password: prompts. Note: this is not the password you set during the installation process. Click the Login button.

I recommend that the next thing you do is to click on My account in the upper right corner and change that password. In the page that is displayed there should be a Change password link in the upper right of the white area of the page. Click to change the password.

Backing up Redmine

You should arrange a regular backup of the Redmine database and the files that users upload/attach. The database can be dumped to a text file with:

/usr/bin/mysqldump -u root -p<password> redmine_default | gzip > /path/to/backups/redmine_db_`date +%y_%m_%d`.gz

where is the one you set when installing mysql.

The attachments are stashed in /var/lib/redmine/default/files and can be backed up with something like:

rsync -a /var/lib/redmine/default/files /path/to/backups/files

You can have these commands run automatically by creating a script called /etc/cron.daily/redmine that contains:

#!/bin/sh

/usr/bin/mysqldump -u root -p<password> redmine_default | gzip > /path/to/backups/redmine_db_`date +%y_%m_%d`.gz

rsync -a /var/lib/redmine/default/files /path/to/backups/files

Again, be sure to substitute the mysql root password for in the mysqldump command line. The file should be protected so that only root has read permission because you are storing the root password for your mysql installation in this file. That the first line creates a new file every time the script is run. This can eventually create a large number of backups of your database files. You should have a script that purges old ones periodically.

Additional semi-optional packages

There are some services that Redmine can use that are not absolutely necessary, but are useful. These are email and software repository/revision control systems.

Email setup

At some point you will probably want Redmine to be able to send email. For this you will need to install and configure email. This can be achieved by installing the postfix package. I do not recommend the exim4 package, as there have been some incompatibilities in the way the “sendmail” command line is handled between Redmine and exim4. Unless everyone has an email account on the redmine server you will want to set up external email as a full internet host. Once email service is installed, you will have to restart apache for Redmine to know that it has access to email services.

$ sudo apt-get install postfix

Now that you can send email, you have to tell Redmine about it. You need to create/edit the file /etc/redmine/default/configuration.yml and add the following lines:

production:

  email_delivery:

    delivery_method: :sendmail

若使用騰訊企業郵箱,則配置如下:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

production:

  email_delivery:

    delivery_method: :smtp

    smtp_settings:

      address: smtp.exmail.qq.com

      port: 25

      domain: exmail.qq.com

      authentication: :login

      user_name: [email protected]

      password: yourpassword

development:

  email_delivery:

    delivery_method: :smtp

    smtp_settings:

      address: smtp.exmail.qq.com

      port: 25

      domain: exmail.qq.com

      authentication: :login

      user_name: [email protected]

      password: yourpassword

Then restart apache so that Redmine reloads the configuration file:

$ sudo service apache2 restart

Revision control repository setup

In order to have your software repository on the system Redmine will need the corresponding software installed.

$ sudo apt-get install git subversion cvs mercurial

$ sudo service apache2 restart

That covers it as far as I have gotten in my use of Redmine to date.

安裝可選依賴(提高可行性)

$ sudo apt-get install imagemagick ruby-rmagick

相關推薦

Ubuntu安裝Redmine簡易教程

http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step HowTo Install Redmine on Ubuntu step by step Ho

使用U盤安裝ubuntu 16.04簡易教程

(1):首先我們已經把ubuntu系統放入U盤,成功製作U盤啟動盤,因為我的電腦是thinkpad T430,開機會一直點按F12,會進入啟動選項,然後選擇使用U盤啟動即可,(不同廠商電腦進入按鍵不一定相同,根據個人可以百度進行查詢)進入介面後,有兩個選項,試用ubuntu

ubuntu 安裝 docker 詳細教程

想在 ubuntu 系統上安裝 docker,方法清晰步奏簡單,但必須是64-bit的ubuntu版本,且是以下4個版本之一: Zesty 17.04 Yakkety 16.10 Xenial 16.04 (LTS) Trusty 14.04 (LTS)

Ubuntu安裝微信教程 超簡單的

這次我用的系統是Ubuntu 16.04 x86,在網上先去下載electronic-wechat-linux https://github.com/geeeeeeeeek/electronic-wechat/releases,32位系統就去下載32位的,64位的就去下載64位的,對應好了。然後進入到下載檔案

windows下用pycharm安裝tensorflow簡易教程

最近開始學習深度學習的相關知識,準備實戰一下,看了一些關於tensorflow安裝的部落格,繞了一些彎,因此來填一下坑(多餘安裝的或者非windows),主要圍繞使用pycharm時需要用到tensorflow的安裝過程。 環境:windows10專業版。只是想簡單跑一下t

ubuntu安裝基礎入門教程,重啟黑屏(踩坑)

按照百度經驗裡面的流程一步一步做下來,在安裝啟動引導器裝置謹慎選擇!如果你只裝linux系統,切你只有一塊硬碟,那就使用預設選擇 /dev/sda作為引導分割槽如果你時win + linux 雙系統,如

Ubuntu安裝redmine詳細過程

在ubuntu上通過rvm來安裝ruby和rails,步驟借鑑了官網和網上資料,遇到了各種問題,本篇教程在一個新安裝的Ubuntu14.04 系統上多次實驗,都成功安裝 # **首先將軟體的下載源設定為阿里雲的源** 非常重要!!!!!!!

Ubuntu安裝matlab 2015b教程(含下載和啟用檔案)

1.下載MATLAB和啟用檔案連結: https://pan.baidu.com/s/1bL7sp4 密碼: zwkx把下載好的檔案放到home下,在home下新建的資料夾matlab2015,matlab分別用於掛載映象、安裝軟體2.掛載映象檔案在home下開啟終端,執行下

ubuntu安裝及使用教程

(1)VMware的安裝包 VMware至少要用10.0版本,這裡用的是最新的VMware12版本,這個版本對USB3.0的支援更加完善穩定了,如果以前安裝了10.0以上版本的可以通過VMware的help選單選項直接升級,不升級也是可以使用的。 (2)Ubuntu的映象檔

Linux-Ubuntu 18.04主題美化及字型安裝簡易教程

Ubuntu18.04釋出後,最大的改變估計就是桌面改版了,由原來16.04的untiy轉變成了gnome。 1.安裝美化管理器Tweaks (系統中文名為優化) ctrl+alt+t開啟終端 安裝依賴,輸入命令: sudo apt install

PaddlePaddle:Ubuntu安裝簡易教程

步驟 一、安裝python sudo apt-get install python3 若存在多個版本python,請先設定版本優先順序 update-alternatives: using /usr/bin/python3.5 to provide /usr/bin/

kali 2.0安裝 搜狗輸入法簡易教程

kali 搜狗輸入法安裝kali,配置好安裝源,選擇阿裏鏡像源。(網上教程很多自行搜索)通過瀏覽器進入搜狗官網下載(linux版本,位數根據安裝kali位數定)將下載好的搜狗輸入法版本從下載文件夾路徑剪切到home目錄下(kali界面可操作性)在home目錄下看文件是否存在,然後執行apt-get -f i

ubuntu ufw防火墻簡易教程(轉)

主機 proto status smtp服務 hellip iptable 工具 容易 桌面應用 ufw是一個主機端的iptables類防火墻配置工具,比較容易上手。一般桌面應用使用ufw已經可以滿足要求了。 安裝方法 sudo apt-get install ufw

安裝好Pycharm後如何配置Python解釋器簡易教程

能說 就會 分享 消失 san p s ret 自動 sans 這兩天有許多Python小白加入學習群,並且問了許多關於Pycharm基本使用的問題,今天小編就以配置Python解釋器的問題給大家簡單絮叨一下。1、一般來說,當我們啟動Pycharm,如果Pycharm正常激

轉載:Torch7在Ubuntu下的安裝與配置教程詳解(torch入門使用)

原文;https://www.aliyun.com/jiaocheng/147256.html   摘要:Torch7的本系列教程的主要目的是介紹Torch的入門使用。今天首先分享一下Torch7的安裝。(在Ubuntu14.04安裝torch7)為什麼選擇TorchTo

Win10系統XWware虛擬機器安裝Linux系統(Ubuntu)最新版教程

XWware虛擬機器安裝Linux系統(Ubuntu)教程 一、下載並安裝VMware虛擬機器 藉助VMware Workstation Pro, 我們可以在同一臺Windows或Linux PC上同時執行多個作業系統。 VMware官網:https://www.vmware.com 。 1、下載V

MAC安裝Charles破解版簡易教程

Charles:青花瓷抓包工具。 官網下載:https://www.charlesproxy.com/download/(可惜限制了30天的使用期限) 破解版下載:https://download.csdn.net/download/fifteen718/10774499 破解版安裝

ubuntu server 14 安裝圖形介面教程

https://jingyan.baidu.com/article/64d05a0262b613de55f73b0e.html 參考下,親測有效,本人ubuntu16,32位的,已經安裝成功; 還有16的: http://forum.ubuntu.org.cn/viewtopic.php

轉:VMware 12 安裝Ubuntu 16.04 (圖文教程)

1 環境準備: (1) 原系統為WIN8,已正確安裝虛擬機器VMware Workstation Pro. (2) 下載Ubuntu系統 a. 進入連結http://www.ubuntu.org.cn/download/desktop.

Ubuntu安裝apiDoc以及入門教程

一.apiDoc簡介 apiDoc是用來生成RESTful風格Web API文件的工具,支援現在流行的大部分程式語言,如Python,Java,C#, Go, Dart, Java, JavaScript, PHP, Scala 等。在原始碼的註釋中使用apiDoc提供的註解資訊來生成文