Add systemd Startup Script For CouchDB
Currently, version 2.0 of CouchDB doesn’t come with any form of startup script. I’m sure that as the CouchDB 2 branch becomes more mature and it’s added to the various software repositories startup scripts will be shipped as standard, but until then we have to make do.
The below script is a systemd startup script with a cat command to create the file with the required content in the systemd config directories. Run the below script to create the startup file.cat <<EOT >> /etc/systemd/system/couchdb.service [Unit] Description=Couchdbservice After=network.target [Service] Type=simple User=couchdb ExecStart=/usr/bin/couchdb -o /dev/stdout -e /dev/stderr Restart=always EOT
You’ll then need to reload the systemd daemon and add the couchdb service to the startup routine. Run the below commands to enable CouchDB at machine startup.
systemctldaemon-reload systemctlstartcouchdb.service systemctlenablecouchdb.service
本文系统（linux）相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统