
我正在嘗試在 debian 上安裝 apache 的第二個實例。我使用了多實例腳本。在安裝過程中它說:
root@nextcloudpi:/usr/share/doc/apache2/examples# sudo sh setup-instance suitecrm2
Setting up /etc/apache2-suitecrm2 ...
systemd is in use, no init script installed
use the '[email protected]' service to control your new instance
sample commands:
systemctl start [email protected]
systemctl enable [email protected]
Setting up symlinks: a2enmod-suitecrm2 a2dismod-suitecrm2 a2ensite-suitecrm2 a2dissite-suitecrm2 a2enconf-suitecrm2 a2disconf-suitecrm2 apache2ctl-suitecrm2
Setting up /etc/logrotate.d/apache2-suitecrm2 and /var/log/apache2-suitecrm2 ...
Setting up /etc/default/apache-htcacheclean-suitecrm2
root@nextcloudpi:/usr/share/doc/apache2/examples# sudo systemctl edit apache2.service
所以 systemd 正在使用中,我在 init.d 中沒有得到服務文件 當我嘗試啟動程式碼中提到的服務時,它說沒有[電子郵件受保護]。
如何建立正確的 init.d 檔案來啟動服務,或如何停止 systemd 工作,使其不被使用,並且允許建立第二個實例的腳本放置該腳本。
我查看了文檔,發現有一個腳本 secondary-init-script,也可以在 /use/share/doc/Apache2/examples 中找到。但我不明白這是如何運作的(參見https://alioth-lists-archive.debian.net/pipermail/pkg-apache-commits/2010-February/000296.html
謝謝
答案1
請檢查您是否執行了systemctl daemon-reload
更新systemd-information。
腳本輸出也表明:
use the '[email protected]' service to control your new instance
所以類似的東西應該要有效。systemctl restart [email protected]
您也可以檢查 /var/lib/systemd/... 的內容以取得產生的單元檔案。