1. Environment preparation
# yum Install httpd php mysql mysql-server php-mysql==>yum Installing PHP is run as a module
MySQL Connection tool for Clinet
php-mysql connection components for PHP and MySQL
# chkconfig Mysqld on
# chkconfig httpd on
# service httpd start
# service Mysqld start
2. New database and user-permitted authorization
mysql> Create database cm;==> new cm data
mysql> Grant all on cm.* to ' cm ' @ ' localhost ' identified by ' cmpass ';==> Create user and grant cm to cm library all permissions
mysql> flush Privileges;==> Let permissions take effect immediately
3. Test data connection
# vim/var/www/html/
index.php<?php$conn = mysql_connect (' local ', ' cm ', ' cmpass ');if ($conn)echo "SUCC";Elseecho "Failure";Mysql_close ();? >
data address, connection successful
4. InstallationWordPress
download WordPress Unzip, move files to/var/www/html directory
Create a WordPress site