Magento Installation Steps
Magento Installation Steps
Magento Installation Steps
vim /etc/php.ini
Uncomment the cgi.fix_pathinfo and change value to 0 & other values also.
cgi.fix_pathinfo=0
memory_limit = 512M
max_execution_time = 1800
zlib.output_compression = On
session.save_path = "/var/lib/php/session"
vim /etc/php-fpm.d/www.conf
PHP-FPM7 will run under the 'nginx' change the value to 'nginx' for the user and group lines.
user = nginx
group = nginx
listen = /var/run/php/php-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
mkdir -p /var/lib/php/session/
chown -R nginx:nginx /var/lib/php/session/
mkdir -p /run/php/
chown -R nginx:nginx /run/php/
Now install MySQL 5.7 from the MySQL repository with the yum command below.
MySQL 5.7 has been installed with a default root password. it is stored in the mysqld.log file.
mysql -u root -p
TYPE DEFAULT PASSWORD
composer -v
Go to the '/var/www' directory and download the Magento code with the wget command.
cd /var/www/
wget https://github.com/magento/magento2/archive/2.1.zip
Extract Magento code and rename the directory to 'magento2' directory.(yum install unzip)
unzip 2.1.zip
mv magento2-2.1 magento2
Install PHP Dependencies
Go to the magento2 directory and install all Magento dependencies with the composer command.
cd magento2
composer install -v
Go to the Nginx directory and create a new virtual host configuration file named 'magento.conf' in the
'conf.d' directory.
cd /etc/nginx/
vim conf.d/magento.conf
upstream fastcgi_backend {
server unix:/run/php/php-fpm.sock;
}
server {
listen 80;
server_name 13.233.126.167;
set $MAGE_ROOT /var/www/magento2;
set $MAGE_MODE developer;
include /var/www/magento2/nginx.conf.sample;
}
nginx -t
systemctl restart nginx
cd /var/www/magento2
Run the command below, make sure you have correct configuration. The values that need to be changed by
you are explained below.
Magento 2.1 is installed. Run the command below to change the permission for the etc directory and change
the owner of the magento2 directory to the 'nginx' user.
This cronjob is needed for the Magento indexer. Create a new cronjob as 'nginx' user (because magento
running under nginx user and group).
crontab -u nginx -e