Koozali.org: home of the SME Server

Drupal 8.x on SME 9.2

Offline #99

  • 2
  • +0/-0
Drupal 8.x on SME 9.2
« on: October 15, 2018, 12:27:39 PM »
Please help.
I have been trying to install Drupal 8.6 onto a clean SME 9.2 in the Primary iBay.
(Requires PHP 5.5.9 and MySQL 5.5.3 but many extensions/modules seem to assume the latest.)

At first, I was glad to find the https://wiki.contribs.org/Upgrade_php/mysql contrib (installs PHP 5.5.15, MySQL 5.5.39 and a version of PhpMyAdmin that works with that) but my Drupal distro (Glazed) installation failed mid way (probably due to modules needing later versions).

I was then happy to find the https://wiki.contribs.org/Software_Collections contrib that appears to offer updates to PHP 5.4 and MySQL 5.5 but it has been in the "pre-alpha" stage for a while.. and I didn't achieve very much.

Then I found the https://wiki.contribs.org/Software_Collections:MySQL55 and https://wiki.contribs.org/Software_Collections:MySQL57 but the native version of PhpMyAdmin of SME 9.2 won't recognize the Users for those databases and I couldn't find a simple way of upgrading it..

At last, I found the https://wiki.contribs.org/PHP_Software_Collections that appears to be able to activate up to PHP 7.1 but I had problems getting Drupal to use it as well as configuring the PHP memory allocation etc. for those services.

- If there were an option to upgrade SME's native PHP and MySQL to the latest (as in the Upgrade PHP and MYSQL contrib), I am happy to give it a shot. I do appreciate that other SME functionality may suffer..

- If it were possible to install the latest versions of PHP and MySQL in parallel and activate them for the Primary iBay (ideally with a version of PhpMyAdmin that works with them), that would be best - as long as I can get Drupal to recognize the alternative database (early attempts to use an alternative port weren't very promising..)

- If all of the above fails - or is too unstable - then is there a way to run Drupal on a separate server (or in a Virtual Machine) and still be able to access it via the Primary iBay?

Every suggestion gratefully appreciated.
Many thanks in advance.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Drupal 8.x on SME 9.2
« Reply #1 on: October 15, 2018, 12:53:52 PM »
Here's a post describing how to do something very similar for Wordpress:
https://forums.contribs.org/index.php/topic,53719.msg279608.html#msg279608

The relevant bits are:
- install the required php and mysql software collections
- create an ibay for drupal
- activate the SCL versions of php and mysql your drupal ibay
- reconfigure the 'Primary' ibay to serve the content of the drupal ibay
- install drupal in the new ibay
- give drupal the correct socket path for the SCL version of mysql during installation (or enable TCP communications and give the correct TCP port)

Offline michelandre

  • *
  • 261
  • +0/-0
Re: Drupal 8.x on SME 9.2
« Reply #2 on: October 15, 2018, 02:53:29 PM »
Hi #99,

Have a look at https://wiki.contribs.org/SME-101.05A_WordPress. It is in French but all the commands are there.

- Activate the PHP SCL for your i-bay in Server Manager and for SQL, always use mysql57, mysqladmin57...
- For the DB host i.e. localhost, use localhost:/var/lib/mysql/mysql57.sock

Verify the version (5.7.16) when you are at the MySQL console.

Code: [Select]
# mysql57

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.16 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

The problem with Drupal is the upgrade of major versions. Updating from 8.5 to 8.6 is OK but just wait when you will have to upgrade from 8.x to 9.

Michel-André

Offline gyrcom

  • 20
  • +0/-0
    • https://www.gidout.com
Re: Drupal 8.x on SME 9.2
« Reply #3 on: December 02, 2019, 01:32:42 AM »
I finally got this to work, real pain due to Rewrite Base settings and figuring out how to install php-opcache. Lots of google work.

Here are my notes:
Quote
Fresh install Koozali 9.2

Remote access, allow ssh, as this makes it much easier. When I logon from my desktop I can cut and paste to the terminal.

Make an Ibay 'drupal', enable cgi

Install php software collections https://wiki.contribs.org/PHP_Software_Collections

Upgrade MySql to the latest https://wiki.contribs.org/Upgrade_php/mysql#For_SME9

Make sure innodb is enabled

Install Webhosting https://wiki.contribs.org/Webhosting

Use the server-manager to use web hosting to enable .htaccess, symlinks and increase the memory limits and post size etc.
 
Use PHP software collections to enable a compatible php version. I use php72.


from the terminal:
yum --enablerepo=remi-safe install php72-php-opcache


Now transfer your drupal files into the ibay html folder and do the installation.

Now you have to edit the .htaccess file.
around line 119 uncomment RewriteBase /drupal

Now should work
...

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Drupal 8.x on SME 9.2
« Reply #4 on: December 02, 2019, 10:01:58 AM »
I finally got this to work, real pain due to Rewrite Base settings and figuring out how to install php-opcache. Lots of google work.

Mainly just patience. It is all there in the wiki. I think you can use PHP 7.3 as well.

If we ever manage to get v10 out (please come and help - notes one how are around here) we will still likely require SCL as RHEL don't believe in upgrading the base versions of things like PHP & MySQL once released.

Quote
Remote access, allow ssh, as this makes it much easier. When I logon from my desktop I can cut and paste to the terminal.

For security make sure you use SSH keys and disable password logins. That will save you a lot of grief.
Also worth changing the default SSH port and employing something like denyhosts/Fail2ban as well or limit access to an individual IP or two.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mab974

  • *
  • 84
  • +1/-0
Re: Drupal 8.x on SME 9.2
« Reply #5 on: December 02, 2019, 03:38:24 PM »
Hi,

I recently tried to install Drupal Commerce 2.0 (drupal  >= 8.5.0) and met a problem with a new required version of Apache : 2.2.16 and SME 9 version is just 2.2.15  :-(

I do not go further for now.

This problem does not yet concern standard Drupal 8 install.