Php – Install Php In Linux and Create Development Environment


[rps-include post=6522]

As stated previous post Php is portable language. Which makes Php supports a lot of different platforms. In this post we will look how to install Php and IDE named Eclipse in Linux operating system like Fedora and Ubuntu. During post we will give both Fedora or yum and Ubuntu apt instructions. Let’s start the installation process.

Fedora, CentOS, RedHat Installation

In this part we assume we have all ready installed Fedora. We will install Php or Php interpreter and Eclipse.

Install Php

We will install Php with the command line package management tool named yum . We will issue following command in order to install Php interpreter and core libraries.

$ sudo yum install php
Install Php
Install Php

Install Eclipse

Next step is installing Eclipse we will install Eclipse Php .

$ sudo yum install eclipse-pdt.noarch -y
Install Eclipse
Install Eclipse

Ubuntu, Debian, Mint Installation

Install Php

We will install Php on ubuntu with the following command.

$ apt install php

Install Eclipse

We will install Eclipse on Ubuntu from following  url and unzip files.

http://eclipse.org/pdt/

Alternative IDE Nano or Text Editor

Another way to write Php code is using simple operating system provided text editor or third party editor. We will use nano as terminal based editor in this example.

Ubuntu, Debian, Mint

$ apt install nano

Fedora, CentOS, RedHat

$ yum install nano

Now create file named index.php with the following command.

$ nano index.php

and add following lines to the file.

<?php

echo "Hello World";

?>

Simply run Php interpreter by providing the code file named like below. We will run php against index.php

$ php index.php

[rps-include post=6522]

LEARN MORE  How To Update Eclipse and Plugins

2 thoughts on “Php – Install Php In Linux and Create Development Environment”

  1. Woah! I’m really loving the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between usability and appearance.
    I must say you have done a excellent job with this.
    Additionally, the blog loads super quick for me
    on Internet explorer. Superb Blog!

    Reply

Leave a Reply to https://thuocgiammobung.webflow.io/ Cancel reply