2017-08-25 13 views
0

AEM6.3環境をサービス以下の手順で設定しようとしています。しかし、いくつかの問題がある -サービスとしてAEM6.3を設定するLinux Redhatバージョン7.3

私はRedHatバージョン7.3のLinuxサーバーを持っています。

私はhereからの基準を取ってい

  1. AEMファイル - (は/ usr/binに/ AEM

    /binに/ bashの

    # 
    # /etc/rc.d/init.d/aem6 
    # 
    # 
    # # of the file to the end of the tags section must begin with a # 
    # character. After the tags section, there should be a blank line. 
    # This keeps normal comments in the rest of the file from being 
    # mistaken for tags, should they happen to fit the pattern.> 
    # 
    # chkconfig: 35 85 15 
    # description: This service manages the Adobe Experience Manager java process. 
    # processname: aem6 
    # pidfile: /crx-quickstart/conf/cq.pid 
    
    # Source function library. 
    . /etc/rc.d/init.d/functions 
    
    SCRIPT_NAME=`basename $0` 
    AEM_ROOT=/mnt/crx/author 
    AEM_USER=root 
    
    ######## 
    BIN=${AEM_ROOT}/crx-quickstart/bin 
    START=${BIN}/start 
    STOP=${BIN}/stop 
    STATUS="${BIN}/status" 
    
    case "$1" in 
    start) 
    echo -n "Starting AEM services: " 
    su - ${AEM_USER} ${START} 
    touch /var/lock/subsys/$SCRIPT_NAME 
    ;; 
    stop) 
    echo -n "Shutting down AEM services: " 
    su - ${AEM_USER} ${STOP} 
    rm -f /var/lock/subsys/$SCRIPT_NAME 
    ;; 
    status) 
    su - ${AEM_USER} ${STATUS} 
    ;; 
    restart) 
    su - ${AEM_USER} ${STOP} 
    su - ${AEM_USER} ${START} 
    ;; 
    reload) 
    ;; 
    *) 
    echo "Usage: $SCRIPT_NAME {start|stop|status|reload}" 
    exit 1 
    ;; 
    esac 
    
  2. aem.system(/ etc/systemd/system)(ので、このファイルをsystemdに置いsystem.dを見つけることができませんでした)

    [単位] 説明=アドビエクスペリエンスマネージャー

    [Service] 
    Type=simple 
    ExecStart=/usr/bin/aem start 
    ExecStop=/usr/bin/aem stop 
    ExecReload=/usr/bin/aem restart 
    RemainAfterExit=yes 
    
    [Install] 
    WantedBy=multi-user.target 
    
  3. 私はこれらのファイルの両方にアクセス権を提供してきました

    #chmod u+rwx /usr/bin/aem 
    #chmod u+rwx /etc/systemd/system/aem.system 
    
  4. 私はこれらのcommands-

    を与えているままの
    #cd /etc/systemd/system 
    #systemctl enable aem.system 
    

私がここに任意のステップをしないのですエラー -

#systemctl enable aem.system 

    **Failed to execute operation: No such file or directory** 

の下に私を与えていますか?

ありがとうございます!

答えて

0

カスタムユニットファイルをすべて/etc/systemd/systemに配置するのは正しいので、すべてのアンパッケージファイルの場所です。しかし、あなたのファイルは実際にaem.serviceと呼ばれるべきです。私の知る限り、systemdは.systemで終わるファイルを受け取っていません。副次的に:過度に自由なファイルシステムのアクセス権は本当に不必要ですが、755以上で十分です。

また、リンクされたガイドとして実際に/etc/init.d/aem6ファイルがある場合、systemdのSysV互換レイヤーはそのファイルを読み取ることができ、systemctl enable --now aem6は実行する必要があるすべてです。

関連する問題