Category Archives: Linux

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?

Python – Install a Python2.5 on Ubuntu Lucid @ 2

Another way to install extra Python package is by source.

1. Install the build-essential and gcc.

  • sudo apt-get install build-essential gcc

 

2. Go to your target installation directory (usually i put them in /usr/local), download the source file.

Continue reading Python – Install a Python2.5 on Ubuntu Lucid @ 2

Python – Install a Python2.5 on Ubuntu Lucid @ 1

A few months ago i was working on a Drupal CDN setup using the Drupal CDN module and File Conveyor written by Wim Leers. But i have some problems when running the File Conveyor. At first, i thought it is because Python version. Ubuntu 10.04 (Lucid) comes with Python 2.6 but i wanna run the File Conveyor in 2.5. (*Finally i found that the switching the Python version would not resolve the problem.)

There are 2 ways to install additional Python package.
By apt-get Continue reading Python – Install a Python2.5 on Ubuntu Lucid @ 1

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

Continue reading PHP – PHP 5.3 Repository for CentOS from Webtatic.com