Install the LAMP component in Ubuntu 10.04:
System-> System Management-> New Software Package Manager-> edit-> use the task to mark the group software package-> LAMP Server (checked)-> OK-> finally "application" to complete the installation. During this period, you must enter the password of the Root account and remember it.
Enter http: // localhost/or http: // 127.0.0.1/in Firefox to display It works! It indicates that the LAMP package has been installed properly (more convenient than in Windows ).
Modify folder read/write permissions
The default location of the root directory of the PHP network server is/var/www. The default attribute only allows the root user to perform operations, but the root account is disabled in Ubuntu by default due to security considerations. To create and modify php and html files in this folder, you can use the terminal command line to modify this attribute of the folder:
Sudo chmod 777/var/www
Install phpmyadmin for Mysql Database Management
Phpmyadmin is the most commonly used Mysql database management software. It is written in php and www.linuxidc.com has a harmonious web interface. You can search for and install the software in the software center or the new software package manager.
During installation, You need to select Web Server, select apache2, and then enter the MySQL database connection password you set earlier.
Connect phpmyadmin and apache2 and test the connection. Run the following command on the terminal:
Sudo ln-s/usr/share/phpmyadmin/var/www
Open the browser and access http: // localhost/phpmyadmin. The welcome page is displayed. the user name is root and the password is the one you just set.
Install Eclipse and PDT
1. Install the Java Runtime Environment Jre/Jdk: search for "JDK" in the Ubuntu Software Center to install it;
2. Install plug-ins such as Eclipse and PDT: the Eclipse official website has packaged Eclipse for PHP Developers, which can be directly downloaded and decompressed;
3. Add the Eclipse shortcut in "application". Terminal command:
Sudo gedit/usr/share/applications/eclipse. desktop
Edit gedit and add the following content:
[Desktop Entry]
Encoding = UTF-8
Name = Eclipse
Comment = Eclipse IDE
Exec =/home/banux/eclipse
Icon =/home/banux/eclipse/icon. xpm
Terminal = false
StartupNotify = true
Type = Application
Categories = Application; Development;
The content after "Exec =" and "Icon =" is changed to the corresponding location for eclipse decompression;
4. It is recommended to set the Eclipse workspace location to "/var/www", so that php development can be performed normally in eclipse.
Create a PHP project in Eclipse and Test
Create a php file and enter the following php statements:
<? Php
Echo "LAMP is OK now ";
Phpinfo ();
?>
Save, Run, and Run all the results should be OK.