Starting NFS Server Automatically in Vector Linux
In my case the NFS server upon booting did not start automatically. I have to start it manually each time I booted up my server. To automatically start up NFS server service, you will need to edit the /etc/rc.d scripts.
On Vector Linux
Go to /etc/rc.d/rc4.d
root:# cd /etc/rc.d/rc4.d/
Create a script called S77nfsd (You can give it any name, but make sure the script name starts with Capital S, to indicate start of script. Script names that start with letter K means stopping or killing of service.)
The contents of my S77nfsd script are as follow:
root:# more S77nfsd
#!/bin/bash
cd /etc/rc.d
./rc.nfsd start
Save and quit, and remember to chmod to ugo+x
#chmod ugo+x S77nfsd
What we actually do is to place the script at runlevel 4 and the script will in this case start the NFS server service when the system reaches runlevel 4. Try to see if this works by rebooting the system.
In my case after I rebooted the system, NFS server service was started automatically. Do a ps -ef|grep nfs to check this.
Note:
In Vector Linux the sshd service is also not started by default when you booted up the system. You can also include a script which started the sshd service in the /etc/rc.d/rc4.d directory. You can call this script S99sshd and the contents of the script may look like the following:
#!/bin/bash
cd /etc/rc.d
./rc.sshd start
Again chmod ugo+x S99sshd so that the system can execute the script. That’s it. Try to reboot the system and when you have boot up, you can see that sshd service has started.
And please remember that in Vector Linux even though you started the SSH server service, you may at times unable to ssh to your Vector Linux SSH server. This is because of the firewall service. In my case I stop the firewall service to use ssh. Type:
#cd /etc/rc.d/
#./rc.firewall stop
Recent Comments