How to setup magento on Ubuntu 8.0.4 desktop

Last modified by dimi_ned on Thu, June 24, 2010 15:19
Source|Old Revisions  

This is an old revision of the document!


0. OS version and Flash player

It is recommended to use the 32 bit version of the Ubuntu OS to perform this install. The only reason for this is that Adobe hasn’t produced a native 64 bit flash player. So when you choose to install the flash player (on a 64 bit system), it installs also a wrapper library which allows you to run the flash player in 64 bit environment.

If you don’t have the appropriate flash player, you may encounter issues with selecting/uploading images for your products.

Use your synaptic package manager to install the flashplugin-nonfree 9.0.124 version. The version 10 beta (from Adobe) does not work.

1. Installing & Setting up LAMP

A. Install Apache 2

On a terminal execute:

sudo apt-get install apache2

When that is done, you can test apache... Type in a browser the address localhost

You should see an HTML page with the message “It works”.

B. Install MYSQL 5

On a terminal execute:

sudo apt-get install mysql-server 
// At this point you have to enter a password for mysql access (enter root)
sudo apt-get install libmysqlclient15-dev

In order to start MYSQL On a terminal execute:

sudo /etc/init.d/mysql start

To find if mysqld is running On a terminal execute:

ps -ef | grep mysql

C. Install PHP5

On a terminal execute:

sudo apt-get install php5
sudo apt-get install php5-gd
sudo apt-get install php5-dev 
sudo apt-get install curl 
sudo apt-get install libcurl3 
sudo apt-get install libcurl3-dev
sudo apt-get install php5-curl

D. Install PHPMyAdmin

On a terminal execute:

sudo aptitude install phpmyadmin

Select Apache2 when asked for which server should be supported.

phpmyadmin is installed on /usr/share/

Our web pages are located in /var/www/

Create a symbolic link in var/www On a terminal execute:

sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin

E. Enable Apache rewrites

On a terminal execute:

sudo a2enmod rewrite

You should now see something like this on your screen:

Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.

F. Test time

Navigate to http://localhost/phpmyadmin/

You should see the web page phpmyadmin offering you access to the databases. If you don’t, clear your browser’s cache. Enter ‘root’ as the username, root as password, and login to check that it works.

G. Install Additional Packages

On a terminal execute:

sudo apt-get install php-pear
sudo pecl install pdo
sudo pecl install pdo_mysql
sudo pecl install pdo_sqlite
sudo updatedb

Modify the apache ini file to include the installed packages On a terminal execute:

sudo gedit /etc/php5/apache2/php.ini

Inside the php.ini, at the bottom (or after line 614), add the following lines:

extension=msql.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so

H. Final Apache setup

Verify that symbolic link for rewrites exists

cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/rewrite.load

Enable the readout of .htaccess file parameters

sudo gedit /etc/apache2/sites-enabled/000-default

Change AllowOverride from None to All

2. Installing & Setting up MAGENTO

A. Setup a test database for later use from Magento

Navigate with your browser to the myphpadmin page and create a new database. Give it the name: magentotestdb

The user in this is the default: root, password:root

B. Setup site directory

In order to be able to access this site, Magento needs to be installed inside /var/www/ So we can create a directory inside www called magentosite So at a terminal and type:

 
cd /var/www
sudo mkdir magentosite
cd magentosite

C. Download Magento

At this point we’re ready to download Magento (& the sample database) At the same terminal type

sudo wget http://www.magentocommerce.com/downloads/assets/1.1.6/magento-1.1.6.tar.gz
sudo wget http://www.magentocommerce.com/downloads/assets/1.1.2/magento-sample-data-1.1.2.tar.gz

Give your computer the time needed to download each package.

Uncompress downloaded files

At the same terminal type:

sudo tar -zxvf magento-1.1.6.tar.gz 
sudo tar -zxvf magento-sample-data-1.1.2.tar.gz

Move downloaded files to the appropriate magento directories

On the same terminal as before, execute the following commands

sudo mv magento-sample-data-1.1.2/media/* media/
sudo mv magento-sample-data-1.1.2/magento_sample_data_for_1.1.2.sql magento/data.sql
sudo mv magento/* magento/.htaccess .

Change initial permissions of files

sudo chmod o+w var var/.htaccess app/etc
sudo chmod -R o+w media

D. Setup test data to the database

cd magento
sudo mysql -u root magentotestdb < data.sql

E. Upgrade Magento before running

Normally we’d have to run the magento script to setup all environment variables

cd ..
sudo ./pear mage-setup .
sudo ./pear install -f magento-core/Mage_All_Latest-stable

F. Cleanup downloaded files

sudo rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
sudo rm -rf magento/ magento-sample-data-1.1.2/
sudo rm -rf magento-1.1.6.tar.gz magento-sample-data-1.1.2.tar.gz data.sql

G. Change final file permissions

Give yourself the ownership of the files but also to the apache server (www-data) the rights to write/read.

sudo chown -R your_user_name:www-data /var/www/magentosite

Ensure that all directories are 775:

sudo find /var/www/magentosite -type d | xargs chmod 775

Make all files group and owner readwrite:

sudo find /var/www/magentosite -type f | xargs chmod o+w,o+r,g+w,g+r

Finally

sudo chown your_user_name:www-data /var/www/magentosite

L. BROWSE! and Finish installation

We’re done! Navigate to

HTTP://localhost/magentosite

During the installation procedure, choose local host as address of host and give the database name used above.

As mentioned above, all features work!




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs