firstly,we should know one point! the process and the port is one by one,so once we kill the process ,the port will be close!
netstat -anp | grep xxx //xxx:what is about the number of the port
and the results have the pid,name of the process ,and we could use the "kill pid"to kill the procee ,and the port will be closed right now!