Notifications
Clear all

[How to] Virtualmin on Ubuntu 16.04 with PHP 5.6

5 Posts
2 Users
0 Reactions
200 Views
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
Topic starter  

Installing Virtualmin on Ubuntu 16.04 installs PHP 7 by default. While PHP 7 is faster than previous versions and although it has been nearly a year since it was released, there are still some software that does not support PHP 7. If you're in a situation that you've followed my tutorial to build your server with Virtualmin and Nginx on Ubuntu 16.04 and your software doesn't support PHP 7, you can use following instructions to downgrade PHP to PHP 5.6.

First you need to remove PHP 7 from your server. Following command will take care of that.


apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "n" " "`

Now add ondrej PPA


add-apt-repository ppa:ondrej/php

Update apt cache


apt-get update

Install PHP 5.6 and modules


apt-get install php5.6-mysql php5.6-curl php5.6-gd php-pear php-imagick php5.6-imap php5.6-mcrypt php-memcache php5.6-tidy php5.6-xmlrpc php5.6-xsl php5.6-mbstring php5.6-zip php5.6-fpm php5.6-cgi php5.6-cli

You don't need to change anything on Virtualmin. It'll automatically detect PHP 5.6 and use it for new virtual servers.


   
Quote
(@Anonymous 42)
Active Member
Joined: 8 years ago
Posts: 6
 

Do you use 32bit or 64bit Ubuntu 16.04 ? I followed your tutorial and used 64bit am using alot of RAm with only one wordpress site on virtualmin. I read a post saying 64bit uses more ram? The VPS is currently using "1001.88 MB of 3 GB Used" Is that normal for fresh install of virtualmin and one wp site? Also I did not do the downgrade to php 5.6. I am using PHP 7.


   
ReplyQuote
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
Topic starter  

25% - 35% RAM usage is normal. I use 32 bit for 3GB or less.


   
ReplyQuote
(@Anonymous 42)
Active Member
Joined: 8 years ago
Posts: 6
 

Would there be a big enough difference to change to 32bit


   
ReplyQuote
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
Topic starter  

I don't think so. It's just 32 bit doesn't support RAM larger than 4GB. I wouldn't care much about it.

64 bit works fine for 3GB RAM. I don't think it's worth to switch to 32 bit if you have up and running server on 64 bit.


   
ReplyQuote
Share:
Back to top button