Debian에서 여러 인스턴스에 대한 init.d Apache 서비스 만들기

Debian에서 여러 인스턴스에 대한 init.d Apache 서비스 만들기

데비안에 두 번째 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가 작동하지 않도록 중지하여 두 번째 인스턴스를 생성하는 스크립트가 스크립트를 배치할 수 있도록 하는 방법은 무엇입니까?

문서를 살펴본 결과 /use/share/doc/Apache2/examples에도 보조-init-script 스크립트가 있다는 것을 발견했습니다. 하지만 이것이 어떻게 작동하는지 이해가 되지 않습니다(참조https://alioth-lists-archive.debian.net/pipermail/pkg-apache-commits/2010-February/000296.html

감사해요

답변1

systemctl daemon-reloadsystemd-information 업데이트를 실행했는지 확인하세요 .

스크립트 출력은 또한 다음을 알려줍니다.

use the '[email protected]' service to control your new instance

그래서 뭔가가 작동해야합니다.systemctl restart [email protected]

생성된 단위 파일에 대해 /var/lib/systemd/...의 내용을 확인할 수도 있습니다.

관련 정보