LinuxQuestions.org
Register a domain and help support LQ
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 04-30-2009, 04:36 AM   #1
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Rep: Reputation: 0
Facing problem for starting SQUID


Good Day !

I am new to Linux. Yesterday I have installed CentOS 5.3 on my machine.

I want to install Squid on same machine, but don't know how to install the same.

When I entered below commands I got an error "FAILED"

# chkconfig squid on
# /etc/init.d/squid start

I don't know what's the reason.

Basically I want to install SQUID for INTERNET Controlling.
All users have to go through SQUID and I have to define some policies for accessing the same.

If anybody help me in this regards, I will be grateful to you.

Thanks N Best Regards
 
Old 04-30-2009, 04:39 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Can you post more information about the errors? The error is usually regarding the cache. But it will be nice to post more information about it so that you can get the required help.
 
Old 04-30-2009, 05:22 AM   #3
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
Can you post more information about the errors? The error is usually regarding the cache. But it will be nice to post more information about it so that you can get the required help.
When I run below commands:

# chkconfig squid on
# /etc/init.d/squid start

An Error appeared "init_cache_dir /var/cache/squid....starting squid: [FAILED]

As I am new to Linux kindly help me in details, whether I did some mistake or some thing else ?

If possible for your kindly send me squid.conf file for my easy reference.

FYI my family is also belong to Nagpur and we were living in Jafar Nagar.
 
Old 04-30-2009, 05:22 AM   #4
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
When I run below commands:

# chkconfig squid on
# /etc/init.d/squid start

An Error appeared "init_cache_dir /var/cache/squid....starting squid: [FAILED]

As I am new to Linux kindly help me in details, whether I did some mistake or some thing else ?

If possible for your kindly send me squid.conf file for my easy reference.

FYI my family is also belong to Nagpur and we were living in Jafar Nagar.
 
Old 04-30-2009, 05:26 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
as root run
Code:
/usr/sbin/squid -z
to create te cache directories
then
Code:
/etc/init.d/squid start
 
Old 04-30-2009, 05:37 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally Posted by akghauri View Post
When I run below commands:

# chkconfig squid on
# /etc/init.d/squid start

An Error appeared "init_cache_dir /var/cache/squid....starting squid: [FAILED]

As I am new to Linux kindly help me in details, whether I did some mistake or some thing else ?

If possible for your kindly send me squid.conf file for my easy reference.

FYI my family is also belong to Nagpur and we were living in Jafar Nagar.
This can be a common error faced with squid if the cache is not initialized.

squid -z should do it for you and then you can start the squid.
If this command does not work (if you do not have /usr/sbin) in $PATH then you can do it as advised in the previous post.
PS: good to meet someone from nagpur here at LQ.
 
Old 04-30-2009, 07:04 AM   #7
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
This can be a common error faced with squid if the cache is not initialized.

squid -z should do it for you and then you can start the squid.
If this command does not work (if you do not have /usr/sbin) in $PATH then you can do it as advised in the previous post.
PS: good to meet someone from nagpur here at LQ.
Can you help me how to create ACL ?
As already mentioned above that I am new in Linux and wants to deploy the same for Internet Access.

Right now I used default squid.conf now I want to create our own ACL.
How I can create the same ?
If you can send me squid.conf so I can use for my user here.

Regards
 
Old 04-30-2009, 07:09 AM   #8
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
as root run
Code:
/usr/sbin/squid -z
to create te cache directories
then
Code:
/etc/init.d/squid start
Thanks for your guidance.
Now help me How to create ACL as per our policy.
 
Old 04-30-2009, 07:14 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
Thanks for your guidance.
Now help me How to create ACL as per our policy.
Hi,

I would suggest to create a new thread for this problem, so people can help you better to find a solution.
 
Old 05-02-2009, 02:31 AM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
I would suggest you search a little on LQ. There are a lot of threads that have taken this subject.
 
Old 05-02-2009, 03:22 AM   #11
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
I would suggest you search a little on LQ. There are a lot of threads that have taken this subject.
I have created below data on squid.conf
Kindly advise me did I make some sort of mistake here ?


http_port 8080
cache_mem 300 MB
cache_dir ufs /var/cache/squid 2000 16 256
visible_hostname xys.com
cache_mgr Ashfaque

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

#acl vip src 192.168.100.100-192.168.100.114/32
#acl vip src 192.168.100.161/32
#acl vip src 192.168.100.181/32
#http_access allow vip

acl block_extns urlpath_regex -i "/etc/squid/block_extns.txt"
http_access deny block_extns

acl entmnt url_regex -i "/etc/squid/entwebsites.txt"
http_access deny entmnt

acl mynet src 192.168.2.0/24
http_access allow mynet
 
Old 05-02-2009, 04:55 AM   #12
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Everything seems to be fine. You could have put it this way here but it is better to keep all the acls at one place and http_access options together at one so that you can make changes and will help you out while maintaining it later.
 
Old 05-02-2009, 05:40 AM   #13
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
Everything seems to be fine. You could have put it this way here but it is better to keep all the acls at one place and http_access options together at one so that you can make changes and will help you out while maintaining it later.
When I try to restart squid I got an error [FAILED].
There is something wrong which I did ?
 
Old 05-02-2009, 05:41 AM   #14
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
When I try to restart squid I got an error [FAILED].
Please give the exact error.
From the console or from the logfiles
 
Old 05-02-2009, 06:26 AM   #15
akghauri
LQ Newbie
 
Registered: Apr 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Please give the exact error.
From the console or from the logfiles
Below are the errors when I restart squid which I copied from log file :

Quote

2009/05/02 15:09:45| Creating Swap Directories
FATAL: Failed to make swap directory /var/cache/squid/00: (13) Permission denied
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
CPU Usage: 0.001 seconds = 0.000 user + 0.001 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
2009/05/02 15:09:45| parseConfigFile: line 7 unrecognized: 'httpd_accel_host virtual'
2009/05/02 15:09:45| parseConfigFile: line 8 unrecognized: 'httpd_accel_port 80'
2009/05/02 15:09:45| parseConfigFile: line 9 unrecognized: 'httpd_accel_with_proxy on'
2009/05/02 15:09:45| parseConfigFile: line 10 unrecognized: 'httpd_accel_uses_host_header on'
2009/05/02 15:11:57| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 3: http_reply_access allow all
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
2009/05/02 15:11:57| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 3: http_reply_access allow all
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
2009/05/02 15:14:13| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 3: http_reply_access allow all
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
2009/05/02 15:14:13| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 3: http_reply_access allow all
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
2009/05/02 16:24:41| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 3: http_reply_access allow all
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
2009/05/02 16:24:41| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 3: http_reply_access allow all
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
 
  


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 service starting problem katariya.subhash Linux - Newbie 3 07-02-2010 02:59 AM
facing problem in wireshark rajavel Linux - Newbie 9 03-18-2009 04:37 AM
Facing speed problem! me99 Linux - Networking 6 12-10-2008 10:09 AM
Problem with starting squid Dedah Linux - Networking 11 03-08-2006 05:15 AM
Squid starting problem?? deepika Linux - Networking 4 10-10-2003 12:13 PM


All times are GMT -5. The time now is 09:57 PM.

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