Skip to main content


Showing posts from September, 2011

Useful commands for email service running on CentOS

service command - list running services
service --status-all
List service and their open ports
netstat -tulpn

For example:

service dovecot is using port: 110 and 143

service exim is using port: 25

SMTP is specified for outgoing mail transport and uses TCP port 25

port 110: the port used for receiving email

Port 143: using imap protocol to retrieve eMail

Install Oracle Java to Centos

In my case, I only want Sun Java to be the only java installation. So I uninstall the open jdk first.

then download java rpm package from oracle and install it using rpm -ivh

then by running
rpm -qlv java
we can get the location of the java being installed to:
Run the alternatives program to tell the system about the existence of your new installation:

# alternatives --install /usr/bin/javajava /usr/java/jdk1.7.0_01/bin/java 1

1 is for the priority.
Run the alternatives program again, to chose the new installation

# alternatives --config java
Verify that you are getting the right version of Java

$ java -version

Switching Run Levels in CentOS

To change the runlevel of the server upon boot up edit the /etc/inittab
sudo vi /etc/inittab

Around line 18 you will see a line as shown below.


You simply change the "5" in this case to the runlevel you desire. (In my case 3) Save the file and exit.

Posted by Steve.Lippert   at 1:05 PM
Labels: CentOS, Linux