分类: 系统运维
2011-06-03 10:54:15
1.wordpress 安装
yum install httpd php php-gd php-mysql mysql-server mysql-client
修改/etc/apache2/httpd.conf:
找到DirectoryIndex 修改成如下;
DirectoryIndex index.php index.php3 index.html index.htm index.shtml index.cgi
接着找到如下2行
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
然后在下面添加如下2段:
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps
保存退出。
重起apache:
在/var/www/下建立一个文件index.php里面写入:
phpinfo(); ?>
2,修改mysql密码:
#mysqladmin password 123456
登陆mysql:
#mysql -u root -p
3.建立数据库
mysql> create database wordpress;
4.建立wordpress用户
mysql> grant all on wordpress.* to wordpress@localhost identified by 'portalhuan.123';
5.刷新privileges.
mysql>flush privileges;
6.下载wordpress最新版本,将解压出来的wordpress目录下的文件复制到/var/www/目录下。:
进如wordpress目录
将wp-config-sample.php改名为wp-config.php.
用vim打开wp-config.php,输入数据库信息。
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
将解压出来的wordpress目录下的文件复制到/var/www/目录下,(不包括wordpress目录)
7.安装
用浏览器打开
8.安装wordpress插件
解压插件 把插件拷贝到wordpress/wp-content/plugins目录下 即可
推荐2个插件:accessqontrol插件控制访问首页 si-captcha-for-wordpress添加登陆验证码插件。