Very much a work in progress.

This site is very rough around the edges at the moment but will slowly take shape over time.

I primarily use this a s a journal or notebook for some of the projects I'm doing.  The primary goal at the moment is setting up a number of online servers for use with some webhosting and also to try and learn a bit about Linux and server operations as well as having a bit of fun.

This site will be undergoing many changes in the coming period and hopefully will be of some benefit to me and anyone who stumbles upon it.

After installing the Centos with Webmin and Virtualmin, it's time to update a few things.

Firstly I wish to update PHP to the latest PHP 7.4.  I'm reluctant at this stage to go to version 8 due to compatability issues with some software.

Anyway to update to PHP 7.4 I'm going to need to install a few items first.

Install the EPEL repository 

yum install epel-release

Then we need to install the remirepo:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

We now need to config the appropriate repository, in this case its the remi-php74 :

yum-config-manager --enable remi-php74

Now we can install php 7.4

yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-soap

Now we can install ImageMagick as I have found that many times CMS and other software used in websites require this so I may as well install it from the start.

First we need to install some development tools.

yum groupinstall "Development Tools" 

Now we can install ImageMagick:

yum install ImageMagick ImageMagick-devel

Install the php pear extension:

yum install php-pear

Now we install the php-devel extension:

yum install php-devel

Now we install ImageMagick using the pecl command:

pecl install Imagick

I then created an ini file in the etc/php.d/ directory which are loaded by default:

vi /etc/php.d/imagemagick.ini

Then hit "I" to go into insert mode and type:

; Enable imagemagick extension module
extension=imagick.so

Hit ESC then :wq and enter to write the file and quit.

Side note: If you've got Webmin installed as I have then you can go into the file manager under the tools tab and go to the /etc/php.d folder and create and edit a file there using the GUI.  

Now we need to restart the web server:

systemctl restart httpd

That should be it. 

To check that ImageMagick is installed you can use the following command:

php -i | grep Imagick

Results i got were:

  • # imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
  • # Imagick compiled with ImageMagick version => ImageMagick 6.9.10-68 Q16 x86_64 2021-02-24 https://imagemagick.org
  • # Imagick using ImageMagick library version => ImageMagick 6.9.10-68 Q16 x86_64 2021-02-24 https://imagemagick.org

Done!