Install ImageMagick on CentOS

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

Make sure that the required dependencies are installed:

yum install -y ImageMagick ImageMagick-devel

How to Start-Stop MySQL Server on CentOS Server

This small post is to explain how you can start/stop/restart MySQL server from command line on CentOS Server.
Stop MySQL Server

# /etc/init.d/mysqld stop
Start MySQL Server

# /etc/init.d/mysqld start
Restart MySQL Server

# /etc/init.d/mysqld restart
Hope you find this small tip useful

Restore MySQL Database from FileSystem Backup

Always backup your  MySQL database with mysqldump but if you didn’t you can restore it from file system.

If your backup include the /var/lib/mysql directory, if so then you should be able to restore the database. Each database is contained in a separate subdirectory off /var/lib/mysql, so look for one named with the name of your database (WordPress or any other). To restore it, shutdown the mysql server first

sudo /etc/init.d/mysql stop

Copy the backup-ed directory into the same location on your new server, then restart mysql server

sudo /etc/init.d/mysql start

Note:- that its much better to take actual database dumps using the mysqldump command than to rely on this method. so for the future, you should schedule something like this:

mysqldump -h host -u user -ppassword --databases database1 database2 > myfile.dump


Plesk12 what is the root password for MySQL?

Parallels Plesk Panel renames ‘root’ mysql account to ‘admin’ when the Panel is installed.
To get root privileges in mysql simply login with the ‘admin’ username instead. The password is the same as the admin password in Parallels Plesk Panel.

On server with Parallels Plesk Panel versions 8.x, 9.x and above admin password is stored in file /etc/psa/.psa.shadow. Use the following command to get the password:

~# cat /etc/psa/.psa.shadow

Since version 10 admin password stored in file /etc/psa/.psa.shadow is encrypted. Use the following command to get admin password in plain text:

~# /usr/local/psa/bin/admin –show-password

Despite version of Parallels Plesk Panel you may use the following command to login to mysql with root privileges:

~# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

How-to enable gzip support on Nginx Plesk12

Create /etc/nginx/conf.d/gzip.conf with the following:

vim /etc/nginx/conf.d/gzip.conf
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;

restart ngix service from Plesk or ssh
gzip_types to compress other file types can be obtained from /etc/nginx/mime.types

Symantec BE: Backup Failed Access denied to directory

When backing up our linux server with RALUS having errors: Access denied to directory V-79-57344-33928 .

Perform the following at the remote Linux/UNIX computer:

1. Stop the RALUS by executing the command /etc/init.d/VRTSralus stop

2. The configuration file of the RALUS is the RALUS.cfg, located in the path /etc/VRTSralus on the remote UNIX/Linux server.

3. Open the RALUS.cfg in a text editor such as vi and locate the following line:

Software\VERITAS\Backup Exec\Engine\RALUS\Encoder=

4. Add the following to the above line: LATIN-1. The new line should like this:

Software\VERITAS\Backup Exec\Engine\RALUS\Encoder=LATIN-1

5. Execute the command /etc/init.d/VRTSralus start to start the RALUS on the remote Linux/UNIX server.

More Info at Symantec