Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I'm running Fedora Core 1. Found out that ftp server was not installed, so I downloaded proftpd, configured, made, installed. Started it, runs great. But it won't start when the box boots.
I tried this:
[root@linux proftpd-1.2.10rc1]# chkconfig --level 345 proftpd on
and got this:
error reading information on service proftpd: No such file or directory
It's installed to /usr/local/proftpd-1.2.10rc1. Again, I can manually start/stop the service, but can't get it to start automatically. Ideas?
Does an init script for proftpd exist in the /etc/rc.d/init.d directory. All chkconfig is going to do is symlink to that file from the startup directory, so if it can't find it, it's probably going to be confused. Try typing chkconfig --list and see what services chkconfig recognizes -- there should be correspondence between these and what's in /etc/rc.d/init.d. You might also want to run proftpd out of xinetd. Go to /etc/xinetd.d and look at example xinetd files. Then copy one and modify it to start proftpd and restart xinetd. Then xinetd will start up proftpd when it starts, and xinetd should be starting on boot.
There is no script in /etc/rc.d/init.d for proftpd. I have not found one at proftpd.org, but I did find this one at radom.org--do you think it would work?
Code:
#!/bin/sh
# dan@radom.org
#
case "$1" in
start)
echo "starting proftpd..."
/usr/local/sbin/proftpd -c /etc/proftpd.conf
;;
stop)
echo "stopping proftpd..."
for pid in `cat /var/run/proftpd.pid`
do kill -9 $pid
done
rm /var/run/proftpd.pid
;;
restart)
echo "restarting proftod..."
for pid in `cat /var/run/proftpd.pid`
do kill -9 $pid
done
/usr/local/sbin/proftpd -c /etc/proftpd.conf
;;
*)
echo "*** Usage: proftpd {start | stop | restart}"
exit 1
esac
proftpd is at /usr/local/sbin/proftpd, so that is OK, but the conf file is not at /etc/proftpd.conf, it is at /usr/local/etc/proftpd.conf, so I would have to change that part. (I assume it is there because before make I went ./configure --prefix=/usr/local. N00bs prolly should stick to packages. )
What would be the advantage to running it under xinetd? Is there some performance boost? This is not a production server, so neither security nor performance are really an issue, but it would still be good to know for the future (when it might be an issue!_)
Zaichik, based on a quick read, it looks like that init script will work fine as long as you change the location of the configuration file.
There is a slight advantage to running servers out of inetd/xinetd if they are not going to be accessed very much. Whenever you start a daemon it runs as a process on your system. If it's not serving requests, the daemon is just sitting around taking up (a very small amount of) memory. If you run it through xinetd, xinetd will listen on the service's port and kick off the daemon only when there's a request to be handled.
The savings aren't really all that noticeable any more given how fast/powerful modern hardware is. If the daemon is going to be processing a lot of requests, though, it's probably best to let it run as its own process so xinetd doesn't have to fire it up each time.
OK, I copied and pasted the script to init.d, and then:
Code:
[root@linux init.d]# chkconfig --level 2345 proftpd on
service proftpd does not support chkconfig
So now what? You said that all that chkconfig does is symlink the startup script to the startup directory--can I do that manually and achieve the same effect?
It looks like maybe the symlink is created in /etc/rc.d/rc#.d directory, where # maybe corresponds to the runlevel? It also looks as though the symlink is named in such a way as to control the order in which the services are started. For example, the link to httpd is named S85httpd.
If my hunch is correct, what would be a proper name for the proftpd link? I would be safe if I started it after httpd, since all necessary services would already be running, correct?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.