Wednesday, August 17, 2016

Linux Aha's

How to find processes running on a certain port... and kill them

Get the processes for port 5000

lsof -t -i:5000

or netstat -nlp | grep :5000

Now find where the process is running from...

 ls -l /proc/[pid]/exe

Kill processes running on port 5000


kill 'lsof -t -i:5000'

How to add trusted root certificated to the server

  1. Install the ca-certificates package:
    yum install ca-certificates
  2. Enable the dynamic CA configuration feature:
    update-ca-trust force-enable
  3. Add it as a new file to /etc/pki/ca-trust/source/anchors/:
    cp foo.crt /etc/pki/ca-trust/source/anchors/
  4. Use command:
    update-ca-trust extract
More here...

No comments:

Post a Comment