我正在嘗試將AEM6.3環境設置爲服務並遵循以下步驟。但有一些問題 -將AEM6.3設置爲服務Linux Redhat 7.3版
我有RedHat 7.3版的Linux服務器。
我從here以參考
AEM文件 - (在/ usr/bin中/ AEM)
/斌/慶典
# # /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
! aem.system(/ etc/systemd/system)(找不到system.d所以放在這個文件systemd)
[單位] 說明=的Adobe體驗經理
[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
我提供權限這兩個文件AS-
#chmod u+rwx /usr/bin/aem #chmod u+rwx /etc/systemd/system/aem.system
當我給這些命令 -
#cd /etc/systemd/system #systemctl enable aem.system
它給了我下面的錯誤 -
#systemctl enable aem.system
**Failed to execute operation: No such file or directory**
我失去了任何一步嗎?
謝謝!