最近想在内部搭建一个wordpress博客用用,本身对php、apache不熟悉,整个搭建还是比较简单的。
1.安装mysql
wget
To install and use a MySQL binary distribution, the basic command
sequence looks like this:
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
2.安装apache
tar -zxvf httpd-2.0.64.tar.gz
mv httpd-2.0.64 apache
cd apache/
./configure --enable-rewrite --prefix=/home/web/app/apache
make ; make install
3.安装php
tar -zxvf php-5.5.0.tar.gz
mv php-5.5.0 php
./configure --prefix=/home/web/app/php --with-apxs2=/home/web/app/apache/bin/apxs --with-mysql=/home/web/app/mysql
make ; make install
4.配置
4.1 vi /etc/hosts
10.230.1.200 wjlcn
4.2 vi httpd.conf
ServerName :80
DirectoryIndex index.php index.html index.html.var
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
(这部分的配置,以及前面php安装 可以参考 php目录下的 INSTALL 文件)
4.3
unzip wordpress-3.5.2-zh_CN.zip
mv wordpress 至 htdocs
4.4
create database wjlcnblog;
grant all privileges on wjlcnblog.* to wjlcn@'%' identified by 'wjlcn';
运行,按照wordpress的提示一步步配置即可。
阅读(1290) | 评论(0) | 转发(0) |