Notes on installing Apache, MySQL, and PHP on Ubuntu
Source: Internet
Author: User
Install Apache, MySQL, and PHP on Ubuntu-Linux Enterprise Application-Linux server application information. For more information, see below. Because of work needs, I want to see how the Html editor is implemented in WordPress and how it performs security operations on the server side, such as filtering javascript keywords in html, so I installed it on Ubuntu7.04 in my VM.
First of all, I use the new IDE software management tools, installed Apache2.2.3, MySQL5.0.38, libapache2-mod-php5 and php5-cgi (the two should be installed on the former is enough), put in the installation of these two don't need me to say it, haha, just follow the normal steps for the new IDE software management tool to install the software.
After installation, set the password for the root user of the MySQL database (empty by default)
Mysqladmin-u root password [newpassword]
Then use the root user to log in, create a new database, and add a new user with the ownership of the database operation. The command is as follows:
Mysql-u root-p [yourpassword]
> Create database wordpressdb;
> Grant all privileges on wordpressdb. * to [newusername] identified by "321456" with grant options;
> Exit;
Now that the database is ready, download WordPress2.2 (latest version) and decompress it to the Apache Web directory (after Apache is installed by default, create a www/directory under the/var/directory, copy the entire WordPress directory to the www directory, and the Administrator permission is required here), and then type http in the browser: // localhost/wordpress, page prompts did not find the wp-config.php file, followed to inside a look, the original he only has a wp-config-simple.php template, another, there is a readme.html file, you can first look at this file, then I know what's going on, so I will wp-config-simple.php corresponding place (in fact, as long as the general change three places, database name, access database user name and the password of the user name ), save as a wp-config.php file.
Refresh the previous page, and the following error occurs: Your PHP installation appears to be missing the MySQL which is required for WordPress ., at first, I thought WordPress couldn't find the data. I tried to modify the database and access the database to see if it was my data back name or the username was wrong, but it didn't seem like me. Then I asked my colleague, it turns out that PHP has missing a template for communicating with MySQL. No way. It's too time in English!
So I had to Google again, and finally found the name of this template on a foreign site: libapache2-mod-auth-mysql php5-mysql
Open the terminal and enter the command line (phpmyadmin is installed in the command line below to manage mysql, and others I prefer mysql query browser to operate MySQL databases ):
After the installation is complete, continue with the following operations:
Sudo gedit/etc/php5/apache2/php. ini
Find the line "; extension = mysql. so" and remove the semicolon, indicating that the module connected to MYSQL is loaded and saved when Apache is started.
Restart the Apache server:
Sudo/etc/init. d/apache2 restart
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service