mv mysql-5.1.40-linux-x86_64-icc-glibc23 /usr/local/mysql
useradd -s /sbin/nologin mysql
cd /usr/local/mysql
mkdir -p /data/mysql
chown -R mysql:mysql /data/mysql
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
cp support-files/my-large.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
vim /etc/init.d/mysqld #修改datadir
chkconfig --add mysqld
chkconfig mysqld on
service mysqld start
2. 安装apache
tar zxvf httpd-2.2.31.tar.gz
cd httpd-2.2.16
./configure --prefix=/usr/local/apache2 --with-included-apr --with-pcre --enable-mods-shared=most
make && make install
tar zxvf wordpress-4.4-zh_CN.tar.gz
mv wordpress/* /data/blog/
在浏览器中打开网页测试:ip访问
创建数据库:
mysql -uroot -p
create database wordpress;
grant all privileges on wordpress.* to "word"@"%" identified by"nihaoword";
flush privileges;
exit
#这里要记下数据库名称: wordpress wordpress用户名: word hostname密码: nihaoword
然后按照网页中blog.test.com中,一步一步填写安装即可。