Debian Magento – What is Magento and how it is related to the Debian Server? As we already know, Magento is using PHP since it’s started the journey as web CMS. We also know that the Magento 2x (latest version) platform is an open source eCommerce CMS that is used by owners to operate online stores. In most cases, the Linux user prefers to use LAMP stack to develop Magento stores. If you’re a new developer then for an introduction, we can say Magento is an open source CMS. So, comparing with its other competitions such as WordPress, it requires at least 1GB minimum for a small size store. On the other side, 4GB for medium to large size stores.
As we mentioned in the opening paragraph that Magento is heavier in CMS due to its great functionality. So for better functionality and speed, we need to pick hosting with dedicated Magento hosting. Our hosting provides SSD cloud-based Magento server with 99.99% uptime guarantee.
Because slower loading pages directly effect the traffic, it does in sales too. So, enjoy faster loading pages for great sales with our hosting plans. However, we’re offering many premium services like AspirationCDN, LiteMageCache, development and SEO tools with a solid cPanel absolutely free with our hosting packages starts from USD 9.99 per month.
Tanzia Farin Chy for Aspiration Hosting
In the latest Magento 2x or later versions, Magento adds the front-end library to ensure more functionality. As a result, Magento 2 has more functionalities and a great back end comparing to its previous releases and competitors.
As the Magento 1x is now officially at its last days and Magento 2 or later versions are widely accepted by the users. So here we’ll only discuss Magento 2. Being specific we’ll discuss – How to install Magento 2x or later version in Debian Server?
Debian Magento – Choosing Hosting
Before installing Magento 2 we’ll need to go through the process of buying hosting plans. And believe me, some business finds it as a matter of strain and stress to a greater extent. So a compact service provider is the best choice to go with who can also provide a web server.
Here take a look on our web hosting and web server packages. Our servers come with email servers and additional services like standard web hosting options. So, whatever you pick make sure they’re real secure and quick for a booming eCommerce business. As we all know that the cloud ensures better performance, user experience, and speed, etc. So be choosy to pick one.
Debian Magento – Creating Data Base
For installing Magento 2, you first we need to install the MySQL database. Later on, we need to create a database for the CMS.
Follow these steps to Create DB for installing Magento 2x or later version:
For creating a new DB, log into the MySQL root simply by using the command:
mysql -u root -p
Later on, enter your password to login to the DB. Simply enter the credentials we have created while installing the MySQL. As a result, the MySQL command prompt pops out. Simply create a new database. Here DB name can be anything you prefer and easy to remember. My DB is
Use the following command as mine to create your own DB:
create database mage2x_db;
Hitting return on keyword creates a new database for installing Magento 2x or later version. Easy, huh?
Here note that you must include the (;) semicolon at the end of each and every MySQL command.
Debian Magento – Creating New User credentials
However, you have to create a user credential for the new Magento 2 database now. So, simply create a new user account with a password which strong enough and easy to remember. In my case, I am using mage2x_user and password is coder123. Also, remember the stronger password means more security to DB.
Following is the code to create new user and credentials:
create user 'mage2x_user'@'localhost' identified by 'coder123’;
Debian Magento – Setting up Privilege
As we’ve created the database and user credentials for installing Magento 2. Next, we need to set up the privileges for the account for the specific DB. For granting all the privileges into DB using the following command :
GRANT ALL PRIVILEGES ON mage2x_db . * TO mage2x_user @localhost;
Debian Magento – Flush
After successfully completing the previous step, we have the all admin privileges to access into DB and making changes. Now we’ll run a flush command so that MySQL has the knowledge about the new set privileges we’ve given to our new user on the new database of Magento 2. Complete the flush and exit from the MySQL command prompt by using the following codes.
Simply we’ll prompt to the SSH command prompt by exiting MySQL cmd prompt. Suddenly at this point, our DB has successfully installed.
Debian Magento – Download Magento 2
Now simply download the Magento 2x or later version and install by following these steps mentioned below, It is always better to use the Latest version for updated security patches and features. In doing so, makes your site safe and you can easily avoid security threats. So, let’s go:
I am using the
wget to download the Magento 2x or latest version into my home DIR.
Following is the set of codes to download Magento 2x into the home or root DIR:
cd /var/www/public_html wget https://github.com/magento/magento2/archive/2.3.0.zip
Now unzip the .zip file using the following code:
Next under the Magento 2x DIR run the “composer install”. In case of any error installing composer use these following commands to install must have extensions for Magento 2x.
apt-get install php5-intl apt-get install php5-xsl
As we’ve done, ensure you have edited the value of “always_populate_raw_post_data = 0.” in -1 in the PHP.ini file.
Also Note, the easiest way to edit the php.ini file is using the following commands:
cd /etc/php5/apache2/ vim php.ini cd /etc/php5/clid vim php.ini
To save your changes made in the
php.ini file, simply enter the followings:
Now we’ll assign the ownership of the files and folders for Apache’s user and group. Use the following codes to do the same.
sudo chown -R www-data:www-data /var/www/public_html/
Always remember, all command lines are case sensitive. For example, -R in the above code.
As this above command runs successfully. It means we have allowed the Apache server to create and modify the files as per requirements.
Carrying on With Frontend
Now likewise other CMS we need to configure through the web interface to complete the Magento installation in Debian server. Now open up your browser simply type the server’s domain id or name. Similarly, we can also type in the public IP in the address bar.
Following is an example to do the same:
How to install Magento2x? – the article will guide you to install Magento 2 using the web interface or browser. Scroll the article until you see this following section.
Also note, As we’re using Debian and already created the Database only needs to fill up as created here in this article. So skip the PhpMyAdmin. If you’re an Aspiration client feel free to contact our support for any further details. Thanks.