LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-06-2011, 07:11 AM   #16
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

Hi,

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.

Kind regards,

Eric
 
Old 12-06-2011, 07:17 AM   #17
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
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.

Last edited by qwertyjjj; 12-06-2011 at 07:27 AM.
 
Old 12-06-2011, 07:23 AM   #18
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

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:
Code:
service squid start
Kind regards,

Eric
 
Old 12-06-2011, 07:31 AM   #19
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Is it ok to have the /var/log directory as 755?
That is the only way I can get squid to work as it needs to write to those directories.
/var/log/squid
 
Old 12-06-2011, 07:34 AM   #20
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

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.

Kind regards,

Eric
 
1 members found this post helpful.
Old 12-06-2011, 09:36 AM   #21
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

It's been two hours since your last message. Can I assume you've got it working? Or are there still things that fail?

Kind regards,

Eric
 
Old 12-06-2011, 09:40 AM   #22
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
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.
 
Old 12-06-2011, 09:51 AM   #23
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

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.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid Redirect specific domain to an Secondary (External) Squid Proxy Zxarr Linux - Server 2 04-20-2010 12:50 PM
Will updating to Ubuntu 7.10 create problems for Squid 2.6 jonette20 Ubuntu 2 02-05-2009 07:51 AM
problem in updating squid neelendhar Linux - Software 2 12-27-2007 10:40 PM
Updating VMWare After Updating CentOS Linux31 Red Hat 2 09-18-2007 02:49 PM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 02:29 PM


All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration