EZ Linux Admin random header image

MySQL vs MariaDB

November 16th, 2016 by EZ linux · No Comments

Is upgrading transparent?

I’d say that it would be transparent for many, perhaps most. However, on one particular server that I manage for a client, the client had a ton of old Joomla 1.0, 1.5 and 2.5 sites. For whatever reason, after conversion to MariaDB, I had issues with some of the old Joomla sites.

1. On a couple of sites, the Docman stuff in the old Joomla quit working (could not upload documents).

This was because /usr/my.cnf on a MariaDB server has by default:


And I couldn’t use the STRICT_TRANS_TABLES directive and support those ancient sites. I had to change sql_mode to:


NOTE: I do not recommend that anybody do that. Obviously the strict_trans_tables directive in place for a reason. But it caused troubles for those sites that I Xpress Transferred from a cPanel server running MySQL 5.6 to a cPanel server running Maria DB 10.00 until I modified the sql_mode.

2. On quite a few of the Joomla sites, apostrophes were and some other normal characters were replaced with strange characters

I’m running CL on all servers. This turned out to be an issue with these particular old flaky Joomla sites having been Xpress transferred from a CL/cPanel/MySQL 5.6 box to a CL/cPanel/MariaDB 10 box as well.

In this case though, for the specific sites, I had to disable the mysql mysqli, and pdo_mysql modules in PHP Selector and enable the nd_mysql, nd_mysqli and nd_pdo_mysql modules.

NOTE: This only happened on a bunch of ancient Joomla sites, all belonging to the same customer.

Aside from those things listed above, I have never had any issue with new accounts being added to MariaDB 10.0 server, or with migrating hundreds of other accounts (using Xpress Transfer) from a MySQL server to a MariaDB 10.0 server. I had done account transfers from CL/cPanel/MySQL 5.6 servers to CL/cPanel/MariaDB 10.0 servers many times before I transferred those particular Joomla sites, and I have transferred countless accounts from CL/cPanel/MySQL 5.6 servers to CL/cPanel/MariaDB 10.0 servers since I transferred those Joomla sites. I’ve never encountered a single issue aside from transferring those ancient Joomla sites with Docman and a bunch of other components on them.

MariaDB is supposed to be a drop-in replacement. But you can’t ever expect that switching 100s of customers will result in zero problems and 100% satisfaction every time.

And the good news is that even on those Joomla sites that weren’t working until I made changes, the main parts of all of the sites actually worked — some sites just displayed weird characters instead of apostrophes, and on other sites the client wasn’t able to upload documents using Docman. So it’s not like I had a server full of screaming customers. I had time to figure it out.

→ No Comments Tags: Cpanel and WHM · Linux News · Linux Software / Scripts

How to change a hostname command in Centos

December 28th, 2015 by EZ linux · No Comments

Centos 6 and above now has an easy to use command to change the hostname of your server.

Simple type:

hostname (newhostnamehere)

Replace (newhostnamehere) with what you want the hostname to be.

It’s nice when things are actually simple, good job job guys.

→ No Comments Tags: Linux Commands · Networking

Root password force change in Linux

November 23rd, 2015 by EZ linux · No Comments

Some people call this rooting a server. Basically if you lost your root password and need to get int this is your only option. You will need to be in front for the server or with a KVN plugged in.

Make sure to follow each step exactly:

Reboot your computer / Turn your computer on.
Hold down the Shift key at the start of the boot process to enable the GNU GRUB boot menu (if it does not show)
Press ESC at the GNU GRUB prompt.
Press e for edit.
Use the Arrow keys to highlight the line that begins with kernel and press the e key.
Go to the very end of the line and add rw init=/bin/bash
Press Enter and then press b to boot your system.
Your system will boot up to a passwordless root shell.
Type in passwd yourusername
Set your new password.
Restart your system.

→ No Comments Tags: Linux Operating Systems · Linux Security · Linux Tricks

Bulk fix WordPress permissions

November 21st, 2015 by EZ linux · No Comments

There is no plug ins in WordPress to bulk fix your permissions. That is why this little script was made. The trick is you have to run it from the root of the server which in most cases your hosting company has to do.

It’s really easy to run and 100% safe.

Here is how:

1. Download the script anywhere on the server

wget http://ezlinuxadmin.com/downloads/fixperms.sh

2. Run the script from the same folder it’s downloaded

This will fix one account
sh ./fixperms.sh -a username

This will fix all accounts
sh ./fixperms.sh -all

That’s it, enjoy!

→ No Comments Tags: Cheat Sheets · Cpanel and WHM · Linux Commands · Linux News · Linux Security · Linux Software / Scripts · Linux Tricks

The right way to upgrade Cloud Linux that works

August 1st, 2015 by EZ linux · No Comments

If just doing a general YUM update does not update your Cloud Linux you are not alone. In fact sometimes the LVE manager never installs at all.

Don’t worry though, it’s just one line of code and about 5 minutes to fix.

yum install lvemanager --enablerepo=cloudlinux-updates-testing

If that still does not work try to do a forced CPanel update and then run again.

If that doesn’t work send a message to CPanel or Cliud Linux to ge their stuff to work.

Good luck!

→ No Comments Tags: Cpanel and WHM · Installing Linux · Linux Operating Systems · Linux Security

How to find CryptPHP PHP malware and remove it.

May 5th, 2015 by EZ linux · No Comments

CryptPHP PHP malware has a become a nightmare for WordPress owners. Hacking millions of websites with it and getting web hosts listed in CBL effecting other web hosting accounts that did nothing wrong. It’s a vicious loop unfortunately that blacklists like CBL and Sorbs don’t care about using scrutiny or rational. Their philosophy is to just block everything if there is an issue despite websites being blocked that did nothing wrong. Hopefully someday blacklist will focus on the domains that cause issues not the IPs. That way good sites will not blocked for doing nothing wrong. Most IP people and the net know that Sorbs blocks million of good websites with no regard, I was chocked though to see CBL jump on the same list of block first ask later.

Anyways… to find the CryptPHP hack A.K.A. social.png hack. You need to run search command from root on your server.

This will find it:

for r in `locate social | grep png`; do file $r; done | grep PHP

But removing it will not fix the issue, if it’s on the site than the site has been hacked and needs to be removed. The only things that can be salvaged is the images and databases.

Here is a little information on having your WordPress Hacked

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

Hot to create a tar and uncompress a tar file

May 5th, 2015 by EZ linux · No Comments

To compress a file or folder with tar run this:
tar -cvf archive-name.tar directory_name

To extract a file or folder with tar run this:
tar -xvf archive-name.tar

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

Change root user language in Centos by command

May 1st, 2015 by EZ linux · No Comments

If you want to change the language the user root uses by command in Centos you need to run this:

export LANG=en_GB.UTF-8

This is for English if you want another language you need to change this to your language; en_GB

→ No Comments Tags: Linux Commands · Linux Software / Scripts · Linux Tricks

How to remove error_log from all CPanel account and backups

April 25th, 2015 by EZ linux · 1 Comment

Some scripts like WordPress and Joomla can leave a big error_log files that no one will ever look at. Try opening a 30mb log file with Word and see what happens. In most cases you can just remove this file with a simple command.

To remove all error_log files for CPanel accounts that are live use:

find /home/ -type f -name error_log -delete

To remove all error_log files from backups use:

find /backup/ -type f -name error_log -delete

This will take a while to complete because it will look through every file, it also runs pretty smooth so just sit back and let it work it’s magic.


→ 1 Comment Tags: Cpanel and WHM · Linux Commands

How to change the main IP on a CPanel server

April 24th, 2015 by EZ linux · No Comments

Changing a server to a new IP is a nightmare, there is so many places that need to update. If possible always just set up a new server and transfer everything to it. If that’s too hard than here is how to do the migration the best possible way.

  1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0
    Change the IPADDR and GATEWAY lines to match the new IP and Gateway for the new ip
  2. Edit /etc/sysconfig/network
    Change the GATEWAY line here if it does not exist in the ifcfg-* file.
  3. Edit /etc/ips
    Remove the new primary IP from this file if it is present
    Add the old primary IP to this file
  4. Edit /var/cpanel/mainip
    Replace the old primary IP with the new primary IP
  5. Edit /etc/hosts
    Replace the old primary IP with the new one if needed. The hostname’s dns will need to be updated too
  6. Restart the network service to make the new IP the primary: service network restart
    (Note: You’re probably going to be disconnected at this point, and have to log in to ssh using the new primary ip.)
  7. Restart the ipaliases script to bring up the additional IPs: service ipaliases restart
  8. Run ifconfig and make sure all IPs show up correctly
  9. Update the cpanel license to the new primary IP
  10. Then run /usr/local/cpanel/cpkeyclt to update the CPanel license
  11. Then run the migration Wizard inside CPanel to update Apache and the website settings.

In a perfect world that will do it.

Good luck!

→ No Comments Tags: Cpanel and WHM