• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Magento in Linux

{{postValue.id}}

To install Magento in Linux

Magento is an open source e-Commerce Merchant software that is used to build an on-line show case. Magento is used by 1% in all websites world-wide on internet. Installation of Magento is explained in this article.

Features

  • Free and open-sourced.
  • Ability to install & change default website theme, without need to change the content.
  • 3 Available editions to use which are Community Edition &ndash Professional Edition &ndash Enterprise Edition.

For installing apache, PHP and My SQL

Before installing Magento, install the dependency packages.


root@linuxhelp:~# apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-common php5-cli php5-ldap php5-gd php5-mysql php5-tidy php5-xmlrpc php5-curl 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libavahi-compat-libdnssd1 libjpeg62 libjs-jquery libruby2.1 libyaml-0-2
  ruby2.1 rubygems-integration
Use ' apt-get autoremove'  to remove them.
The following extra packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 libmcrypt4
  libmysqlclient18 libtidy-0.99-0 mysql-common php5-json php5-readline
Suggested packages:
.
.
.
Creating config file /etc/php5/apache2/php.ini with new version
Module mpm\_event disabled.
Enabling module mpm\_prefork.
apache2\_switch\_mpm Switch to prefork
apache2\_invoke: Enable module php5
Setting up php5 (5.6.11+dfsg-1ubuntu3.4) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...

Then install apache2 and mysql.


root@linuxhelp:~# apt-get install apache2 mysql-server mysql-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version.
apache2 set to manually installed.
The following packages were automatically installed and are no longer required:
  libavahi-compat-libdnssd1 libjpeg62 libjs-jquery libruby2.1 libyaml-0-2
  ruby2.1 rubygems-integration
Use ' apt-get autoremove'  to remove them.
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libterm-readkey-perl mysql-client-5.6 mysql-client-core-5.6 mysql-server-5.6
  mysql-server-core-5.6
.
.
.
![package configuration](https://assets.linuxhelp.com/scr/a55b4396eb8367fd8c75e26eafd3c0eb.png)

![Credential](https://assets.linuxhelp.com/scr/74df7c0ea3efaea505c0b522dbe476a0.png)
.
.
.
2016-06-27 18:00:38 0 \[Note\] /usr/sbin/mysqld (mysqld 5.6.30-0ubuntu0.15.10.1) starting as process 16872 ...
Setting up libhtml-template-perl (2.95-2) ...
Setting up mysql-client (5.6.30-0ubuntu0.15.10.1) ...
Setting up mysql-server (5.6.30-0ubuntu0.15.10.1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...

Open the php.ini file, to increase the memory limit.


root@linuxhelp:~# nano /etc/php5/apache2/php.ini
memory\_limit = 512M

Create a new MySQL database for Magento installation.


root@linuxhelp:~# mysql -u root &ndash p
Enter password: 
Welcome to the MySQL monitor.  Commands end with   or g.
Your MySQL connection id is 2
Server version: 5.6.30-0ubuntu0.15.10.1 (Ubuntu)

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>  create database magento 
Query OK, 1 row affected (0.02 sec)

mysql>  create user magento@localhost identified by ' linuxc' 
Query OK, 0 rows affected (0.47 sec)

mysql>  grant all on magento.\* to magento@localhost 
Query OK, 0 rows affected (0.04 sec)

mysql>  flush privileges 
Query OK, 0 rows affected (0.06 sec)

mysql>  exit 
Bye

To Configure apache for magento.


root@linuxhelp:~# nano /etc/apache2/sites-available/000-default.conf


   Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all

Now enable " mod_rewrite" module and restart Apache service.


root@linuxhelp:~# a2enmod rewrite
root@linuxhelp:~# service apache2 restart


To Download the magento

Use the following link to download the latest version from the official website,
https://www.magentocommerce.com/download

Extract the downloaded magento file to the location /var/www/html.


root@linuxhelp:/home/user1/Downloads#  ls
Magento-CE-2.1.0-2016-06-23-02-28-19.tar.gz


root@linuxhelp:/home/user1/Downloads#  tar xvzf Magento-CE-2.1.0-2016-06-23-02-28-19.tar.gz -C /var/www/html/
app/
app/design/
app/design/adminhtml/
app/design/adminhtml/Magento/
app/design/frontend/
app/design/frontend/Magento/
app/etc/
.
.
.
vendor/zendframework/zend-view/src/Strategy/FeedStrategy.php
vendor/zendframework/zend-view/src/Strategy/JsonStrategy.php
vendor/zendframework/zend-view/src/Strategy/PhpRendererStrategy.php
vendor/zendframework/zend-view/src/Stream.php
vendor/zendframework/zend-view/src/Variables.php
vendor/zendframework/zend-view/src/View.php
vendor/zendframework/zend-view/src/ViewEvent.php

Change the permissions of the directory.


root@linuxhelp:/home/user1/Downloads# chown -R www-data:www-data /var/www/html/

Alter the file permission.


root@linuxhelp:/home/user1/Downloads# chmod -R 755 /var/www/html/

Restart the apache and mysql service


root@linuxhelp:/home/user1/Downloads# /etc/init.d/mysql restart
\[ ok \] Restarting mysql (via systemctl): mysql.service.
root@linuxhelp:/home/user1/Downloads# /etc/init.d/apache2 restart
\[ ok \] Restarting apache2 (via systemctl): apache2.service.

After completing all the process, open the browser and type http://< IP_address> /index.php

Click on Agree and setup magento
Installation page

Now click Start the readiness check

Readiness check

Readiness check processing

Readiness check completed

After completed the above step, Click Next to add the databases for magento.

Add a Database

After the Database configuration is completed, Click Next to Web Configuration.

Database configuration

Then click Next to Customize your store.

Managing store detail

Now create the admin account.

Admin account creation

And click Install now.

Installation page

Installation process

Now see the summary of the installation process.

Installation completed

Click on Launch Magento Admin.

Launch magento admin

Login using the user credentials.

Login page

The dashboard of the magento 2.1.0 appears as shown below.

Dashboard of magento

Open the browser and Navigate to http://< IP_address>

Homepage

Tags:
mason
Author: 

Comments ( 1 )

parthiban
Thanks @alexmarco for your valuable feedback, keep reading our articles for future tutorials
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

how to install Magento on Centos?

A

For installing Magento in Centos refer this link, https://www.linuxhelp.com/how-to-install-magento-2-2-3-on-cent-os-7/.

Q

Where can I get the regular updates of Magento?

A

Keep tracking about Magento in https://magento.com/.

Q

How to analyze the issue behind white page execution in the web interface for Magento?

A

Analyse the apache error log of Magento for more information about the mis configuration.

Q

Is Magneto mobile friendy application?

A

Yes, they Magento provide the mobile friendly application.

Q

What is Magento software used for?

A

Magento is an open-source e-commerce platform written in PHP.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Gibbson ?
How do i run both nginx and apache in same instance on centos

Hi...,

my server is based centos operating system and my webserver is already running on Apache.... i need to run both apache and nginx on same instance ... please help me to implement this concept...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.