LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   install package on Centos 7 (https://www.linuxquestions.org/questions/linux-newbie-8/install-package-on-centos-7-a-4175536156/)

byran cheung 03-09-2015 01:55 AM

install package on Centos 7
 
I use Centos 7 and have just installed vsftpd to the server , I want to start vsftp service after install , when I tried the command "systemctl |grep vsftp" , it show nothing .

I use previous , all services keep at /etc/rc.d/init.d , what I need to do is /etc/rc.d/init.d/vsftpd start .

Please advise what I need to do for Centos 7 to start vsftpd ?

thanks

dijetlo 03-09-2015 02:15 AM

Code:

service vsftpd start
Though "restart" works too.
Should work if your're using systemV

If you're using systemD
to list all services registered
Code:

systemctl list-units --type service --all
assuming vsftpd is listed you need to check it it's enabled.
Code:

systemctl is-enabled vsftpd.service
assuming it's there and registered, to start it.
Code:

systemctl start vsftpd.service
Then check the status
Code:

systemctl status vsftpd.service
hope that helps.

byran cheung 03-09-2015 02:29 AM

thanks reply ,

I can restart it by "systemctl start vsftpd.service" , it works .

But I am wonder how do I know the service name is "vsftpd.service" ? as I can't find it by the command "systemctl list-units --type service --all" , when I use your string "systemctl list-units --type service --all" , it display nothing.

Thanks

dijetlo 03-09-2015 02:56 AM

Code:

man systemctl
No problem. I didn't know either until you asked, I don't support any systemD instances. I just thought it was an interesting question so I looked it up for you from the vendors "for pay only" web site.

Legal Disclaimer:
I didn't just cut and paste the answers, oh no, for that would be sin and a violation of all that is true and just (our contracts with the vendor, for example)
I committed them to memory and wrote them down after I left the site utilizing nothing but my newly developed (though apparently defective) skill set.
So Help Me God.

Doug G 03-09-2015 09:46 AM

Try "type=service" not "type service"


All times are GMT -5. The time now is 07:59 AM.