{"id":38,"date":"2017-03-21T15:22:00","date_gmt":"2017-03-21T14:22:00","guid":{"rendered":"http:\/\/exoconsult.com\/?p=38"},"modified":"2020-10-31T15:40:15","modified_gmt":"2020-10-31T14:40:15","slug":"demarrer-automatiquement-une-stack-bitnami-lors-du-boot-du-serveur","status":"publish","type":"post","link":"https:\/\/exoconsult.com\/fr\/serveur\/demarrer-automatiquement-une-stack-bitnami-lors-du-boot-du-serveur\/","title":{"rendered":"D\u00e9marrer automatiquement une stack Bitnami lors du boot du serveur"},"content":{"rendered":"<h4 id=\"debian-like-distributions-debian-ubuntu-\">Debian-like Distributions (Debian, Ubuntu, \u2026)<\/h4>\n<ul>\n<li>If the stack was installed as the <em>root<\/em> user, copy the <em>installdir\/ctlscript.sh<\/em> script to the <em>\/etc\/init.d<\/em> directory. It&rsquo;s advisable to rename this script to something more specific, such as <em>bitname-APPNAME<\/em>. Use the following command:\n<div class=\"bs-callout bs-callout-info\" data-alert=\"\">Note: Only use sudo if the stack was installed as root<\/div>\n<pre><code>sudo cp installdir\/ctlscript.sh \/etc\/init.d\/bitnami-APPNAME\n<\/code><\/pre>\n<p>If the stack was installed as a different user, create the script below at <em>\/etc\/init.d\/bitnami-APPNAME<\/em>, replacing USERNAME with the name of the user account that the stack was installed under:<\/p>\n<pre><code> #!\/bin\/bash\n su USERNAME -c \"installdir\/ctlscript.sh $@\"\n<\/code><\/pre>\n<p>Then, make the script executable:<\/p>\n<div class=\"bs-callout bs-callout-info\" data-alert=\"\">Note: Only use sudo if the stack was installed as root<\/div>\n<pre><code>sudo chmod +x \/etc\/init.d\/bitnami-APPNAME\n<\/code><\/pre>\n<\/li>\n<li>Add or modify the following lines at the beginning of the <em>\/etc\/init.d\/bitnami-APPNAME<\/em> script. Remember to update the <em>Provides<\/em> line to reflect the actual name of the script.\n<pre><code> ### BEGIN INIT INFO\n # Provides:          bitnami-APPNAME\n # Required-Start:    $remote_fs $syslog\n # Required-Stop:     $remote_fs $syslog\n # Default-Start:     2 3 4 5\n # Default-Stop:      0 1 6\n # Short-Description: Start daemon at boot time\n # Description:       Enable services provided by daemon.\n ### END INIT INFO\n<\/code><\/pre>\n<\/li>\n<li>Add the script to the default runlevels and enable it, following the example below:\n<div class=\"bs-callout bs-callout-info\" data-alert=\"\">Note: Only use sudo if the stack was installed as root<\/div>\n<pre><code>sudo update-rc.d -f bitnami-APPNAME defaults\nsudo update-rc.d -f bitnami-APPNAME enable\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>Reboot your system and the servers should start automatically.<\/p>\n<p>To revert the changes, use the commands below:<\/p>\n<div class=\"bs-callout bs-callout-info\" data-alert=\"\">Note: Only use sudo if the stack was installed as root<\/div>\n<p><code>cd \/etc\/init.d sudo update-rc.d -f bitnami-APPNAME remove<\/code><\/p>\n<p><code><br \/>\n<\/code><code>[box type=\"note\" align=\"\" class=\"\" width=\"\"]https:\/\/docs.bitnami.com\/installer\/faq\/linux-faq\/#how-to-start-the-stack-automatically-on-boot[\/box] <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian-like Distributions (Debian, Ubuntu, \u2026) If the stack was installed as the root user, copy the installdir\/ctlscript.sh script to the \/etc\/init.d directory. It&rsquo;s advisable to rename this script to something more specific, such as bitname-APPNAME. Use the following command: Note: Only use sudo if the stack was installed as root sudo cp installdir\/ctlscript.sh \/etc\/init.d\/bitnami-APPNAME If [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":24646,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"page_builder":"","wds_primary_category":0,"footnotes":""},"categories":[21,14],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bitnami","category-serveur"],"_links":{"self":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":3,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":24647,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/posts\/38\/revisions\/24647"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/media\/24646"}],"wp:attachment":[{"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exoconsult.com\/fr\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}