LinuxQuestions.org
Help answer threads with 0 replies.
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 11-03-2014, 09:50 AM   #1
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Rep: Reputation: Disabled
Relate service to a package..Centos Linux.


Hi,

I am using following command to get a list of services on Centos:-

service --status-all

Now, for the list of services installed, I want to know the corresponding package for the service on Centos i.e. if MySQL service is running, I want to know the package name for corresponding service?

Can this be achieved via shell script?

Please confirm if possible.

Thanks.
 
Old 11-03-2014, 10:53 AM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 8,253
Blog Entries: 11

Rep: Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289
https://www.linuxquestions.org/quest...ce-4175524086/
 
Old 11-03-2014, 04:29 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,633

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
@vipinsqa,

.. if you know a file name for the "service",
please use 'rpm -qf' to get the package name.

Example : "/etc/rc.d/init.d/mysqld" → →
→ $ rpm -qf /etc/rc.d/init.d/mysqld

-
 
Old 11-03-2014, 08:50 PM   #4
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hi,

Thanks for the revert. Actually, I am using "service --status-all" command to get the list of all services. Is there a way I can get the file name of service along with this command or any other way to get the list of services and the corresponding file names on Centos. Kindly confirm.

Regards.
 
  


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
package or service help me moritor file on directadmin xquatavn Linux - Security 1 07-23-2012 04:42 AM
How to install package without starting service in Debian? raindog308 Linux - Software 2 06-22-2012 10:40 PM
Linux Centos 5 : Error during Package Updater [ SOLVED ] LinuxNewbie81 Linux - Software 1 10-21-2010 02:07 AM
Service named start problem CentOS linux linux_newb Linux - General 9 09-02-2009 03:21 PM
Can we rpm a Susu Linux package in Centos? redhatwannabe Linux - Newbie 1 05-04-2009 11:20 PM


All times are GMT -5. The time now is 11:15 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