Linux – Find the process which occupies a specific port

Either one of the following commands could show you the process which is running a specific port

  • lsof -i :<port>
  • netstat -tulpn | grep :<port>

 

Here is an example on my Ubuntu server.

root@li266-91:~# netstat -tulpn | grep :80
tcp   0   0 0.0.0.0:80   0.0.0.0:*   LISTEN   31024/apache2

Apache is running on port 80.

Done =)

Reference: How do I determine which application is using port 8080?

PHP – PHP 5.3 Repository for CentOS from Webtatic.com

Webtatic.com provides its own repository. If you want to get the latest packages such as PHP and MySQL, you can consider adding it to your yum repo by the following steps.

1. Add the yum repository information

  • rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Continue reading

.htaccess – Invalid command ‘AuthUserFile’, perhaps misspelled or defined by a module not included in the server configuration

I have a previous post which demonstrates how to add HTTP Authentication by .htaccess.
.htaccess – Setting Password For Your Web Folder

But if it does not work and shown the following error in the Apache error log

  • /home/ykyuen/public_html/.htaccess: Invalid command ‘AuthUserFile’, perhaps misspelled or defined by a module not included in the server configuration

Continue reading

Perl – Missing SSL Libraries when installing Crypt::SSLeay

I want to subscribe the Amazon SES service in a Amazon EC2 server but the process is so complicated and i need to install numerous things oI want to subscribe the Amazon SES service in a Amazon EC2 server but the process is so complicated and i need to install numerous things only for verifying and email address.

One of the requirement is to install the Crypt::SSLeay Perl library. Continue reading