Appendix - Clean Magento Install

During the testing of the OrderFlow Magento extension we have found the following instructions helpful as an informal guide on how to set up a suitable Magento environment as a prelude to installing the OrderFlow Magento extension.

The following instructions are based on (but not restricted to) the following Ubuntu 14.04 LTS operating system configuration.

Install Apache2, and enable the rewrite support.

sudo apt-get install apache
sudo a2enmod rewrite
sudo service apache2 restart

Install MySQL:

sudo apt-get mysql-server mysql-client
sudo service mysql start

Install PHP5, including the elements necessary for running Magento:

sudo apt-get install php5 php5-mcrypt php5-curl php5-gd php5-mysql
sudo php5enmod mcrypt
sudo service apache2 restart

Install Magerun:

The tool n98-magerun provides a very convenient utility for installing Magento:

Run the following commands in the terminal to download the n98-magerun install, and copy this into the user home directory. Then copy this to /usr/local/bin to enable it to be used more easily:

cd ~

wget http://files.magerun.net/n98-magerun-latest.phar -O n98-magerun.phar
sudo cp n98-magerun.phar /usr/local/bin
sudo chmod +x /usr/local/bin/n98-magerun.phar

Set up the Apache Virtual Host:

First run the following command to add a local DNS entry to the /etc/hosts file.

sudo bash -c "cat >> /etc/hosts <<EOF
# DNS for localhost magento store development.
127.0.0.1 orderflow.magento
EOF"

Then create a new virtual host file in /etc/apache2/sites-available:

sudo bash -c "cat >> /etc/apache2/sites-available/orderflow-magento.conf <<EOF
<VirtualHost *:80>
ServerName orderflow.magento
ServerAlias orderflow.magento
DocumentRoot /var/www/magento
<Directory /var/www/magento/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
</VirtualHost>
EOF"

Then enable this site, and restart Apache:

sudo a2ensite /etc/apache2/sites-available/orderflow-magento.conf

Install Magento:

Follow the Magento installation wizard using n98-magerun, making sure to install Magento sample data when prompted.

We’re assuming the Magento web root folder will be /var/www/magento.

Make a note of the admin user and password, if you are not simply using the defaults.

sudo n98-magerun.phar install

As the previous script was run as root, now correct the user permissions.

cd /var/www/magento
sudo chown www-data:www-data -R ./

Verify:

Finally, restart Apache2 to apply the changes.

sudo service apache2 restart

You can test the Magento install by navigating to http://orderflow.magento/. The admin panel will be available using the URL http://orderflow.magento/index.php/admin/.

Note

The instructions in this file are provided as an informal guide only. Realtime Despatch does not provide support on the basis of the contents of this Appendix.