E-commerce server

This page describes how to install tribushop on a server, check tribushop development page for more information about on how to setup a local environment.


Install software

MariaDB and PostgreSQL are installed because the application is being ported to pdo and to use PostgreSQL as preferred database;

$ sudo prt-get depinst postgresql \
mariadb \
nginx \
certbot \
certbot-nginx

Read PHP page and follow instructions to install and setup php.


Configure nginx

Read nginx documentation, this example assumes nginx configuration with virtual servers;

Shop virtual server;


Configure databases

Local fork prior to 1.1.0 work with legacy code from opencart and is advised to run mariadb.

Mariadb

If is the first time setting up mariadb on the system follow mariadb page, then login with password created during the process;

$ sudo mysql -u root -p

Create tribushop database;

> CREATE DATABASE db_shop;

Create user;

> CREATE USER 'db_shop_user'@'localhost' IDENTIFIED BY 'user_password';

Grant rights to user;

> GRANT ALL ON db_shop.* TO 'db_shop_user'@'localhost' IDENTIFIED BY 'user_password' WITH GRANT OPTION;

Flush privileges and exit;

> FLUSH PRIVILEGES;
> EXIT;

Postgresql

Check postgresql documentation. Create user;

$ sudo -u postgres createuser --pwprompt --encrypted \
        --no-createrole --no-createdb db_shop_user

Create database for the user;

$ sudo -u postgres createdb --template=template0 --encoding=UTF8 \
        --owner=db_shop_user db_shop

Postgresql listens on port 5432.


Configure

 and start php built in php to test setup;