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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
If I recall correctly Squid doesn't create an init file. Did you back that up? If not then here's one you could use. Check first if one exists and if it does check the variables against where your binary and configuration files are.
That seems to work but the service command still doesn't recognise squid.
ALso, I have a new problem now:
[root@264219 squid]# nano /etc/rc.d/init.d/squid
[root@264219 squid]# nano /etc/init.d/squid
[root@264219 squid]# chmod 700 /etc/rc.d/init.d/squid
[root@264219 squid]# chkconfig --add squid
[root@264219 squid]# chkconfig --level 345 squid on
[root@264219 squid]# service start squid
start: unrecognized service
[root@264219 squid]# /etc/rc.d/init.d/squid start
Starting squid: init_cache_dir /cache... squid
[root@264219 squid]# 2011/12/06 08:17:26| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2011/12/06 08:17:26| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2011/12/06 08:17:26| WARNING: For now we will assume you meant to write /32 WARNING: Cannot write log file: /var/log/squid/cache.log
/var/log/squid/cache.log: No such file or directory
messages will be sent to 'stderr'.
Edit: I solved the above by changing the log dir to 777.
I did updatedb but now service squid start just hangs, it does not show the [OK] sign.
Does the directory /var/log/squid exist? If not create it and set the permissions to the squid user. You might have to create the log files themselves too. About the other warnings, you'll have to consult the release notes to see what you need to change in your configuration file in order to solve them. To start the service you need to run:
All my subdirectories under /var/log have 755 as permission and ownership to root. If it will make you feel more secure you can always set the ownership to your squid user and limit the access a bit more.
I got it working now. Thanks.
I had to update /var/log to 777 , not sure if that's secure but that's the onyl way it will update the cache.log files.
Changing ownership to squid:squid doesn't seem to work as the error says the parent directory needs to be changed.
Anyway, thanks for help.
Thanks for marking the thread as solved. Glad you've got it working. The log problem however is something that concerns me, it should work with the normal permissions instead of 777 which is pretty insecure. I don't have access to a Squid server now since I'm on vacation but as soon as I get back I'll look into it and let you know.