How to clear /temp



You can use below mentioned commands

find /tmp -size +2M -mtime +2 -exec rm {} \; 
Removes all files greater than 2 MB size that was last modified before 48 hours
Remove Sess files
find . -type f -name "FILE-TO-FIND" -exec rm -f {} \;
find /tmp -type f -name "sess_*" -exec rm -f {} \;

use this along with mtime parameter only or this will never end

Socket and Port


Socket vs Port

In the context of computer networking, a socket is an end point of a bidirectional communication that occurs in a network that is based on the internet protocol. Sockets will distribute the data packets that are coming through the communication channel to the correct application. This is done using the information such as IP address and port number. In general a (software) port is a logical data connection that can be used to exchange data. On the internet TCP and UDP ports are used to exchange data between computers and these are the most widely used ports.

Basic cPanel Details



Ports
Webmail - 2095
whm - 2086
cPanel - 2082


grep domain.com /etc/userdomains
grep example.com /etc/userdomains

The primary domain of a user , is specified in the file  /etc/trueuserdomains

Packages -

user details
/var/cPanel/users/<username>

If the account is not a resold one then the owner will be either "root" or the one specified by the admin.

The packages are placed within the folder /var/cPanel/packages

/var/cPanel/features:

Disk space script fixes it normally: /scripts/fixquotas

exiqgrep & exigrep


exiqgrep & exigrep

exigrep searches the log, while exiqgrep is exim queue grep. See the table which has the link to the documentation as well.


    52.2 exiqgrep grep the queue
    52.3 exiqsumm summarize the queue
    52.4 exigrep grep search the main log


Exiqgrep Options & Usages

Options                 What is the option for            Usage

-i                         list the message IDs                    exiqgrep -i
-z                         show frozen messages                exiqgrep -z
-x                             show unfrozen messages            exiqgrep -x
-f                         match the sender address  exiqgrep -f beserk2@server1.beserk.com.au
-r                         match the recipient address     exiqgrep -r update_profile@westpac.com.au
-c                         count the matching results exiqgrep -c -r update_profile@westpac.com.au
-o                            older than a number of seconds   exiqgrep -o 43000
-y                        younger than a number of seconds / to get the latest emails exiqgrep -y 3600

Shell



The word Shell is an application / binary / program in Linux/ Unix machines.

Details
The main purpose of a shell (the program) is to act as an interface between the Operating System's Kernel and the user. Basically when you type ls command in the shell programs like /bin/bash, ksh, sh, csh or tcsh, shell or those programs are taking the keyboard inputs of `ls` and when  you type an ‘Enter’ it passes `ls` command to the shell. The shell tries to interpret those keystrokes as commands.

The shell applies its built-in rules to figure out that you want to run the executable command in the file /bin/ls. It makes a system call asking the kernel to start /bin/ls as a new child process and give it access to the screen and keyboard through the kernel. Then the shell goes to sleep, waiting for ls to finish.

When /bin/ls is done, it tells the kernel it's finished by issuing an exit system call. The kernel then wakes up the shell and tells it it can continue running. The shell issues another prompt and waits for another line of input.

It's called a shell because it wraps around and hides the operating system kernel.

Other usages of word shell in an Unix box
The /etc/shells file contains a list of login shells on the system. Applications use this file to determine whether a shell is valid

=======================================================

sarath@sage3:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
======================================================

For more details, check References

References
http://www.iitk.ac.in/LDP/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/running-programs.html
http://www.lancs.ac.uk/~tipper/writing/luui/html/unix-intro007.html




Exim Commands


1. To check the number of emails present in the queue:

# exim -bpc

2. To check the emails present in the queue with the mail id and sender ID:

# exim -bp
# exim -bp | less

3. To view the header of a particular email using mail ID:

# exim -MvH mail_id

4.  To view the body of a particular email using mail ID:

# exim -Mvb mail_id

5. To view a message's logs:

# exim -Mvl mail_id

How to create CSR for SSL Installation

SSL means Secure Sockets Layer. It is a technology that the communications between the user and the web server go through in a encrypted format. It helps to prevent hack attacks from outside. You see a padlock icon when you use a web page that is protected by SSL, that assures you that the page is secure.

Please note
For SSL installation the account require dedicated IP and a valid SSL Certificate


Steps to create CSR from WHM

1.Login to WHM

2.Select Generate a SSL Certificate & Signing Request under the SSL/TLS Tab in the left side of WHM

3.Provide the correct details.

4.Then click the Create bottom.  Now the private key, and CSR will send to the below mention email address (Contact Info)