LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   squid: unrecognized service (https://www.linuxquestions.org/questions/linux-newbie-8/squid-unrecognized-service-936703/)

philbong_borces 03-27-2012 10:17 AM

squid: unrecognized service
 
Hi,I entered into the command ... service squid restart and i got this error.

squid: unrecognized service

What could be missing in my configuration?


Thanks

philbongz

TB0ne 03-27-2012 10:38 AM

Quote:

Originally Posted by philbong_borces (Post 4637747)
Hi,I entered into the command ... service squid restart and i got this error.

squid: unrecognized service

What could be missing in my configuration?

How about "squid"? Did you actually INSTALL it, before you tried to start it?? Also, it would help if you told us what version/distro of Linux you're using.

philbong_borces 03-27-2012 11:15 AM

Hello TB0ne,
I am having CentOS release 5.8 (Final). I just recently updated it from 5.0 version.

I did already the installation using yum install squid. or to be exact on what i did. I followed the link below...

http://basicnetworkingconcepts.blogs...centos-55.html

One thing i noticed is that there is no folder for /etc/squid/squid.conf

I tried this command also just to find out if i can edit it but no to avail.
-vi /etc/squid/squid.conf and it says .... [NEW DIRECTORY] .... and gives me an error attention :

My guess is the installation never really was successfull.

E325 : ATTENTION
Found a swap file by the name " var/tmp/squid.conf.swp" and so on and so forth...


thank you very much

philbongz

philbong_borces 03-27-2012 11:47 AM

Also, the information below might help... I remove squid now and got the result. Take not text in Red....

[root@PHILBONGLinuz /]# yum remove squid
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package squid.i386 7:2.6.STABLE21-6.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
squid i386 7:2.6.STABLE21-6.el5 installed 3.5 M

Transaction Summary
================================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
error reading information on service squid: No such file or directory
Error in PREUN scriptlet in rpm package s[/B]
[/COLOR]

Removed:
squid.i386 7:2.6.STABLE21-6.el5

Complete!

TB0ne 03-27-2012 11:59 AM

It would seem like the package wasn't completely installed. Try "yum reinstall squid" (read the man page on the yum command http://linux.die.net/man/8/yum). Be sure you run those commands as root or through sudo.

philbong_borces 03-27-2012 12:29 PM

Hello TB0ne, i never knew that there is a "reinstall" command in YUM and i'm reading the man page of it now. I did it and it was successfull. As the next thing to do to verify and to start the service i got another error below. or maybe not..

service squid start
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 62: 3356 Aborted
$SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
Starting squid: /etc/init.d/squid: line 42: 3357 Aborted $SQUID
$SQUID_OPTS >> /var/log/squid/squid.out 2>&1
[FAILED]


I am a newbie to linux and i appreciated your help very much....


philbongz

TB0ne 03-27-2012 12:45 PM

Quote:

Originally Posted by philbong_borces (Post 4637876)
Hello TB0ne, i never knew that there is a "reinstall" command in YUM and i'm reading the man page of it now.

If you're new in Linux, I'd suggest that be the first thing to check if you need help. Just typing in "man <whatever command name>" will give you a good bit of help, and sometimes even point you to similar commands.
Quote:

I did it and it was successfull. As the next thing to do to verify and to start the service i got another error below. or maybe not..

service squid start
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 62: 3356 Aborted
$SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
Starting squid: /etc/init.d/squid: line 42: 3357 Aborted $SQUID
$SQUID_OPTS >> /var/log/squid/squid.out 2>&1
[FAILED]
Most startup scripts are in /etc/init.d, and can be invoked manually. Try (as root), "/etc/init.d/squid status" (or "start", "stop", etc. Type it with no options, and it'll give you a list.) That will give you command-line feedback on things, and let you know if the service is running. Looks like it didn't start, though. Have you initialized the squid cache dir? Check some documentation on basic squid setup...there are things you have to do, before you can start it:
http://www.squid-cache.org/

..but the error above should give you clues. Does the cache dir exist (listed as /var/spool/squid)? How about that log file?? If they don't exist, create them.

philbong_borces 03-27-2012 01:23 PM

Ok, i will do as advice. Will get back to you soon when i encounter errors that i cannot figure out myself along the way.

Have a great day..


philbongz


All times are GMT -5. The time now is 03:30 PM.