<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CentOS 8 Stream &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-tags/centos-8-stream/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.hostry.com</link>
	<description>Full information on how to use HOSTRY, provided by 24/7 community based support</description>
	<lastBuildDate>Thu, 07 Apr 2022 10:33:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.13</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>CentOS 8 Stream &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to use rc.local on server with CentOS 8 Stream</title>
		<link>https://help.hostry.com/knowledge-base/how-to-use-rc-local-on-server-with-centos-8-stream/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-use-rc-local-on-server-with-centos-8-stream/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 07 Apr 2022 10:33:47 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=4823</guid>

					<description><![CDATA[First you need to understand the term &#8220;rc&#8221;. Its original meaning is &#8220;run commands&#8221;. This is mainly used to run commands on system boot &#8220;rc.local&#8221; is a script that contains commands to be run on system boot. As far as Linux distributions are concerned, you may well need to test [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>First you need to understand the term <strong>&#8220;rc&#8221;</strong>. Its original meaning is <strong>&#8220;run commands&#8221;.</strong> This is mainly used to run commands on system boot &#8220;rc.local&#8221; is a script that contains commands to be run on system boot. </p>



<p>As far as Linux distributions are concerned, you may well need to test the systems before launching them. To do this, it is worth taking into account the important<strong> <em>rc.local</em></strong> file in order to put the appropriate and necessary commands there. This is necessary in order to make it possible to execute them at system startup.</p>



<h2 id="how-to-use-rc-local-on-centos-8" >How to use RC.local on CentOS 8</h2>



<p>Update your system</p>



<pre class="wp-block-code"><code>yum update</code></pre>



<p>Initially, you should check the status of the &#8220;rc-local&#8221; service. To do this, enter the following special command:</p>



<pre class="wp-block-code"><code>systemctl status rc-local</code></pre>



<p>The answer will be unequivocal: the service is inactive. The next step is to create the rc-local file inside systemd. You can do it like this:</p>



<pre class="wp-block-code"><code>nano /etc/systemd/system/rc-local.service</code></pre>



<p>Then you need to just copy and paste the following content inside it by <strong>CTRL+S</strong> and <strong>CTRL+X</strong></p>



<pre class="wp-block-code"><code>&#91;Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

&#91;Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

&#91;Install]
WantedBy=multi-user.target</code></pre>



<p>Then, after the successful actions taken earlier, you need to make the file executable. This means that the commands will be executed. Follow the instructions below:<br></p>



<pre class="wp-block-code"><code>chmod +x /etc/rc.local</code></pre>



<p>Enable and start the <strong>rc-local </strong>service using the commands below.</p>



<pre class="wp-block-code"><code>systemctl enable rc-local</code></pre>



<p>Then you need to start the service and also get the status with the following command:</p>



<pre class="wp-block-code"><code>systemctl start rc-local
systemctl status rc-local</code></pre>



<p>Once you have successfully started the service, you can then access the <strong>&#8220;/etc/rc.local&#8221;</strong> file with a text editor. We used the nano editor for this. Use the following command:</p>



<pre class="wp-block-code"><code>nano /etc/rc.local</code></pre>



<p>The file is now in open format, and you can then enter commands at the end of the file. All these commands will be executed when the server starts. We have created a directory and a text file inside that directory, as seen in the image above. After that, it is recommended to restart the rc.local service as follows.</p>



<pre class="wp-block-code"><code>systemctl restart rc-local</code></pre>



<p>After rebooting the system, you will see that the required directory and file will be created in the specified location.</p>



<pre class="wp-block-code"><code>chmod +x /etc/rc.d/rc.local</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-use-rc-local-on-server-with-centos-8-stream/feed/</wfw:commentRss>
			<slash:comments>415</slash:comments>
		
		
			</item>
	</channel>
</rss>
