How to Install S-Cart on Ubuntu Server Latest

In this tutorial, we will show you how to install S-Cart on Ubuntu Server Latest Edition. S-Cart is an open-source e-commerce platform that allows users to easily create online stores.

Step 1: Update and Upgrade Ubuntu

Before we start installing S-Cart on Ubuntu server, update your server by running the command below.

sudo apt-get update && sudo apt-get upgrade

Step 2: LAMP Stack Installation

S-Cart is built on PHP and MySQL. Therefore, to install S-Cart, we need to install the Apache web server, MySQL and PHP on the server. Run the following command to install the LAMP stack.

sudo apt-get install apache2 mysql-server php libapache2-mod-php php-mysql

During the installation, you will be prompted to create a MySQL root password. Create a strong password and set it.

Step 3: Create a Database

Create a database for S-Cart to store its data. Log in to MySQL by running the command below.

sudo mysql -u root -p

Enter your MySQL root password when prompted.

In MySQL, run the following commands to create a new database, a new user and grant the new user all privileges to the new database.

CREATE DATABASE scart_db;  
CREATE USER 'scart_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';  
GRANT ALL PRIVILEGES ON scart_db.* TO 'scart_user'@'localhost';  

Replace PASSWORD with a strong password for the scart_user.

Step 4: Install S-Cart

Now that the database is ready, it’s time to download and install S-Cart. First, install unzip on the server by running:

sudo apt-get install unzip

Then, create a directory called “scart” in the /var/www/html/ directory where we will store the S-Cart files.

sudo mkdir /var/www/html/scart

Navigate to the /var/www/html/scart directory and download the latest version of S-Cart by running the command:

wget https://github.com/s-cart/s-cart/releases/download/v4.0.0-alpha/s-cart-v4.0.0-alpha.zip -O s-cart.zip

Unzip the downloaded file:

sudo unzip s-cart.zip

Using chmod, give the server permission to access the files:

sudo chmod -R 777 /var/www/html/scart

Step 5: Apache Configuration

S-Cart requires a few adjustments to the Apache configuration for it to work correctly. Open a new configuration file.

sudo nano /etc/apache2/sites-available/scart.conf

Inside the file, insert the following lines of code:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/scart/
    ServerName example.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html/scart>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

Replace “example.com” with your domain name, save the file and exit.

With the new file created, enable it with the following command:

sudo a2ensite scart.conf

Restart the Apache server with the command:

sudo service apache2 restart

Step 6: Install Composer

S-Cart requires the composer package manager to work. Install it by running:

sudo apt install composer

Step 7: Install PHP extensions

S-Cart requires a few PHP extensions. Install them by running the following command:

sudo apt-get install php7.4-curl php7.4-intl php7.4-mbstring php7.4-dom php7.4-gd php7.4-xml php7.4-zip php7.4-bcmath

Restart Apache afterwards.

sudo service apache2 restart

Step 8: S-Cart Installation Wizard

Finally, it’s time to run the S-Cart installation wizard. First, navigate to the configured domain name in your browser.

http://example.com/install/

Replace “example.com” with your domain name.

In the installation wizard, provide the database details such as the host, user, password, and name of the S-Cart. Click next to complete the installation.

Conclusion

S-Cart is now installed in your Ubuntu Server Latest edition. You can start configuring your online store and start making sales.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!