cPanel: How to export SSL from cPanel

With cPanel control panel, they do not provide any tool to export the SSL certificate. To done this, you may easily get the SSL export with Linux command through SSH.

To get this done, you may access to SSH through Terminal to Putty.
1. First of all, you need to ensure that you have the root access. Otherwise, contact the server administrator.
2. Log into the SSH.
3. Run the following command and replace the domain_name with your domain name such as mickgenie.com,

# openssl pkcs12 -export -out /backup/domain_name.pfx -inkey /etc/ssl/private/domain_name.key -in /etc/ssl/certs/domain_name.crt

Understand and Create GodMode in Windows 7

Windows release all in one tool named Godmode which supported with most of the Windows NT to allow server administrator to manage the Windows box easily.

To do this, simply create a new folder and name it “GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}” (without double quote).

Now, you can access this option directly from GodMode created.

Calculate Folder size with ASP.Net

It is very important for a server space to be available time by time instead of always getting disk critical error from a server.

However, it is not possible for a server administrator to always log into the server to check the available space or used space for a folder.

Instead of using the server script to send an email to the administrator, user could use the ASP.Net script to show the used space.

VB Script:

Imports System
Imports System.Linq
Imports System.IO

Module Module1

Sub Main()
   Dim dInfo As New DirectoryInfo("C:/Articles")
   ' set bool parameter to false if you
   ' do not want to include subdirectories.
   Dim sizeOfDir As Long = DirectorySize(dInfo, True)

   Console.WriteLine("Directory size in MB : " & _
    "{0:N2} MB", (CDbl(sizeOfDir)) / (1024 * 1024))

   Console.ReadLine()
End Sub

Private Function DirectorySize(ByVal dInfo As DirectoryInfo, _
   ByVal includeSubDir As Boolean) As Long
   ' Enumerate all the files
   Dim totalSize As Long = dInfo.EnumerateFiles() _
     .Sum(Function(file) file.Length)

   ' If Subdirectories are to be included
   If includeSubDir Then
     ' Enumerate all sub-directories
     totalSize += dInfo.EnumerateDirectories() _
      .Sum(Function(dir) DirectorySize(dir, True))
   End If
   Return totalSize
End Function

End Module

Rename a User’s username in SmarterMail 5.5

By right, you are not able to change the email username from the administrator tool of the Smartermail.

However nothing is impossible from the computer as you may actually change the username through the configuration file.

To change a user’s username from SmarterMail, you may actually change the folder name of the user and configuration file of the SmarterMail to make the username change. To get this done, you MUST be the server administrator that could access to the server back-end.

1. Stop the SmarterMail services.
2. Go to the SmarterMail email folder and usually the default setting will be C:\SmarterMail\Domains\ where domain.com is your domain name.
3. Backup the file accountList.xml.
4. Edit the file accountList.xml, change the username to the new username that you want and save it.
5. Go the email user folder and usually the default folder is C:\SmarterMail\Domains\<domain.com>\<users> where the domain.com is your domain name and users is your username.
6. Change the username folder to your new username.
7. Go into the user folder, backup the file userConfig.xml.
8. Edit the file userConfig.xml and look for the userName tag. (<userName>User</userName>) Save it.
9. Start the SmarterMail services.
10. Done.

Ten Linux Command that you should know

If you are the Linux server administrator, you should know some major command from Linux.

Today, Mick Genie will show you some command that normally used by the Administrator.

1. wget – Retrieving a Software Package.
– wget is the most command use command to retrieve or get a software package or download tool from Linux Command, you can easily get the package downloaded through wget command.

Eg. wget http://www.mickgenie.com/mickgenie.tar.gz

2. top – Monitoring Server Processes.
– With a top command, you could easily understand the server processes and it’s performance as it collected almost all of the information from the server processes.

3. tail – Reviewing Log File.
– When you checking the server log, you might want to get the real-time log information instead of open all of the file as sometimes it is large enough to and waste your memory and time to open the file. Using tail command could allow you check real-time log information.

Eg. tail -f /var/log/messages

Continue reading Ten Linux Command that you should know

Remote Desktop Connection Manager (RDCMan)

RDCMan manager (Remote Desktop Connection Manager) could manage multiple remote desktop connection. It is useful when if you are the server administrator that manage multiple server or labs. It is not a new technology but it is use to group your remote desktop connection to one application and allow you to manage them with some advance setting.

You may download it at here .

Then open the application and add the remote desktop connection.

You may get the thumbnail view as below as well.

Double click on the title and you may enlarge the screen.

exclude folder from cPanel backup

Many of the cPanel user do not know that their server administrator could exclude any of their folder from the cPanel cpbackup process and those folder could be exclude from backup to safe the disk space usage.

Or you could exclude any of your dynamic file(possible that you host some dump services such as RapidLeech) and you do not want to backup them.

You may actually exclude them easily from include the path to cpbackup-exclude.conf file.

Step:
1. Edit the file cpbackup-exclude.conf  from your /home/user folder.
2. Add the folder that wish to exclude from backup from cpbackup-exclude.conf  file.
3. You have done it.

How to Check Apache Connections

Apache is one of the famous web services and surpass for more than 100 Million website.

If you have experience in Server Administrator task, you surely headache on the Apache connections when it is getting tons of connections to the server. But, how could you going to check for those connections?

Some command like netstats, grep, ps, etc will very helpful to help you to understand the number of connections of the server.

Mick Genie will guide you some ways to list the Apache connection as below.

Grep port 80 (web services port)

netstat -alntp | grep :80

Check the number of connection from port 80

netstat -alntp | grep :80 | wc -l
ps auxw | grep httpd | wc -l

List the remote IPs connecting to your server on port 80

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr

List the unique remote IPs and the number of connections from each IP

netstat -alntp | grep :80 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n