http://www.cnblogs.com/xiaofengkang/
About WordPress
WordPress is an open source, free blog ( blog ) engine developed using the php language and MySQL database, and users can support PHP and MySQL database on the server to build your own Blog. WordPress is a very powerful blog system , many plugins, easy to expand functionality. Installation and use are very convenient. At present, WordPress has become the mainstream Blog building platform.
Now we start to build our own blog:
1. First, you need to download WordPress (WordPress is currently the most popular PHP Blog program, the goal is aesthetics, WEB standards and ease of integration. It is based on the GPL license agreement and is completely free). :
http://wordpress.org/download/
2. Then install the necessary components of WordPress:
1) Install Apache server:
sudo apt-get install apache2
Open in Browser after installation: http://localhost/or http://127.0.0.1
If it works! appears, that proves OK.
2) Install PHP Service:
sudo apt-get install php5
Test:
Open Gksudo gedit/var/www/testphp.php
Then randomly enter something (I typed in kh) and save it.
Then enter http://127.0.0.1/testphp.php or http://localhost/testphp.php in the browser
If it shows what you're typing, it's a success.
3) Restart Apache server
Sudo/etc/init.d/apache2 restart
At this point the browser can parse the PHP file correctly.
4) Install the MySQL service:
sudo apt-get install Mysql-server
sudo apt-get install Mysql-admin
sudo apt-get install mysql-client
Prompt for the password of the database root user during installation
3. Create a new MySQL database for WordPress:
To open MySQL Manager under Terminal:
$mysql-U root-p
To create a new database:
Mysql>create DATABASE WordPress
4. Unzip the tar.gz compression pack of WordPress
$sudo TAR-ZXVF wordpress-3.2.1.tar.gz
Get the WordPress folder and then edit the wp-config.php file as required, mainly to provide the name of the database (such as WordPress here), user name (such as root), password (such as the password you typed when installing MySQL).
5. Copy the WordPress folder to the/var/www directory:
sudo cp-a./wordpress/var/www
At this point in the browser to access the http://localhost/wordpress/wp-admin/install.php, you will find the above described garbled. Let's first use phpMyAdmin to see what this garbled is all about.
6. Install phpMyAdmin:
sudo apt-get install phpMyAdmin
At this point the phpMyAdmin folder is installed under/usr/share/phpmyadmin, in order to be able to access the phpMyAdmin in the browser, you need to make a soft connection to the folder under/var/www:
Go to the/var/www folder and perform the following actions in this directory:
sudo ln-s/usr/share/phpmyadmin
When you type http://localhost/phpmyadmin in the browser, you see an error such as the following:
Cannot load MySQL extension. Please check your PHP configuration.
This is actually the above-mentioned garbled error.
Fortunately, phpMyAdmin also gives a solution to the problem:
7. So it is clear that we can install the Php-mysql package:
sudo apt-get install Php-mdb2-driver-mysql
8. Do not forget to restart Apache and MySQL after the installation is complete:
Sudo/etc/init.d/apache2 restart
Sudo/etc/init.d/mysql restart
Then you can access the http://localhost/wordpress/wp-admin/install.php and install WordPress normally.
Linux under WordPress installation