WordPress数据库错误: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `wp_options`

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (45) ORDER BY t.name ASC

Apache+Mysql+PHP修改精简版 – Crazy knowledge base
Crazy knowledge base

Apache+Mysql+PHP修改精简版

安装步骤:

tar zxvf mysql-5.0.22.tar.gz
cd mysql-5.0.22

groupadd mysql  新建mysql组
useradd -g mysql mysql 新建mysql用户并且加入到Mysql组

./configure –prefix=/usr/local/mysql

make

make install

#prefix=/usr/local/mysql mysql安装的目标目录

 

编译安装完成以后设主配置文件
cp support-files/my-medium.cnf /etc/my.cnf 复制MYSQL主配置文件

设置自启动
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700 /etc/rc.d/init.d/mysqld
# chkconfig –add mysqld

安装完以后要初始化数据库,当然你是升级的话不用做这步;

# cd /usr/local/mysql
# /usr/local/mysql/bin/mysql_install_db –user=mysql
# chown -R root .
# chown -R mysql:mysql /var/lib/mysql
# chgrp -R /var/lib/mysql .

然后我启动mysql

# /usr/local/mysql/bin/mysqld_safe –user=mysql &  (后台启动MYSQL守护进程)

好了,至此mysql安装完毕,你可以这样起动你的mysql服务
# /etc/rc.d/init.d/mysqld start 

下面创建MYSQL管理命令
# ln -s /usr/local/mysql/bin/mysql /sbin/mysql 
# ln -s /usr/local/mysql/bin/mysqladmin /sbin/mysqladmin 

为了能让系统找到mysql,请运行如下命令
# PATH=$PATH:/usr/local/mysql/bin
# export PATH
# echo “/usr/local/mysql/lib/mysql” >> /etc/ld.so.conf
# ldconfig
完成这步就可以使用 Service myqld restart命令

日志管理
开启错误日志 (在[safe_mysqld]项下添加)
# vi /etc/my.cnf
[safe_mysqld]
err-log=/var/log/mysqld/err.log

开启常规日志和更新日志 (在[mysqld]项下添加) 
# vi /etc/my.cnf
[mysqld]
log=/var/log/mysqld/log.log
log-update=/var/log/mysqld/update.log

创建日志文件并设置权限
# mkdir /var/log/mysqld
# touch /var/log/mysqld/err.log /var/log/mysqld/log.log /var/log/mysqld/update.log
# chown -R mysql.mysql /var/log/mysqld 

# service mysqld restart 

说明:
错误日志包含了服务器写入标准错误输出设备的所有消息,同时还包括了mysql服务的启动和关闭事件
常规日志用来记录有关mysql服务器运行的常规信息,包括用户的连接、查询及其他各种时间
更新日志用来记录修改数据库的查询信息,包括所有涉及数据库修改的SQl语句的查询记录
建议调试结束后关闭日志
 

2.安装httpd
tar zvxf httpd-2.2.8.tar.gz
cd httpd-2.2.8
修改include/httpd.h 增大最大线程数
vi include/httpd.h
找到DEFAULT_KEEPALIVE 100
?define DEFAULT_KEEPALIVE 100
在这段下面加上一段
#ifndef HARD_SERVER_LIMIT
#define HARD_SERVER_LIMIT 1500
#endif

保存退出编译apache

./configure –prefix=/usr/local/apache –enable-module=so –enable-module=rewrite –enable-shared=max
make
make install

#这里我们通过enable-module参数告诉设置脚本,我们需要启动so和rewrite模块,so模块是用来提DSO支持的apache核心模块,而rewrite模块则是用意实现地址重写的模块,由于rewrite模块需要DBM支持,如果在初次安装时没有编译进apache,以后需要用到时需要重新编译整个apache才可以实现。为此除非你可以确定以后不会用到rewrite模块,否则还是建议你在第一次编译的时候把rewrite模块编译好。

