リポジトリに登録したSJISファイルをRedmine上から確認するのに、Redmine3が必要だったのでがんばってみた。

カスタマイズ概要

  • Subversionとの連携
    • Redmine認証によるSubversion運用
      BitnamiRedmine3.4.6-4にDBD:mysqlが入っていないので、BitnamiRedmine2.6のファイルをコピーして対応した
  • Redimneプラグインのインストール
    • Wiki External Filter
      videoが動かない。ファイル名のルールが変わったことに対応する必要がある。スクリプトに環境変数を変更させなければならないから、外部スクリプトにするのかな?自分は使わないので対応しない。
    • redmine_scm
      リポジトリの自動生成機能
    • smile_togglesidebar
      サイドバーを隠す機能
    • code_review
      リポジトリの参照画面からコードレビューを行う機能

環境

OSUbuntu18.04.1 LTS
RedmineなどBitnamiRedmine3.4.6-4
項目設定値説明
Redmine管理者ユーザ名userインストール時に設定
Redmine管理者パスワードbitnamibitnamiインストール時に設定
MySQL管理者ユーザ名root固定
MySQL管理者パスワードbitnamibitnamiRedmine管理者パスワードと同じになる

インストール手順

新規インストール用の手順

  1. Linuxのインストール
    省略
  2. aptパッケージuniverseを追加する
    cat << EEOOFF | sudo tee  /etc/apt/sources.list
    deb http://jp.archive.ubuntu.com/ubuntu bionic main
    deb http://archive.ubuntu.com/ubuntu bionic-security main
    deb http://jp.archive.ubuntu.com/ubuntu bionic-updates main
    deb http://jp.archive.ubuntu.com/ubuntu bionic universe
    deb http://jp.archive.ubuntu.com/ubuntu bionic-updates universe
    deb http://security.ubuntu.com/ubuntu bionic-security universe
    EEOOFF
  3. aptの更新
    sudo apt update
    sudo apt upgrade
  4. 実行ファイル格納ディレクトリの作成
    sudo mkdir /opt/bin
  5. unzipのインストール
    Redmineプラグインのインストールに使用
    sudo apt install unzip
  6. subversionのインストール
    Redmineプラグインのインストールに使用
    sudo apt install subversion
  7. w3m
    Redmineプラグインのインストールに使用
    sudo apt install w3m
  8. javaのインストール
    sudo apt install default-jre
  9. latex のインストール
    https://linuxconfig.org/how-to-install-latex-on-ubuntu-18-04-bionic-beaver-linux
    sudo apt install texlive-full
  10. blockdiagのインストール
    sudo apt install python-blockdiag
    
    cat << EEOOFF | sudo tee /opt/bin/blockdiag.sh
    #!/bin/bash
    export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
    /usr/bin/blockdiag \${@}
    EEOOFF
    
    sudo chmod +x /opt/bin/blockdiag.sh
  11. nwdiag (packetdiag rackdiag)のインストール
    sudo apt install python-nwdiag
  12. seqdiagのインストール
    sudo apt install python-seqdiag
  13. subversionのインストール
    sudo apt install subversion
  14. graphvizのインストール
    sudo apt install graphviz
    
    cat << EEOOFF | sudo tee /opt/bin/graphviz.sh
    #!/bin/bash
    export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
    /usr/bin/dot \${@}
    EEOOFF
    
    sudo chmod +x /opt/bin/graphviz.sh
  15. plantumlのインストール
    http://plantuml.com/download.html からダウンロード
    sudo mkdir /opt/bin
    sudo cp platuml.jar /opt/bin
    
    cat << EEOOFFPLANTUML | sudo tee /opt/bin/plantuml.sh
    #!/bin/bash
    /usr/bin/java -Djava.io.tmpdir=/var/tmp -jar /opt/bin//plantuml.jar \${@}
    EEOOFFPLANTUML
    
    sudo chmod +x /opt/bin/plantuml.sh
  16. スタートアップスクリプトの作成
    cat << EEOOFF | sudo tee  /etc/init.d/bitnami-redmine
    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides:       bitnami-redmine
    # Required-Start: $network $remote_fs
    # Required-Stop:  $network $remote_fs
    # Default-Start:  2 3 4 5
    # Default-Stop:   0 1 6
    # Short-Description: BitNami Redmine Stack service
    # Description: BitNami Redmine Stack service
    ### END INIT INFO
    
    /opt/redmine/ctlscript.sh \$@
    EEOOFF
    
    sudo chmod +x /etc/init.d/bitnami-redmine
    sudo update-rc.d bitnami-redmine defaults
  17. subversion,gitのリポジトリ格納ディレクトリの作成
    sudo mkdir -p /opt/redmine-repos/{svn,git}
    sudo chown -R daemon:daemon /opt/redmine-repos
  18. リポジトリのpost create shellの作成
    cat << EEOOFF | sudo tee /opt/bin/post-create.sh
    #!/bin/sh
    
    SCM_REPO_PATH=\$1
    SCM_TYPE=\$2
    SCM_PROJECT=\$3
    
    SCM_REPO_NAME=\$(basename \$SCM_REPO_PATH)
    SCM_REPO_ROOT=\$(dirname \$SCM_REPO_PATH) 
    
    case "\$SCM_TYPE" in
       svn)
           svn mkdir file://\${SCM_REPO_PATH}/trunk file://\${SCM_REPO_PATH}/tags 
    file://\${SCM_REPO_PATH}/branches -m 'Create trunk, tags, and branches.'
           cat > \${SCM_REPO_PATH}/hooks/pre-commit <<EOF
    #!/usr/bin/python
    """
    Subversion pre-commit hook which currently checks that the commit contains a commit message to avoid commiting empty changesets which tortoisesvn seems to have a habbit of committing.
    
    Based on http://svn.collab.net/repos/svn/branches/1.2.x/contrib/hook- 
    scripts/commit-block-joke.py and hooks/pre-commit.tmpl
    
    
    Hacked together by Jacques Marneweck <jacques@php.net>
    
    \\\$Id\\\$
    """
    
    import sys, os, string
    
    SVNLOOK='/opt/redmine/subversion/bin/svnlook'
    
    def main(repos, txn):
        log_cmd = '%s log -t "%s" "%s"' % (SVNLOOK, txn, repos)
        log_msg = os.popen(log_cmd, 'r').readline().rstrip('\n')
    
        if len(log_msg) < 10:
            sys.stderr.write ("Please enter a commit message which details what has  changed during this commit.\n")
            sys.exit(1)
        else:
            sys.exit(0)
    
        if __name__ == '__main__':
            if len(sys.argv) < 3:
                sys.stderr.write("Usage: %s REPOS TXN\n" % (sys.argv[0]))
        else:
            main(sys.argv[1], sys.argv[2])
    EOF
           chmod +x \${SCM_REPO_PATH}/hooks/pre-commit
           ;;
       git)
           ;;
       mercurial)
           ;;
       bazaar)
           ;;
       github)
           ;;
       *)
           echo "SCM not supported: \$SCM_TYPE" >&2
           ;;
    esac
    
    exit 0
    EEOOFF
    
    sudo chmod +x /opt/bin/post-create.sh

