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!


1. Installing & Setting up LAMP

A. Install Apache 2

On a terminal execute:

sudo apt-get install apache2

B. Install MYSQL 5

On a terminal execute:

sudo apt-get install mysql-server 
sudo apt-get install libmysqlclient15-dev

In order to start MYSQL On a terminal execute:

/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 –> CHECK FIRST IF IT EXISTS On a terminal execute:


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

B. Verify

To start XAMPP simply call this command:

/opt/lampp/lampp start

You should now see something like this on your screen:

Starting XAMPP 1.6.7...

LAMPP: Starting Apache...

LAMPP: Starting MySQL...

LAMPP started.

If you now open a browser, and insert this address

http://localhost

you should see a page resembling the configuration page of XAMPP. Make sure that when you check the status, the following are reported

MySQL database                     ACTIVATED         
PHP                                ACTIVATED         
Perl                               ACTIVATED         
Common Gateway Interface (CGI)     ACTIVATED         
Server Side Includes (SSI)         ACTIVATED         

C. Setup a test database for later use from Magento

open the XAMPP configuration page

http://localhost

Navigate to myphpadmin and create a new database. Give it the name: magentotestdb

The user in this is the default: root

No password is required.

2. Installing Magento

A. Where?

At first we need to decide the directory Magento needs to sit in. In order to be able to access this site with XAMPP, Magento needs to be installed inside /opt/lampp/htdocs/ So we can create a directory inside htdocs called magentosite (Its better to perform the following as a superuser ‘su’ from the terminal. That way there will be no issues of permissions to write directories at this level). So open up a terminal and type:

 
su
cd /opt/lampp/htdocs
mkdir magentosite
cd magentosite

B. Download Magento

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

wget http://www.magentocommerce.com/downloads/assets/1.1.6/magento-1.1.6.tar.gz
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.

C. Uncompress downloaded files

At the same terminal type:

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

D. Move downloaded files to the appropriate magento directories

On the same terminal as before, execute the following commands

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

E. Change initial permissions of files

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

F. Add mysql location to the environment path

By doing this, we make mysql accessible from any path. To do this, edit the file /etc/environment and add /opt/lampp/bin

Something like this:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/lampp/bin"

ADD TO ENVIRONMENT PATH THE LOCATION OF mysql » /opt/lampp/bin Edit /etc/environment file and add it

G. Setup test data to the database

mysql -u root magentotestdb < data.sql

H. Problem area! Please help to improve

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

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

The script runs fine until it needs to resolve the host names. For details please see thread

J. Cleanup downloaded files

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

K. Change final file permissions

 find . -type d -exec chmod 777 {} ;

L. BROWSE! AND INSTALL

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, except the magento connect. Please help improve this article.




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs