How to Install Magento 1.9.* on Ubuntu 18.04 – Step by StepHome - AlmasiSystems/magento-mirror GitHub Wiki
Following procedure installs the following software and runs you through the steps to configure them for Magento.
- Apache2 v2.4.7 (Ubuntu)
- PHP v5.5.9-1ubuntu4.5
- MySQL v5.5.40-0ubuntu0.14.04.1 (Ubuntu)
- Magento 1.9.1.0 Community Edition
Skip this step if you have prepared your Linux with LAMP.
sudo apt-get update sudo apt-get install apache2 -y
sudo apt-get install php7.1 php7.1-curl php7.1-gd php7.1-mcrypt php7.1-mysql php7.1-json -y
At this point, PHP is installed, it is a good time to update PHP configuration for Apache. By default, memory usage limit of php is set to 128M, I left it to default because I won’t be using this Magento install for anything other than experimentation. If you intend to use this for heavy php churning extensions or large dataset renders, increase it to a reasonable amount – look for “memory_limit” entry in /etc/php7.1/apache2/php.ini, and change the value to desired value, say 256M.
“php7.1-mcrypt” may need to be enabled, verify if /etc/php7.1/mods–available/mcrypt.ini is present. If not, do “sudo ln –s /etc/php7.1/conf.d/mcrypt.ini /etc/php7.1/mods–available/mcrypt.ini“.
Now, enable mcrypt extension:
sudo php7.1enmod mcrypt sudo service apache2 reload
Skip this step if you have prepared your Linux with LAMP.
sudo apt-get install mysql-server mysql-client –y
sudo usermod -a -G www-data {username}
[logoff if you have logged in as {username} and log back in.]
Create the website directory & theb grant permissions sudo mkdir /var/www/html/www.magentosite.com cd /var/www/html/ sudo chmod 755 -R www.magentosite.com/ sudo chown -R {username}:{username} www.magentosite.com/ cd www.magentosite.com
Where {username} above is your currently logged-in user name.
=begin=========================================================== sudo bash -c "cat >> /etc/apache2/sites-available/magentosite.com.conf <<EOF <VirtualHost *:80> ServerName magentosite.com ServerAlias magentosite.com DocumentRoot /var/www/html/www.magentosite.com/public LogLevel warn ErrorLog /var/www/html/magentosite.com/log/error.log CustomLog /var/www/html/magentosite.com/log/access.log combined <Directory "/var/www/html/magentosite.com/"> Order allow,deny Allow from all Require all granted <Directory "/var/www/html/magentosite.com/public/app/etc"> Options FollowSymlinks AllowOverride All EOF" =end=============================================================
sudo service apache2 restart sudo a2ensite magentosite.com
Setup domain-name redirects, update /etc/hosts on Ubuntu as well as any client computer you expect to access it from, add the following
On Server =begin=========================================================== 127.0.0.1 magentosite.com 127.0.0.1 www.magentosite.com =end=============================================================
On Client Machine(s) =begin=========================================================== {IPAddress of the Ubuntu} magentosite.com {IPAddress of the Ubuntu} www.magentosite.com =end=============================================================
$mysql –u root –p [type in root password] CREATE DATABASE magento; INSERT INTO mysql.user (User,Host,Password) VALUES('magento','localhost',PASSWORD('magento')); FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON magento.* TO magento@localhost; FLUSH PRIVILEGES; exit
Download Magento 1.9.3.6 from the github repository then do the following:
sudo sudo mv magento-mirror-1.9.3.6.zip /var/www/html/www.magentosite.com/ cd /var/www/html/www.magentosite.com/ sudo unzip magento-mirror-1.9.3.6.zip cd magento-mirror-1.9.3.6/ sudo mv -R * ../ sudo mv .gitignore .htaccess .htaccess.sample ../ cd ../ sudo rmdir magento-mirror-1.9.3.6/
chmod g+w var var/.htaccess app/etc chmod -R g+w var/package media
Restart Apache “sudo service apache2 restart” and you are all set!
Now browse to the website http://magentosite.com from your client computer configured with hosts (above).