新規・アップグレード共通の手順

  1. Bitnami-Redmineのダウンロード
    wget https://bitnami.com/redirect/to/354032/bitnami-redmine-3.4.6-4-linux-x64-installer.run
  2. 変数にバージョン情報を入れる
    redminever=redmine-3.4.6-4
  3. bitnami redmineのインストール
    chmod +x  bitnami-${redminever}-linux-x64-installer.run
    sudo ./bitnami-${redminever}-linux-x64-installer.run
    以下、設定内容
    Please choose an option [1] :
    Subversion [Y/n] :
    PhpMyAdmin [Y/n] :
    Git [Y/n] :
    Is the selection above correct? [Y/n]:
    Select a folder [/opt/redmine-3.4.6-3]:
    Your real name [User Name]:
    Email Address [user@example.com]:
    Login [user]:
    Password :bitnamibitnami
    Please choose an option [7] :
    Do you want to configure mail support? [y/N]:
    Do you want to continue? [Y/n]:
    Launch Redmine application. [Y/n]:
    Press [Enter] to continue:
  4. シンボリックリンクの張替え(変数redmineverの使用はここまで。以降はシンボリックリンクにてアクセスする)
    sudo rm /opt/redmine
    sudo ln -s /opt/${redminever} /opt/redmine
  5. SubversionのRedmine認証
    sudo sh -c 'echo Include \"/opt/redmine/apache2/conf/redmine.conf\" >> 
    /opt/redmine/apache2/conf/httpd.conf'
    
    cat << EEOOFF | sudo tee /opt/redmine/apache2/conf/redmine.conf
    LoadModule perl_module modules/mod_perl.so
    PerlLoadModule Apache::Authn::Redmine
      <Location /svn>
       DAV svn
       SVNParentPath "/opt/redmine-repos/svn"
    #    Order deny,allow
    #    Deny form all
    #    Satisfy any
     
    #   PerlAccessHandler Apache::Authn::Redmine::access_handler
       PerlAuthenHandler Apache::Authn::Redmine::authen_handler
       AuthType Basic
       AuthName "SVN Repository"
       Require valid-user
       RedmineDSN 
    "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/opt/redmine/mysql/tmp/mysql.sock"
    
       RedmineDbUser "root"
       RedmineDbPass "bitnamibitnami"
     </Location>
     # Git
     SetEnv GIT_PROJECT_ROOT /opt/redmine-repos/git
     SetEnv GIT_HTTP_EXPORT_ALL
     ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
     <Location /git>
       AuthType Basic
       AuthName "Redmine Git Repository"
       Require valid-user
    
       PerlAccessHandler Apache::Authn::Redmine::access_handler
       PerlAuthenHandler Apache::Authn::Redmine::authen_handler
    
       RedmineDSN 
    "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/opt/redmine/mysql/tmp/mysql.sock"
       RedmineDbUser "root"
       RedmineDbPass "bitnamibitnami"
       RedmineGitSmartHttp yes
     </Location>
    EEOOFF
    
    sudo mkdir /opt/redmine/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache/Authn
    sudo cp /opt/redmine/apps/redmine/htdocs/extra/svn/Redmine.pm 
    /opt/redmine/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache/Authn/Redmine.pm
  6. Redmine pluginのインストール
    1. plugin code_review
      wget https://github.com/haru/redmine_code_review/releases/download/0.9.0/redmine_code_review-0.9.0.zip
      unzip redmine_code_review-0.9.0.zip
      sudo cp -r redmine_code_review /opt/redmine/apps/redmine/htdocs/plugins/
    2. plugin smile_togglesidebar
      git clone https://github.com/Smile-SA/redmine_smile_togglesidebar
      sudo cp -r redmine_smile_togglesidebar /opt/redmine/apps/redmine/htdocs/plugins/
    3. plugin redmine_scm
      svn export http://subversion.andriylesyuk.com/scm-creator redmine_scm
      sudo cp -r scm-creator  /opt/redmine/apps/redmine/htdocs/plugins/redmine_scm
      
      cat << EEOOFF | sudo tee /opt/redmine/apps/redmine/htdocs/config/scm.yml
      production:
       deny_delete: true
       auto_create: true
       post_create: /opt/bin/post-create.sh
       svn:
         path: /opt/repos/svn
         svnadmin: /opt/redmine/subversion/bin/svnadmin
         url: svn
       git:
         path: /opt/repos/git
         git: /opt/redmine/git/bin/git
         options: --bare
         url: git
         update_server_info: true
         git_ext: true
       
      development:
      EEOOFF
    4. plugin Wiki External Filter
      git clone http://github.com/johnson-logicmatter/wiki_external_filter
        
      cat << EEOOFF1 | tee wiki_external_filter/config/routes.rb
      match 'wiki_external_filter/:filename', :controller => 'wiki_external_filter',
      :action => 'filter', :macro => 'video', :index => '1', :requirements => { :filename => /video\.flv/ }, :via => [:get]
      match 'wiki_external_filter/:filename', :controller => 'wiki_external_filter', :action => 'filter', :macro => 'video_url', :index => '1', :requirements => { :filename => /video_url\.flv/ }, :via => [:get]
      match '/wiki_external_filter', :to => 'wiki_external_filter#filter', :via => [:get, :post]
      EEOOFF1
       
      cat << EEOOFF2 | tee wiki_external_filter/config/wiki_external_filter.yml
      development: &development
       plantuml:
         description: "Constructs UML diagram image from its textual description in PlantUML language, see http://plantuml.sourceforge.net"
         template: image
         outputs:
           - command: "/opt/bin/plantuml.sh -pipe"
             content_type: "image/png"
             prolog: "@startuml"
             epilog: "@enduml"
       tikz:
         description: "Converts latex/tikz picture to svg. It requires pdflatex and pdf2svg."
         template: image
         replace_attachments: true
         outputs:
           - command: "/opt/bin/latextool.sh -t"
             content_type: "image/svg+xml"
       le:
         description: "Converts latex excerpts to png. It requires latex and divpng."
         template: image
         replace_attachments: true
         outputs:
           - command: "/opt/bin/latextool.sh -e"
             content_type: "image/png"
       latex:
         description: "Converts latex to svg. It requires pdflatex and pdf2svg."
         template: image
         replace_attachments: true
         outputs:
           - command: "/opt/bin/latextool.sh"
             content_type: "image/svg+xml"
       graphviz:
         description: "Constructs graph image from its textual description in DOT language, see http://www.graphviz.org"
         template: image
         outputs:
           - command: "/opt/bin/graphviz.sh -Tsvg"
             content_type: "image/svg+xml"
             #        content_type: "image/png"
       gneato:
         description: "Constructs graph image from its textual description in NEATO language, see http://www.graphviz.org"
         template: image
         outputs:
           - command: "/usr/bin/neato -Tsvg"
             content_type: "image/svg+xml"
      actdiag:
         description: "Constructs axtion-diagram image from its textual description in actdiag language."
         template: svg
         outputs:
           - command: "/usr/bin/actdiag -Tsvg -o/dev/stdout /dev/stdin"
             content_type: "image/svg+xml"
      #  ritex:
      #    description: "Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/"
      #    template: svg
      #    outputs:
      #      - command: "(echo '<!DOCTYPE math PUBLIC \\"-//W3C//DTD MathML 2.0//EN\\" \\"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd\\">'; /usr/bin/ritex) | xmllint --noent --nonet --catalogs --loaddtd - | sed 's/^<!DOCTYPE.\\\\+\$//' | /usr/bin/math2svg"
      #        content_type: "image/svg+xml"
       video:
         description: "Converts video file given by its filename to FLV and displays it via Flowplayer"
         template: flash-video
         replace_attachments: true
         outputs:
           - command: "xargs -I{} ffmpeg -i {} -vframes 1 -f mjpeg -"
             content_type: "image/jpeg"
             # We have to use temporary file as otherwise ffmpeg is unable to inject
             # metadata.
           - command: "FN=\`cat\`; if [ \`echo \${FN##*.} | tr [:upper:] [:lower:]\` != 'flv' ]; then TMPVIDEO=\`tempfile --directory=/var/tmp\`; ffmpeg -y -i \$FN -qscale 1 -ar 44100 -f flv \$TMPVIDEO; STATUS=\$?; cat \$TMPVIDEO; rm \$TMPVIDEO; exit \$STATUS; else cat \$FN; fi"
             content_type: "video/x-flv"
       video_url:
         description: "Converts video file given by its URL to FLV and displays it via Flowplayer"
         template: flash-video
         outputs:
           - command: "wget -i - -O - | ffmpeg -i - -vframes 1 -f mjpeg -"
             content_type: "image/jpeg"
             # We have to use temporary file as otherwise ffmpeg is unable to inject
             # metadata.
           - command: "FN=\`cat\`; wget \$FN -O - | (if [ \`echo \${FN##*.} | tr [:upper:] [:lower:]\` != 'flv' ]; then TMPVIDEO=\`tempfile --directory=/var/tmp\`; ffmpeg -y -i - -qscale 1 -ar 44100 -f flv \$TMPVIDEO; STATUS=\$?; cat \$TMPVIDEO; rm \$TMPVIDEO; exit \$STATUS; else cat; fi)"
             content_type: "video/x-flv"
       fortune:
         description: "Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)"
         template: text
         cache_seconds: 0
         outputs:
           - command: "/usr/games/fortune"
             content_type: "text/plain"
       blockdiag:
         description: "Constructs block-diagram image from its textual description in blockdiag language, see 
      http://tk0miya.bitbucket.org/blockdiag/build/html/index.html"
         template: svg
         outputs:
           - command: "/opt/bin/blockdiag.sh -Tsvg -o/dev/stdout /dev/stdin"
             content_type: "image/svg+xml"
       nwdiag:
         description: "Constructs network diagram image from its textual description in 
      nwdiag language."
         template: svg
         outputs:
           - command: "/usr/bin/nwdiag -Tsvg -o/dev/stdout /dev/stdin"
             content_type: "image/svg+xml"
       packetdiag:
         description: "Constructs packet-diagram image from its textual description in 
      packetdiag language."
         template: svg
         outputs:
           - command: "/usr/bin/packetdiag -Tsvg -o/dev/stdout /dev/stdin"
             content_type: "image/svg+xml"
       rackdiag:
         description: "Constructs rack-diagram image from its textual description in 
      rackdiag language."
         template: svg
         outputs:
           - command: "/usr/bin/rackdiag -Tsvg -o/dev/stdout /dev/stdin"
             content_type: "image/svg+xml"
       seqdiag:
         description: "Constructs sequence-diagram image from its textual description in 
      seqdiag language."
         template: svg
         outputs:
           - command: "/usr/bin/seqdiag -Tsvg -o/dev/stdout /dev/stdin"
             content_type: "image/svg+xml"
      test:
       type: mock
      production:
       <<: *development
      EEOOFF2
      
      cat << EEOOFF | sudo tee /opt/bin/latextool.sh
      #!/bin/bash
      # a wrapper for redmine's wiki external filter 
      #
      
      # Issues/Bugs
      # - there must be only one space between 'remember picture'
      #   otherwise pdflatex won't be called twice
      
      #
      # -- START command setup --
      #
      export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
      cmd_pdflatex="/usr/bin/pdflatex --interaction=nonstopmode"
      cmd_latex="/usr/bin/latex --interaction=nonstopmode"
      cmd_pdf2svg="pdf2svg"
      cmd_dvipng="/usr/bin/dvipng"
      cmd_dvisvg="/usr/bin/dvisvgm"
      # -- END command setup --
      # ------------------------------------------------------------------------------
      # show usage
      # ------------------------------------------------------------------------------
      show_usage(){
      cat<<EOF
      USAGE: latextool.sh < file.tex > output [-d| -e |-t]
            -d    turn debug on, i.e. it won't clean up tmp dir on exit
            -e    assume latex excerpt (outputs png)
            -t    assume tikz picture  (outputs svg)
      EOF
       exit 1
      }
      # ------------------------------------------------------------------------------
      # handle error/exit
      # ------------------------------------------------------------------------------
      
      catch_exit(){
       test \$? != 0 && echo "<pre>input document:<br/><div style=\"border: \
       1px solid #995;background:#eee;color:#333;font-size:12px\">" >&2;cat \$f_tex>&2;echo "</div>" >&2;cat \$f_log >&2; echo "</pre>" >&2
       # clean up
       test \$DEBUG || rm -f \$d_tmp/input* \$d_tmp/out*svg \$d_tmp/*log
       test \$DEBUG || rmdir \$d_tmp &>> /dev/null
      }
      
      # ------------------------------------------------------------------------------
      # init vars
      # ------------------------------------------------------------------------------
      init(){
       set -o errexit
       trap "catch_exit" INT TERM EXIT
      
       d_tmp=/tmp/latex_sh_\$\$_\$RANDOM
       f_tex=\$d_tmp/input.tex
       f_log=\$d_tmp/latex_sh.log
       test -d \$d_tmp || mkdir \$d_tmp
       touch \$f_log
       sed 's/![\ ]*}/}/' - | sed  's/{!/{/g'  > \$f_tex # strip some chars from redmine 
      wiki
       if [ !`grep 'remember picture' \$f_tex &>>\$f_log` ];then
         RP=1
       fi
       cd \$d_tmp
      }
      
      # ------------------------------------------------------------------------------
      # assumes latex excerpt as input
      # output: png
      # ------------------------------------------------------------------------------
      
      do_le(){
       f_le=\$d_tmp/input_le.tex
       f_dvi=\$d_tmp/input_le.dvi
       f_png=\$d_tmp/input_le1.png
       echo -n " 
      \documentclass[12pt]{article}
      \usepackage[whole]{bxcjkjatype}
      \usepackage{amsmath}
      \usepackage{amsfonts}
      \usepackage{amssymb}
      \usepackage{color}
      \usepackage[active,displaymath,textmath,graphics]{preview}
      \\thispagestyle{empty}
      \\begin{document}
      " > \$f_le
      cat \$f_tex >> \$f_le
      echo -n "
      \\end{document}
      " >> \$f_le
      f_tex=\$f_le
      \$cmd_latex \$f_le &>> \$f_log
      \$cmd_dvipng \$f_dvi &>> \$f_log
      cat \$f_png
      exit 0
      }
      
      # ------------------------------------------------------------------------------
      # assumes tikz picture as input
      # ------------------------------------------------------------------------------
      do_tikz(){
       f_tikz=\$d_tmp/input_tikz.tex
       f_pdf=\$d_tmp/input_tikz.pdf
       f_svg=\$d_tmp/output_tikz.svg
      
       # defaults 
       # TODO: is it possible to do it automatically like dvipng?
       scale=1
       width=100mm
       height=20mm
      
       # parsing dimensions
       dim=`head -1 \$f_tex `;IFS=' '; 
       #echo \$dim
       # TODO check errors
       if [ "\$dim" != "" ]; then
         set -- \$dim; 
         test "\$1" && width=\$1 height=\$2; scale=\$3
       fi
       echo -n " 
      \documentclass{article}
      \usepackage{tikz}
      \usepackage{geometry}
      %\usepackage{amsmath,amssymb}
      %\usepackage{bodegraph}
      %\usepackage[symbols]{circuitikz}
      %\usetikzlibrary{intersections}
      \usetikzlibrary{calc}
      \usetikzlibrary{positioning}
      \usetikzlibrary{mindmap,trees}
      %\geometry{
      %   paperwidth=\$width, paperheight=\$height
      %}
      \\thispagestyle{empty}
      \\begin{document} 
      %\\begin{tikzpicture}[remember picture, overlay,scale=\$scale, transform shape]
      %\\begin{tikzpicture}
      %" > \$f_tikz
      cat \$f_tex >> \$f_tikz
      echo -n "
      %\\end{tikzpicture}
      \\end{document}
      " >> \$f_tikz
       f_tex=\$f_tikz
       \$cmd_pdflatex \$f_tikz &>> \$f_log
       test \$RP &&  \$cmd_pdflatex \$f_tikz &>> \$f_log # calling twice in case of remember picture
       \$cmd_pdf2svg \$f_pdf \$f_svg &>> \$f_log
       cat \$f_svg
       exit 0
      }
      # ------------------------------------------------------------------------------
      # assumes full latex input
      # ------------------------------------------------------------------------------
      do_full(){
       f_tex=\$d_tmp/input.tex
       f_pdf=\$d_tmp/input.pdf
       f_svg=\$d_tmp/output.svg
       f_dvi=\$d_tmp/input.dvi
       \$cmd_latex \$f_tex &>> \$f_log
       test \$RP &&  \$cmd_latex \$f_tex &>> \$f_log # calling twice in case of remember picture
       \$cmd_dvisvg \$f_dvi -o \$f_svg &>> \$f_log
       cat \$f_svg
       exit 0
      }
      #
      # Main 
      #
      test -t 0 && show_usage 
      # parse args
      while getopts ":det" opt; do
       case \$opt in
         e) 
           LE=1
         ;;
         d)
           DEBUG=1
         ;;
         t)
           TIKZ=1
         ;;
       esac
      done
      
      #DEBUG=1
      init
      test \$LE && do_le
      test \$TIKZ && do_tikz
      do_full
      EEOOFF
      
      sudo chmod +x /opt/bin/latextool.sh
      sudo cp -r wiki_external_filter /opt/redmine/apps/redmine/htdocs/plugins/

アップグレード用の手順

旧データのバックアップ

  1. redmineを止める
    sudo /opt/redmine/ctlscript.sh stop
  2. mysqlを起動
    sudo /opt/redmine/ctlscript.sh start mysql
    sudo /opt/redmine/use_redmine
    mysqldump -u root -p --password=bitnamibitnami --default-character-set=binary bitnami_redmine > dump.sql

Redmineのファイルのバックアップ

tar cvf files.tar /opt/redmine/apps/redmine/htdoc/files 

旧データのリストア

sudo /opt/redmine/use_redmine
mysql -u root -p --password=bitnamibitnami bitnami_redmine < dump.sql

Redmineのファイルのリストア

tar xvf dump.sql

Redmineのマイグレード

sudo /opt/redmine/use_redmine
cd /opt/redmine/apps/redmine/htdocs
ruby bin/rake db:migrate RAILS_ENV=production

Redmineの再起動

sudo /opt/redmine/ctlscript.sh start





トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-12-11 (火) 19:03:49