enable-shared=max 这个参数的作用时编译apache时,把除了so以外的所有apache的标准模块都编译成DSO模块。而不是编译进apache核心内。

设置自启动
# cp support/apachectl /etc/init.d/httpd
修改/etc/init.d/httpd
# vi /etc/init.d/httpd(在第两行之后添加如下内容)
#!/bin/sh 

# Startup script for the Apache Web Server 
# chkconfig: – 85 15 
# description: Apache is a World Wide Web server. It is used to serve \ 
# HTML files and CGI. 
# processname: httpd 
# pidfile: /usr/local/apache/log/httpd.pid 
# config: /usr/local/apache/conf/httpd.conf

# chkconfig –add httpd
# chmod 755 /etc/init.d/httpd 
# chkconfig httpd on 

创建网页根目录
# mkdir /var/www

# vi /usr/local/apache/conf/httpd.conf
//存放网页的目录,原来为DocumentRoot “”,改成:
DocumentRoot “/var/www”
//这句应该和DocumentRoot 的目录保持一致,原来为<Directory “”>;,改成:
<Directory “/var/www”>;
//Indexes:当在目录中找不到DirectoryIndex列表中指定的文件就生成当前目录的文件列表
//FollowSymlinks:允许符号链接跟随,访问不在本目录下的文件
Options Indexes FollowSymLinks
//禁止读取.htaccess配置文件的内容
AllowOverride None
//指定先执行Allow(允许)访问规则,再执行Deny(拒绝)访问规则
Order allow,deny
//设置Allow(允许)访问规则,允许所有连接
Allow from all
</Directory>;

执行命令 /usr/local/apache/bin/httpd -l检查编译进来的模块有哪些。最主要的是mod_so模块。即下面最后一个mod_so.c。这样做的目的是为了以模块方式加载php.

启动apache
/usr/local/apache/bin/apachectl start

 

3.安装php-5.2.5

软件获取:http://www.php.net/downloads.php

tar zvxf php-5.2.5.tar.gz
cd php-5.2.5

./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql –enable-force-cgi-redirect –with-freetype-dir=/usr –with-png-dir=/usr –with-gd –enable-gd-native-ttf –with-ttf –with-gdbm –with-gettext –with-iconv –with-jpeg-dir=/usr –with-zlib –with-xmlrpc –enable-calendar –with-apxs2=/usr/local/apache/bin/apxs

make
make install
 
#这里由于服务器需要用到GD库,所以加了一些支持GD的编译参数 ,GD直接用了redhat自带的GD库,大家没有安装的话可以从安装盘安装,注意除了安装GD以外,还要安装libjpeg,libpng等库文件。另外–with-mysql=/usr/local/mysql指向你安装mysql的路径。–with-apxs指向apache的apxs文件的路径。在配置过程中,除了指定安装目录外,还有-with-apxs2和-with-mysql这两个选项。-with-apxs2的作用是与 apache的工具apxs配合,产生模块文件到目录/usr/local/apache/modules/,同时在apache的配置文件中写入一行 “LoadModule php5_module        modules/libphp5.so”;

vi /usr/local/apache/conf/httpd.conf
找到#AddType application 这行,在下面加两行。
AddType application/x-httpd-php .php 
AddType application/x-httpd-php-source .phps
找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php 
DirectoryIndex index.html index.html.var index.php 
注意:改变了http.conf后,要重启apache服务器,否则不会生效

 

然CPOPY PHP的配置文件
cp php.ini-dist /usr/local/php/lib/php.ini

修改php.ini文件
register_globals = On

检查一下apache配置文件是否正确(/usr/local/apache/bin/apachectl -t),输出”Syntax OK”后就可以启动
ok!重新启动一下apache服务器
/usr/local/apache/bin/apachectl restart
然后在/var/www目录下写个php测试页info.php:内容如下

<?php
phpinfo();
?>

 

Apache+Mysql+PHP修改精简版

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (44) ORDER BY t.name ASC

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (48) ORDER BY t.name ASC

滚动到顶部