Linux 上で自動的に Confluence を開始



アトラシアン コミュニティをご利用ください。


Linux/Solaris 上では、各サービス (Confluence を含む) を必要な権限だけを有する専用のユーザとして、インストール、設定、および実行する方法が最も推奨されます。

Confluence を Linux/Solaris 上で自動的にインストール、設定、および実行します:

  1. Create a confluence user for instance, using the following command:

    sudo useradd --create-home -c "Confluence role account" confluence
  2. Create a directory to install Confluence into.  In this example we're using /usr/local/confluence.

    sudo mkdir /usr/local/confluence
    sudo chown confluence: /usr/local/confluence

  3. Log in as the confluence user to install Confluence:

    sudo su - confluence
    cd /usr/local/confluence/
    tar zxvf /tmp/confluence-5.6.4.tar.gz
    ln -s confluence-5.6.4/ current
  4. <<CONFLUENCE_INSTALL_DIRECTORY>>/confluence/WEB-INF/classes/ ファイルを編集し、 confluence.home=/usr/local/confluence/<Confluence_Data_Home> を設定する。 (コメントの '#' をはずしたことを確認)
  5. Then back as root, create the file /etc/init.d/confluence (code shown below), which will be responsible for starting up Confluence after a reboot (or when manually invoked).
    (warning) If you are running Ubuntu Jaunty (or later) do not perform this step. Please use the instructions further down this page.

    #!/bin/sh -e
    # Confluence startup script
    #chkconfig: 2345 80 05
    #description: Confluence
    # Define some variables
    # Name of app ( JIRA, Confluence, etc )
    # Name of the user to run as
    # Location of Confluence install directory
    # Location of Java JDK
    export JAVA_HOME=/usr/lib/jvm/java-7-oracle
    case "$1" in
      # Start command
        echo "Starting $APP"
        /bin/su -m $USER -c "$CATALINA_HOME/bin/ &> /dev/null"
      # Stop command
        echo "Stopping $APP"
        /bin/su -m $USER -c "$CATALINA_HOME/bin/ &> /dev/null"
        echo "$APP stopped successfully"
       # Restart command
            $0 stop
            sleep 5
            $0 start
        echo "Usage: /etc/init.d/$APP {start|restart|stop}"
        exit 1
    exit 0
  6. このファイルを実行可能にする:

    sudo chmod +x /etc/init.d/confluence
  7. Set this file to run at the appropriate runlevel. For example, use sudo chkconfig --add confluence on Redhat-based systems, sudo update-rc.d confluence defaults or rcconf on Debian-based systems.
  8. これによって、init スクリプトで Confluence をスタートできる。 通常の成功した起動時出力は以下のように表示される。

    $ sudo /etc/init.d/confluence start
    Starting Confluence:
    If you encounter issues starting up Confluence, please see the Installation guide at
    Using CATALINA_BASE:   /usr/local/confluence/current
    Using CATALINA_HOME:   /usr/local/confluence/current
    Using CATALINA_TMPDIR: /usr/local/confluence/current/temp
    Using JRE_HOME:       /usr/lib/jvm/java-1.7.0-oracle

    You should then see this running at http://<server>:8090/
    (info) The port for this will be whatever is defined in your Confluence server.xml file.

Ubuntu Jaunty (または、それ以降) のためのサービスとして Confluence を追加する

Confluence を Ubuntu Jaunty (または、それ以降) 上のサービスとして自動的に起動するように設定することを続ける:

  1. After logging in as the confluence user to install Confluence, create start and stop scripts in /usr/local/confluence:

    Example startscript:

    export JAVA_HOME=/usr/lib/jvm/java-7-oracle-
    export JDK_HOME=/usr/lib/jvm/java-7-oracle-
    cd /usr/local/confluence/current/bin

    Example stopscript:

    export JAVA_HOME=/usr/lib/jvm/java-7-oracle-
    export JDK_HOME=/usr/lib/jvm/java-7-oracle-
    cd /usr/local/confluence/current/bin
  2. Make both of these scripts executable. For example, by issuing the command: sudo chmod a+x /usr/local/confluence/start /usr/local/confluence/stop.
  3. Karmic and later: Create two text files in /etc/init/ called confluence-up.conf and confluence-down.conf:


    start on runlevel [2345]
    	date >> /tmp/confluence-startup.out
    	exec sudo -u confluence /usr/local/confluence/start >> /tmp/confluence-startup.out 2>&1
    end script


    start on runlevel [16]
    expect fork
    exec sudo -u confluence /usr/local/confluence/stop >> /tmp/confluence-shutdown.out 2>&1

    ... and make them readable to all users:
    sudo chmod a+r /etc/init/confluence-up.conf /etc/init/confluence-down.conf

  1. Jaunty, Intrepid: Create two text files in /etc/event.d/ called confluence-up and confluence-down:


    start on runlevel 2
    start on runlevel 3
    start on runlevel 4
    start on runlevel 5
    exec sudo -u confluence /usr/local/confluence/start >> /tmp/confluence-startup.out 2>&1


    start on runlevel 1
    start on runlevel 6
    exec sudo -u confluence /usr/local/confluence/stop >> /tmp/confluence-shutdown.out 2>&1

    ... and make them readable to all users:
    sudo chmod a+r /etc/event.d/confluence-up /etc/event.d/confluence-down


システム起動時に自動的に Confluence を開始

最終更新日 2017 年 9 月 26 日


Powered by Confluence and Scroll Viewport.