Reputation: 3044
I am learning PHP and I'm looking for the simplest way to run practice scripts. I already have netbeans installed.
Upvotes: 2
Views: 1745
Reputation: 2572
from synaptic or from terminal you need to install apache2, php5, phpmyadmin, mysql-server for working with php,then type http://localhost/ in browser it shows "it works"
"place your php scripts in /var/www folder with an extension of .php" like 'example.php', 'welcome.php'
Upvotes: 4
Reputation: 25445
Install LAMP: sudo apt-get install lamp-server^
(be sure to use the caret), it's a breeze (at least in Ubuntu 10.10). Installs Apache and mysql automatically.
Then open up NetBeans, set the root to the /var/www root folder and off you go!
I did it not much time ago and it took me 20 minutes in all (if you install phpmyadmin, be careful 'coz sometimes it creates a symlink in /usr/share instead of a link in the root /var/www, that took me most of the time to figure out)
Upvotes: 3
Reputation: 7585
sudo apt-get install php5-dev mysql-server apache2
password
hit [y]es
go to http://localhost/
write code in /var/www/
Upvotes: 2
Reputation: 17762
Install LAMPP: http://www.apachefriends.org/en/xampp-linux.html
It includes apache server, php, mysql, even phpmyadmin already bundled. Pretty easy to setup, just follow instructions.
Upvotes: 3