Installing and running PHPStorm on Ubuntu
In this tutorial, you will:
What This Tutorial Is Not About
- This tutorial does not teach you PHP programming.
- This tutorial does not teach you working in Ubuntu.
- Intel Pentium III/800 MHz or higher (or compatible).
- 512 MB RAM minimum, 2 GB RAM recommended.
- Ubuntu 11+ is installed on your computer.
- GNOME or KDE desktop.
- 1024x768 minimum screen resolution.
Installing Oracle (Sun) JDK
Unlike in case of Java development, you do not need Java Software Development Kit (JDK) in your work. However, you need Java Runtime Environment (JRE) to run PHPStorm itself. Because JRE is included as a part in JDK, you need to have a JDK downloaded and installed on your computer.
You can use Open JDK but it does not guarantee high performance. Therefore it is suggested that you install Oracle (Sun) JDK 1.6 or higher. No doubt, you can do it in several ways. Below we will install it from a package in the Canonical repository.
Open the Terminal by choosing Applications | Accessories | Terminal on the main menu (Figure 1):
The Terminal opens (Figure 2):
Type the following command to access the
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" (1)
When asked, type your password (2) and procede with the following command:
sudo apt-get update (3)
When the system is through with reading the list of available packages (4), specify the packages to install:
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-jdk (5)
Then the system calculates the free space that will be used by the packages to be installed and asks you whether you want to continue. Click y to continue (6).
Accepting the License
The system displays an information message with the license agreement (Figure 3).
Use the Tab keyboard button to move the focus to OK (1) as shown in Figure 4:
Click OK (1) to pass to accepting the license (Figure 5):
Use the Tab keyboard button to switch the focus from No (1) to Yes (2), as shown in Figure 6):
Click Yes (1) to start package installation.
Checking the Installation
When the installation is completed, the terminal again shows the command line prompt. Let's check that we have a Java Virtual Machine installed (Figure 7). To do that, type the following command in the Terminal (1):
The system reports the Java version installed (2).
IntelliJ IDEA is available in two editions: Ultimate Edition and Community Edition. In this tutorial we will deal with the Community Edition, which is distributed for free and does not required any license. All we need to do is download and extract the IntelliJ IDEA archive.
In the browser of your choice, open the PHPStorm Download page (Figure 8):
Switch to the Linux tab (1) and click the Download (2) button. In the Opening PHPStorm tar,gz dialog box, that opens (Figure 9), choose the Open with Archive Manager option (1) and click OK (2).
The Download dialog box (Figure 10) shows the download progress:
Extracting the Downloaded Archive
When the download is completed, the Archive Manager opens (Figure 11) showing the downloaded archive (1). Click Extract (2).
The system displays the Extract dialog box (Figure 12) where we will specify the PHPStorm installation home, that is, the folder where it will be available from.
As you can see, by default the system suggests to extract the archive to the
/home/user/ directory. However it makes sense to have a separate folder for PHPStorm. Click the Create folder (1) button and specify the folder name, for example, PHPStorm. Figure 13 shows the Extract dialog box with a new folder PHPStorm added to the list:
Select the PHPStorm folder (1), choose the All files option (2) to have the entire archive extracted, and click Extract (3).
The system starts extracting the archive showing the progress in the dialog box (Figure 14):
When the extraction is completed, the dialog box (Figure 15) changes the appearance so you can choose what to do with the extracted files.
As we are going to start PHPStorm right now, let's open the extracted archive by clicking Show the files (1).
Now that we are through with extracting the archive, we can finally start PHPStorm. At the last step of the archive extraction, we decided to open the extracted archive. Let's examine what we have (Figure 16).
As you can see, the PHPStorm executable file
php.sh (1) is located in the
bin subfolder (2)
PhpStorm-111.296 (3) under
</nowiki>user</nowiki> (5), and
home (6) respectively. To launch the
phpstorm.sh, we need the Terminal.
Open the Terminal by choosing Applications | Accessories | Terminal and type the following commands in it (Figure 17):
(1) To switch to the
bin folder, type:
(2) To change the status of
phpstorm.sh so it can be executed, type:
chmod +x phpstorm.sh
(3) To run
The system displays the Enter License Data dialog box (Figure 18):
This tutorial supposes that you do not have a permanent license, so choose the Evaluate for free for 30 days option (1) and click OK (2).
Accept the license agreement (Figure 19) by selecting the Accept all terms of license (1) check box and click OK (2).
PHPStorm starts (Figure 20):
Congratulations! You have successfully downloaded and launched PHPStorm so your development environment is ready for your first PHPStorm project to start.