Trying to install ‘cubecart’ an e-commerce application. Requires LAMP. While installing LAMP with help of an article from TechRepublic which explains installation on openSUSE Leap. It installs ‘appache2’ first and after installing, setting it up and testing, it goes on to install ‘mariadb’ which is a substitute for ‘mysql’. In the old days when I first took fancy to ‘linux’ from LSF & BLFS, there used to be a separate package ‘mysql’. But it seems openSUSE has gone on to ‘mariadb’ substitution. I am not an expert to ask why. I am sure the planners must have a reason for it.
Then other packages required are installed: php5, php5-mysql & apache2-mod_php5.
My problem is that the youtube demo (by linuxhelp.com) for installation of ‘cubecart’ requires the good old mysql prompt. For example:
root@linuxhelp:# mysql -u root -p
Enter Password
..............................................
(Some lines)
mysql>
With ‘mariadb’ substitution an empty database is already created by the name of ‘mariadb’. But ‘linuxhelp.com’ would work with a different database named ‘cubecart’ which is created by the following code:
You don’t need to install MySQL for Cubecart to work, MariaDB is a 100% compatible substitute.
Here is an example of how to create a database, user and start the Cubecart setup:
mysql -u root -p
create database cubecart;
grant all privileges on cubecart.* TO 'cooluser'@'localhost' identified by 'coolpassword';
flush privileges;
exit
As you can imagine, you need to change cooluser to something sensible and password to something you remember, these will be used during the Cubecart installation.
You’ll want to make sure these modules are installed - if you do not, the installation will error with HTTP 500; php5-ctype php5-json php5-mbstring php5-mysql php5-mcrypt php5-gd php5-curl php5-zip
If you install php5 or apache php module after installing Apache, it may not be activated and it won’t parse PHP but will offer to download it, in that case run; a2enmod php5 ; systemctl restart apache2
Your Cubecart installation will require a bunch of directories to be writable:
It’s easiest if you change the ownership of these directories to wwwrun (and all files inside them) with chown -R wwwrun /path/to/cubecart/directorythatneedspermissions
After this you can point your browser to your Apache webserver and the cubecart directory and it should guide you through the installation. DB server is naturally localhost, db cubecart and user what you put in earlier.
BTW: openSUSE packagemanagement works with "patterns’’ packages. Select the LAMP pattern in YaST’s softwaremanager and it will do the job for you incl all needed for a LAMP server. It will also install a YaST2 module for setting up your webserver.