EZ Linux Admin random header image

Who command

February 4th, 2010 by EZ linux · No Comments

This command will show who is logged into your system.

who

→ No Comments Tags: Linux Commands


The remote server didn’t report a correct md5sum of the archive

January 27th, 2010 by EZ linux · No Comments

Cpanel transfer error, server to serve single account.

Here is the error when I try to do a single account cpanel server to server transfer:

Testing dwhs.net for xfer streaming support….Not Supported!
Packaging the account: (/scripts/pkgacct username “” –split compressed –mysql 5.0)…

pkgacct started.
pkgacct version 8.3 – user : username – archive version: 3 – running with uid 0
We will be splitting the archive!!
Copying Reseller Config…Done
Copying Suspension Info (if needed)…Done
Copying SSL Certificates, CSRS, and Keys…Done
Copying Domain Keys….Done
Copying Counter Data….Done

Copying Bandwidth Data…….example.com
Copying Dns Zones…….example.com
Copying Mail files….Done
Copying frontpage files….Done
Copying proftpd file….Done
Copying www logs………….
Done
Copy userdata…………
Copy custom virtualhost templates…………
Done
Copying mailman lists….Done
Copying mailman archives….Done
Copying homedir………….
……………
……………

Done
52.38 GB free, need 0 Bytes
Warning: file location not sent.. guessing.. this may not work ….
Using the single archive method (/home/cpmove-username.tar.gz)!
Copy Destination: /home
Transfer Error
The remote server didn’t report a correct md5sum of the archive. Please ensure you selected the correct type of remote server.

Removing Copied Archive on remote server…. Done

I’m still not 100% sure what caused this but I chose to not use compression for the transfer and disabled CSF on both servers and it went fine.

My guess is the firewall on the remote server but I will have to wait for the next transfer to check which one causes this.

→ No Comments Tags: Cpanel and WHM


Show All Running Processes in Linux

January 21st, 2010 by EZ linux · No Comments

To see every process type:

ps -A

To see every process except what’s running from root type:

ps -U root -u root -N

→ No Comments Tags: Cheat Sheets · Linux Commands · Linux Tricks


Flushing iptables

January 21st, 2010 by EZ linux · No Comments

iptables can block many different things and often it will block good servers inside of a network. The best to see if it’s a iptables issue. Try to clean them out with this if you have CSF on the server:

csf -f

If you still have a issue try to stop iptables like this:

service iptables stop

→ No Comments Tags: Linux Commands · Linux Security · Linux Tricks


What’s the difference between CAT 5e patch cable and CAT 5e crossover cable?

January 19th, 2010 by EZ linux · No Comments

[Q] What’s the difference between CAT 5e patch cable and CAT 5e crossover cable?

[A] The difference has to do with the wiring of the cable and the situation in which you will use the cable.

On a CAT 5e patch cable, the wiring configuration is identical on both ends of the cable.

On a CAT 5e crossover cable, the wiring of pins 1, 2, 3, and 6 are “crossed-over” to pins 3, 6, 1, and 2.

CAT 5e crossover cables are used in situations where two devices have the same interface, for example, connecting a hub to a hub, or a switch to a switch, or even when patching a hub or switch into a wallplate.

The most common use is to connect two PCs directly to each other, without the use of any kind of router, hub, or switch. This is called a peer-to-peer network, and is a low-cost solution to allow file and Internet sharing between two computers.

Cat5 cat6 and crossover example

→ No Comments Tags: Hardware


Change root or user password on a Linux server

January 18th, 2010 by EZ linux · No Comments

Simple when logged in with the user type:

passwd

Then enter the new password twice to save it.

To change the root password on a Linux server you have to be logged in as root.

→ No Comments Tags: Cheat Sheets · Linux Security


Cpanel WHM pages showing blank?

January 13th, 2010 by EZ linux · No Comments

Simply run /scripts/upcp –force

It’s a common bug that happens when a cPanel WHM update has an error.

→ No Comments Tags: Cpanel and WHM


How to reduce or free space in /usr partition

January 13th, 2010 by EZ linux · No Comments

1. Restart the httpd service. This might free a little space some times.

2. Check for apache logs like error_log, access_log , suexec_log in /usr/local/apache/logs . These can either be cleared off or if you need the logs then you can take a zipped copy and keep it aside.

3. Same can be done for the files in cPanel logs (/usr/local/cpanel/logs) as well .

4. Domlogs – Get into the /usr/local/apache/domlogs/ directory. Run the following command :-

# ls -al -SR | head -10 —> It will list 10 files in the decreasing order according to their size

If the domlog file is too large for a domain then it is possible that awstats is not running . Check whether cpanellogd is running on the server using pstree . If not, restart it .
Else, it is possible that awstats for only that particular domain is not updating. Get into the directory /usr/local/cpanel/base and check if any file as ‘awstats.domainname.com.conf’ exists. If yes , delete that file.

Now, run /scripts/runweblogs for that user. It will update the awstats and automatically clear the domlogs file thereafter. Do not delete the domlogs file itself.

5. Remove old and unwanted backups of ‘apache’ that might have been taken long ago. Also, check for any other duplicate folders that can be removed safely.

6. Remove core files, if any . Normally, some core files (like core.1234) might be present in /usr/local/cpanel/whostmgr/docroot . Check for these and remove them.

7. Restart your server, the quota might be off for that partition and reboot will correct it. Keep in mind if there is a harddrive error this can leave the server offline while the system or admin tuns a FSDK.

→ No Comments Tags: Cheat Sheets · Linux Tricks


Rebooting a linux server

December 29th, 2009 by EZ linux · No Comments

The best way is:

shutdown -r now

This will tell the server to take it’s time so to speak and reboot when it’s ready.

For a hard reboot simply put:

reboot

In most cases a hard reboot is fine unless you have file errors and the servers needs to clean them up before a reboot.

→ No Comments Tags: Linux Commands


Restart cpanel and web hosting manager WHM

December 29th, 2009 by EZ linux · No Comments

Both of these restart cpanel and Web Host Manager WHM services the exact same way

service cpanel restart

/etc/init.d/cpanel restart

→ No Comments Tags: Cpanel and WHM