طبقه بندی موضوعی

CentOS 5 and Auto Starting Apache httpd and Samba

چهارشنبه, ۲۲ آذر ۱۳۹۱، ۱۱:۲۳ ق.ظ

Recently I installed lampp on a CentOS 5 development server. My personal computer is Windows 7 so I also installed Samba so that I can directly access the files by mapping the network drive. You don’t really care about all that though. Since I like to do things with as few steps as possible it really annoyed me that I had to start Apache and Samba every time I started the server. So I have it now setup to auto start both Apache and Samba. It was easy to do.

Setting Apache To Start on Boot

Step 1 – Check to make sure the httpd(Apache) is installed

[root#] chkconfig --list|grep http

This looks for the httpd service in the list of services running on your machine. If Apache is installed properly then you should see

[root#] 0:off  1:off  2:off 3:off 4:off 5:off 6:off

Step 2 – Set httpd to auto start

This is a pretty easy straight forward command that sets Apache to start on boot

[root#] chkconfig httpd on

Step 3 – Confirm the Apache is set to auto-start

Just to make sure that every took, lets check again to see that httpd is set to auto-start

[root#] chkconfig --list|grep http

and you should see something like:

[root#] 0:off  1:off  2:on 3:on 4:on 5:on 6:off

Setting Samba To Start on Boot

The steps for this are identical except you just need to change the service name:

[root#] chkconfig --list|grep smb
[root#] 0:off  1:off  2:off 3:off 4:off 5:off 6:off
[root#] chkconfig smb on
[root#] chkconfig --list|grep smb
[root#] 0:off  1:off  2:on 3:on 4:on 5:on 6:off

نظرات  (۰)

هیچ نظری هنوز ثبت نشده است

ارسال نظر

ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی