Actions

Difference between revisions of "Configuring a LAMPP server for PHP development"

From Joomla! Documentation

(creation)
 
Line 4: Line 4:
 
Theses instructions should work fine on any Debian based distribution such as Debian, Ubuntu, LinuxMint, Xubuntu, Kbuntu and others.
 
Theses instructions should work fine on any Debian based distribution such as Debian, Ubuntu, LinuxMint, Xubuntu, Kbuntu and others.
  
The letters LAMPP stand for :
+
The letters LAMPP stand for Linux, Apache, MySQL, PHP and PhpMyAdmin, Linux is the operative system we are using and the rest are services also known as the "AMP stack" that we need to install and configure to create our development environment.
  
*:L;Inux
+
Most professional, high performance and high traffic web servers in the world runs on Linux, then is always a great idea to develop your project on Linux from the very beginning and help yourself avoid compatibility problems in your software when you migrate it to the live servers.
  
== Download and Installation ==
+
== Installation ==
 
+
There is 2 ways to download and install Eclipse IDE in your Linux box, you can do it automatically from the comfort of your software center or the Linux terminal with few commands or manually downloading and installing Eclipse  IDE from the Eclipse project website or other alternative download sites.
+
 
+
 
+
=== Method 1: From a Linux repository  ===
+
 
+
'''NOTE:''' This method is the most recommended because you will have the benefits of automate all the installation process and get automatic security patches and bug fixes updates when the software is installed from the repositories.
+
 
+
 
+
==== Option 1: Terminal  ====
+
 
+
*Open your terminal and type
+
<tt> sudo apt-get install eclipse </tt>
+
*Wait until installation process finish
+
*If everything whent fine Eclipse IDE should be available in the software menu
+
 
+
==== Option 2: Software center  ====
+
 
+
*Open the software center that comes with your distribution
+
*Type in the search box "Eclipse IDE"
+
*Select "Eclipse IDE" in the search result list
+
*Click on the "install" button
+
*Wait until installation processes finish
+
*If everything whent fine Eclipse IDE should be available in the software menu
+
 
+
=== Method 2: From a downloaded copy  ===
+
 
+
'''NOTE:''' For manual download and installation you got to have JAVA runtime previously installed or Eclipse IDE will not run
+
 
+
To install java runtime on your Linux box open a terminal and type folloging command and wait until the installation finish:
+
 
+
<tt>sudo apt-get install sun-java6</tt>
+
 
+
You can also install java from your software center just type "openjdk java 6" and install the package.
+
 
+
To get a copy of Eclipse IDE follow these steps:
+
 
