Friday, 28 October 2016

An IDE For PHP: Install PhpStorm on Ubuntu 15.10/16.04





For those of you who don’t know, PhpStorm is a cool, lightning-smart IDE for PHP developers. It’s a commercial and cross-platform product from Jetbrains and can run on Linux, Mac OS and Windows. This tutorial will explain how to install Phpstorm on Ubuntu15.10/16.04.
Install Oracle Java 8 on Ubuntu 15.10/16.04
Because phpstorm is a Java program, so first we need to install Oracle Java on Ubuntu and the latest stable version is Oracle Java 8. We’ll install it via a PPA.
Remove OpenJDK
sudo apt-get remove openjdk*
Add the PPA and install Oracle Java 8 with following 3 commands.
sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install java-common oracle-java8-installer
During the installation process you will need to accept the Oracle License agreement. Once installed we need to set Java environment variables such as JAVA_HOME on Ubuntu 15.10/16.04.
sudo apt-get install oracle-java8-set-default

source /etc/profile
The above two commands will set the correct Java environment variables.
Install phpstorm on Ubuntu 15.10/16.04
First go the official website and download the tar archive. If you like command line, you can use wget to download. The latest version is 2016.1.2 at the time of this writing. You may need to change the version number if you are reading this at a later time.
wget https://download-cf.jetbrains.com/webide/PhpStorm-2016.1.2.tar.gz
Once downloaded, open a terminal window and change your working directory to the download directory, then extract the .tar.gz file with this command:
tar xvf PhpStorm-2016.1.2.tar.gz
A new folder called PhpStorm-145.1616.3 will be created within the current working directory. It’s better to move this PhpStorm-145.1616.3 directory to /opt.
sudo mv PhpStorm-145.1616.3/ /opt/phpstorm/
Create a symlink
sudo ln -s /opt/phpstorm/bin/phpstorm.sh /usr/local/bin/phpstorm
Now type phpstorm in the terminal to launch the application.
phpstorm
If you are new to PhpStorm, select the second option and hit the OK button.

Read and agree the privacy policy. You won’t sign you life away.

If you are not ready to purchase a license to use PhpStorm, you can select the 30 day free trial option.

Accept the license agreement.

In the next window, select a theme, color, font and hit OK button.

Next, you need to enter your password to create a launch script and desktop entry.
After that’s done, you can start a new project in PhpStorm.

Next time, you can start PhpStorm from Unity Dash.

If for any reason you want to remove PhpStorm, simply delete /opt/phpstorm/ directory and all subdirectories and files in it.
sudo rm /opt/phpstorm/ -R
I hope this article helped you to install PhpStorm on Ubuntu 15.10/16.04. Comments, questions or suggestions are always welcome. If you found this post useful, ? please share it with your friends on social media! Stay tuned for more Linux tutorials.
Rate this tutorial

No comments:

Post a Comment