cd /application/apache/conf/
vim httpd.conf 修改98,132,378,396行
98 ServerName 127.0.0.1:80
132 <Directory"/application/apache2.2.31/html">
378 Include conf/extra/httpd-mpm.conf
396 Include conf/extra/httpd-vhosts.conf
cd /application/apache/conf/extraextra/
vim httpd-vhosts.conf
mkdir -p /home/iyunv.com/tools
cd /home/iyunv.com/tools
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure -prefix=/usr/local/libiconv
make
make install
cd ../
ll /application/mysql/data/
total 12
drwx------ 2 mysql root 4096 Nov 11 02:59 mysql
drwx------ 2 mysql mysql 4096 Nov 11 02:59performance_schema
drwxr-xr-x 2 mysql root 4096 Nov 11 02:53 test
初始化后要授权:
1
chown -R mysql.mysql /application/mysql/
4、启动数据库
1
2
3
4
\cp /application/mysql/support-files/my-small.cnf /etc/my.cnf
sed -i 's#/usr/local/mysql#/application/mysql#g' /application/mysql/bin/mysqld_safe
\cp /application/mysql/support-files/mysql.server /etc/init.d/mysqld
sed -i 's#/usr/local/mysql#/application/mysql#g' /etc/init.d/mysqld
创建数据库
mysql> create database wordpress;
Query OK, 1 row affected (0.07 sec)
授权
mysql> grant all on wordpress.* to wordpress@'localhost'identified by '123456';
Query OK, 0 rows affected (0.07 sec)
刷新
mysql> flush privileges;
Query OK, 0 rows affected (0.05 sec)
mysql> show grants for wordpress@'localhost';
+------------------------------------------------------------------------------------------------------------------+
| Grants for wordpress@localhost |
+------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'wordpress'@'localhost'IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |
| GRANT ALL PRIVILEGES ON `wordpress`.* TO 'wordpress'@'localhost' |
+------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.06 sec)
mysql> select user,host from mysql.user whereuser='wordpress';
+-----------+-----------+
| user |host |
+-----------+-----------+
| wordpress | localhost |
+-----------+-----------+
1 row in set (0.00 sec)
mysql> select user,host from mysql.user;
+-----------+-----------+
| user | host |
+-----------+-----------+
| root |127.0.0.1 |
| root |localhost |
| wordpress | localhost |
| root |web01 |
+-----------+-----------+
4 rows in set (0.00 sec)
切换到站点目录:
1
2
3
4
5
6
cd /application/apache/html/blog/
rz -y
tar xf wordpress-4.2.2-zh_CN.tar.gz
mv blog/* .
cd ../
chown -R www.www blog/