5.12.2013

Installing LAMP with Pimcore CMS for web development


There are many online tutorials showing you how to install and configure different installations, but almost all of them are focusing only on a specific subject. This tutorial is intended to guide you thru the whole process of installing and configuring the web development environment.

During this tutorial i'll show you how to install:
1. Ubuntu Desctop 12.10 OS
2. Apache 2 Web Server
3. PHP 5
4. MySQL
5. Java SE 7 ( for proper working of Eclipse IDE)
6. Eclipse IDE
7. PDT ( PHP Developer Tools )
8. MySQL Workbench
9. Pimcore CMS Framework

Step 1 : Installing Ubuntu 12.10
There are many different ways for installing Ubuntu on your working machine.Because of the simplicity, in this step we'll try to install Ubuntu OS, beside Windows OS. After the installation you can use the two Operating systems by choosing the desired OS on boot. I'll assume that you already have installed Windows OS. If you have only one partition on your working machine, don't worry, you can install Ubuntu on the same partition, but it's recommended, to create another NTFS in which you'll put Ubuntu.

Step 1.1 : Download wubi
Enter this address in your browser. On the screen you'll see something similar to the image below. Click on Get The Installer.







This click will open a new web page on which you can donate money for future development and maintanance of Ubuntu. If you want to skip this, scroll down and find this line: Not now, take me to my download.  After clicking on the link, the wubu.exe will start downloading. If you are using Chrome, you can find the executable in Downloads.

Step 1.2 : Start wubu.exe
Start wubu.exe. You will see something similar to the image bellow. You can choose the partition where you would like to install ubuntu, in the Installation drive field. In the field installation size , choose the size that the wubu will use.It's recommended to choose more than 8GB.


Next enter informations about the language, user name and password and press Install. After this the Ubuntu installation will start, and you'll see something similar to the image bellow.


After the installation is complete, click on the finish button. The system will reboot.















After the rebooting, on your screen you'll see something similar like the image above, so the Ubuntu operating system is successfully installed. If you want to learn more about this operating system, for example , change the wallpaper, remove /add some icon from the launcher, or some other stuff, check this web address, where you can find the official documentation.

Step 2 : Install Apache 2 Web Server
Apache Web servers are ussualy used together with MySQL, HyperText Preprocessor (PHP), and with the popular programming languages like Python and Perl. This configuration is called LAMP(Linux, Apache, MySQL and Perl/Python/PHP) and it represents a powerful platform for development of web-based applications.

First open the terminal, via Dash Home from the Launcher.















Double click on the Terminal icon.


In the terminal enter the next command: sudo apt-get install apache2

After this enter your password and the installation will start. During the installation you will be asked: Do you want to continue, enter y and the installation will continue. At the end you'll see something similar to the image below.


You can check to see if the Apache installation was successful. To do so open your browser, write localhost, and press enter. If you see something similar to the image bellow, then the installation was successful.
















Step 3 : Install PHP 5
To install PHP on your wirking machine, open terminal and enter this command: 

sudo apt-get-install php5-dev

The install process is similar like the previous step with the installing of Apache. Enter this command on the terminal:

sudo apt-get-install php5 libapache2-mod-php5

To check and see if PHP5 was successfully installed, on your terminal write sudo nautilus. A new Home Window will open. Next open the folders File->System->var->www. In the www folder, copy index.html and paste it here with extension php(index.php). Open this file and in the body tag enter this line of code: <?php phpinfo(); ?> . Next open your browser and enter this address: localhost/index.php . If everything is ok, then you'll see something similar to the image bellow.
















Step 4 : Install MySQL
If you want to use MySQL together with PHP5, you'll have to install the package php5-mysql. Do this with the command: sudo apt-get install php5-mysql

After this enter another command in the terminal: sudo apt-get install mysql-server


After the installation you'll see something similar to this:



Enter the password for your root user and press enter. Next confirm the password, and the installation will continue. After the process is complete, enter the command: sudo service apache2 restart

Step 5: Install Java 7 ( for proper working of Eclipse IDE)
To install java on your computer, visit this web site and choose the package jdk-7u9-linux-x64.tar.gz for 64-bit version, or jdk-7u9-linux-i586.tar.gz for 32-bit installation. When the download is complete, right click on the archive and click Extract Here, so the new folder jdk1.7.0-09 will be created.

Next, create a new folder for the Java JDK's files and folder, with writing this command on the terminal : sudo mkdir -p /usr/lib/jvm/jdk1.7.0



After this move all of the JDK's files and folders in the new folder, using the command: sudo mv jdk1.7.0_09/* /usr/lib/jvm/jdk1.7.0






Next insert the next command one by one, and don't forget to press enter at the end of every command:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1

sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

If you would like to check whether java was successfully installed, on the terminal enter java -version.If it's ok you'll see that java 1.7.0_09 version was installed.

Step 6 : Install Eclipse IDE
There are more versions of this application on the official web site. In our example we'll install Eclipse Classic 4.2.1. Download the appropriate version for your computer (64bit or 32bit). After the package download is complete, extract it, and find the folder named Eclipse. That's it, you are ready to use Eclipse IDE, by double clicking the Eclipse icon.

Step 7 : Install PDT ( PHP Developer Tools)
When you open Eclipse for the first time, you see something similar to this:















On the Eclipse menu press on Help, then Install New Software. After this a new dialog window will open. In the field Work with, choose All Available Sites. On the next field enter pdt, and wait some time. It will show Programing Languages colon, where you'll need to select PHP Development Tools (PDT) SDK Feature. Click two times Next, then Accept and Finish. After this the installation will start. If in the meantime you see alert dialog, just click Ok or Continue.























Step 8 : Install MySQL Workbench
On the Launcher in Dash Home write Ubuntu Software Center.Click on the icon.














You'll see a window similar to the image below. In Search field write MySql WorkBench and press Enter. Select the package and press Install. The installation will start.After the installation is complete , you'll see the MySql WorkBench icon on the Launcher.

Press on the icon. The MySQL WorkBench application will open.


















Find the Server Administration part, and click on New Server Instance. After this a new window will show up:





















Click Next. On the next window click again Next. After this you'll see a window where you'll need to enter your password.


Enter the password and press OK. You'll see a window that says Database connection tested successfully.  Press Next.















On the next window, in the field MySQL Installation Type choose Ubuntu Linux(MySQL Package) and click Next.















If everything is Ok , you'll see a window like this:















Click Next, then click Continue.Click Finish. If everything is ok, then you'll see a window like this:


















Step 9 : Install Pimcore CMS
In this step, we'll try to install Pimcore CMS. First visit this site and download version 1.4.8. Next open Eclipse IDE and choose File->New->Other. In the window that will open choose PHP Project. For the name of the project, we'll use mojaPrvaAplikacija. Extract the package that you've downloaded in Downloads, under the name Pimcore-latest.zip, and then rename it in app. After this copy the folder in this location: Home/workspace/mojaPrvaAplikacija.

The next step is to add permissions to the Pimcore folder. Open the terminal and enter the next commands:

















Next create a virtual host. On the terminal write sudo nautilus. In the window that will open , pick File System. Then go to this location: etc->apache2->sites available.In this folder copy the file default, and paste it on the same folder, with a new name mojaprvaaplikacija.dev.  Open this file and right after ServerAdmin, add ServerName mojaprvaaplikacija.dev.

On the tag where it says DocumentRoot, change the path location to : /home/yourName/workspace/mojaPrvaAplikacija/app. Also add this path location in Directory and add AllowOverride All. The document should look like this:

























Save the changes in mojaprvaaplikacija.dev. Now go back to the folder etc and open the file hosts. After the line where it writes Ubuntu, enter the next line: 127.0.0.1 mojaprvaaplikacija.dev . The file should look like this:














Save the changes and close the file. Next open the terminal and write this command: sudo a2ensite mojaprvaaplikacija.dev

Next enter this command: sudo a2enmod rewritŠµ

Restart the apache2 server with the command: sudo service apache2 restart

Now the final step. Open the browser and enter the next address: http://mojaprvaaplikacija.dev/install. If everything is ok, you should see something similar to the image below:















Enter the informations for username, password and database(You will have to create empty database) and click on Install now. That's it, now you can use Pimcore CMS with your PHP Projects.


8 comments:

  1. All the snapshots of this blog isr really ver informative.
    Website designing Company in lucknow

    ReplyDelete
  2. I have been reading some of your posts and it’s pretty clever stuff. Simple language – no confusing words and at the same time it carries all the information. That’s nice to read.

    ReplyDelete
  3. May it be creating an ecommerce store, a web application Cms Web Development Company or a responsive design, web development experts of Capanicus satisfy every business requirement.

    ReplyDelete
  4. It's a beautiful presentation about the clipping path.This post is very good. Thank you for presenting a very good post.
    cms web development company

    ReplyDelete
  5. Thanks. It works for ubuntu but not for centos. I managed to install on centos using https://www.rosehosting.com/blog/how-to-install-pimcore-on-a-centos-7-vps/

    ReplyDelete
  6. Thank you for this post. It's a great information to all developers to install lamp with pimcore CMS.
    Nashville Graphic Design

    ReplyDelete
  7. Awesome This is Great Wonderful Coding Technique..Thanks

    ReplyDelete