+
*Go to: [http://www.eclipse.org/downloads/ Eclipse download page]
+
*Download "Eclipse Classic" 32 or 64 bits according to your current OS version
+
*Unpack the downloaded file on any location that you want, ex: Downloads folder or Desktop folder
+
*Open the eclipse folder an find an executable file called "eclipse"
+
*Do a right click on the file then -> properties -> permissions and check "Allow executing file as a program"
+
*To execute Eclipse IDE, you can do a double click on the executable file or run it from terminal, ex:
+
<tt>cd ~/Downloads/eclipse/
+
eclipse</tt>
+
 
+
'''NOTE:''' At the [http://www.eclipse.org/downloads/ Eclipse download page] you can see many versions of Eclipse IDE, all of them are basically the same Eclipse with a bunch of extensions pre-installed to do specific task by default Eclipse IDE comes with all the tools needed to develop JAVA projects but you can install more extensions to develop in other languages, click in the link [http://www.eclipse.org/downloads/compare.php Compare Packages] to see a complete char of all the extensions included on each Eclipse Package build, you can try one of these pre-build packages specifically created for PHP development some of them are official releases from the Eclipse website and others are independent projects:
+
 
+
*[http://www.eclipse.org/pdt/downloads/ Eclipse PDT (PHP Development Tools)]
+
*[http://www.easyeclipse.org/site/distributions/php.html EasyEclipse for PHP]
+
*[http://www.phpeclipse.com/ PhpEclipse]
+
 
+
{{chunk:Configuring Eclipse IDE for PHP development - Understanding the interface}}
+
  
 
== Understanding the folder structure ==
 
== Understanding the folder structure ==
 
When your execute Eclipse for the first time, it ask you to create a "workspace" the workspace is a folder where Eclipse IDE will save the configurations about your editors, perspectives and views also the workspace folder is normally used locate your project files separated by folders, nonetheless you can place your project files outside the workplace folder if you like.
 
 
The workplace folder name could any valid folder name, but by default Eclipse IDE set the name "workplace" to it, and it tries to locate the folder at your documents folder or your home folder, ex "/home/youruser/workspace"
 
 
When you create new PHP project and you decide to place it inside the workplace folder then it may looks like this:
 
 
/home/youruser/workspace/myphptutorial
 
/home/youruser/workspace/joomla_component
 
/home/youruser/workspace/test
 
 
Those 3 folders represent 3 different projects inside the same "workspace" and they will share the same editor and perspective layout configuration for Eclipse IDE.
 
 
The configurations about the editors and perspective layouts are specifically located at the hidden folder called ".metadata" which is right inside the workspace folder, this means you can move the workplace folder from one computer to another and work in Eclipse from another computer with all your custom configurations and projects just easy.
 
 
{{Chunk:Configuring Eclipse IDE for PHP development - Configuration}}
 
  
 
== Fine tuning ==
 
== Fine tuning ==
  
=== Increase RAM memory usage  ===
 
 
By default Eclipse got some configuration to limit the amount of RAM memory, this configurations works fine for most users but if you 2GB of ram or more you should consider set this values to improve Eclipse IDE performance.
 
 
First you got to locate the "eclipse.ini" file that contains some few Eclipse IDE configurations.
 
 
*If you downloaded Eclipse IDE manually from internet the "eclipse.ini" file is just inside the unpacked folder
 
*If you installed Eclipse via terminal or software center the location of the file is "/etc/eclipse.ini"
 
*In some Linux versions the file can be found at "/usr/share/eclipse/eclipse.ini"
 
 
'''NOTE:''' If you found a config file at "/etc/eclipse.ini" then don't edit the file at "/usr/share/eclipse/eclipse.ini"
 
 
This is the content of the original "eclipse.ini" file
 
 
<tt>
 
-startup
 
plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
 
--launcher.library
 
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist
 
-showsplash
 
org.eclipse.platform
 
--launcher.XXMaxPermSize
 
256m
 
--launcher.defaultAction
 
openFile
 
-vmargs
 
-Xms40m
 
-Xmx384m
 
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
 
</tt>
 
 
To see the full reference about these parameters visit [http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html]
 
 
Change the following values to increase the amount of RAM memory used by Eclipse
 
 
<tt>
 
-startup
 
plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
 
--launcher.library
 
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist
 
-showsplash
 
org.eclipse.platform
 
--launcher.XXMaxPermSize
 
512m
 
--launcher.defaultAction
 
openFile
 
-vmargs
 
-Xms512m
 
-Xmx512m
 
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
 
</tt>
 
 
If you got a lot of RAM memory you can try with these other configuration
 
 
<tt>
 
-startup
 
plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
 
--launcher.library
 
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist
 
-showsplash
 
org.eclipse.platform
 
--launcher.XXMaxPermSize
 
1024m
 
--launcher.defaultAction
 
openFile
 
-vmargs
 
-Xms1024m
 
-Xmx1024m
 
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
 
</tt>
 
  
 
[[Category:Development]]
 
[[Category:Development]]

Revision as of 19:29, 4 May 2012

Quill icon.png
Page Actively Being Edited!

This article is actively undergoing a major edit for a short while.
As a courtesy, please do not edit this page while this message is displayed. The user who added this notice will be listed in the page history. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page. If this page has not been edited for several hours, please remove this template, or replace it with {{underconstruction}} or {{incomplete}}.

Contents

Theses instructions should work fine on any Debian based distribution such as Debian, Ubuntu, LinuxMint, Xubuntu, Kbuntu and others.

The letters LAMPP stand for Linux, Apache, MySQL, PHP and PhpMyAdmin, Linux is the operative system we are using and the rest are services also known as the "AMP stack" that we need to install and configure to create our development environment.

Most professional, high performance and high traffic web servers in the world runs on Linux, then is always a great idea to develop your project on Linux from the very beginning and help yourself avoid compatibility problems in your software when you migrate it to the live servers.

Installation

Understanding the folder structure

Fine tuning