There was nothing to be said about the installation. But in Linux it is easy to get a variety of problems. After I install it causes various problems
For example, PHP does not parse properly, the database cannot be closed, Apache cannot open, etc...
So make me more depressed, now the process to share under, we do not on the detours
Finally, in this order, to avoid problems
[Plain]View Plaincopy
- sudo apt-get install mysql-server-5.0
- sudo apt-get install apache2
- sudo apt-get install php5 libapache2-mod-php5
- sudo apt-get install Php5-mysql
- Sudo/etc/init.d/apache2 restart
Need to be able to install a phpmyadmin.
It is important to note that:
1. After the installation of the test can be normal to use
Vim test.php in the/var/www/html directory
Input
[PHP]View Plaincopy
- <?php
- Phpinfo ();
- ?>
Access to see if you can output PHP to relevant information
2.php after the installation is complete, the default does not support page output error message, which is inconvenient for our development process
[Plain]View Plaincopy
- sudo vim/etc/php5/apache2/php.ini
[PHP]View Plaincopy
- Display_errors
- Default Value:on
- Development Value:on
- Production Value:off
- error_reporting
- Default Value:e_all & ~e_notice & ~e_strict & ~e_deprecated
- Development Value:e_all
- Production Value:e_all & ~e_deprecated & ~e_strict
By removing the comments from the previous two paragraphs, you can display the error message.
[PHP]View Plaincopy
- warning:mysql_connect (): Access denied for User ' Root ' @ ' localhost ' (using Password:yes) in/ var /www/html/test2.php on line 2
- Failed
There's a hint.
If there is a problem, it is best to uninstall the appropriate to the service and reinstall and configure it.
There are some problems that I can't remember for the time being. Met can self-toss a bit.
Since pretending to be Ubuntu, love tossing