启动apache时提示如下:

[root@localhost httpd-2.2.4]# /usr/local/apache/bin/apachectl start
Syntax error on line 95 of /usr/local/apache/conf/extra/httpd-vhosts.conf:
Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

本日志由 flyinweb 于 2009-10-30 17:59:44 发表到 WEB服务器 中,目前已经被浏览 4742 次,评论 0 次;

作者添加了以下标签: Headerenable-headersApache modulesapxs

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

**********************************************************
第一部分, 在一台服务器构建多mysql 服务.
**********************************************************

一,绪言
在Mysql中有一mysqld_multi命令,可用于在一台物理服务器运行多个Mysql服务,今天参考一些文档,亲自测试并通过,真高兴,现将操作过程共享给大家!
操作系统:Linux 2.6.13 (Slackware),其它版的Linux应该也差不多.
数据库:Mysql  4.0.17 源程序安装(相信最新的5.1.*也差不多,过些天再试试)
规划:运行4个mysql服务:
假设服务器名:db-app  (IP为192.168.0.100),
假设服务器名:db-app2  (IP为192.168.0.101),
下文直到第二部分,均为讲述db-app中的mysql,

本日志由 flyinweb 于 2009-10-29 12:48:35 发表到 数据库技术 中,目前已经被浏览 3815 次,评论 0 次;

作者添加了以下标签: mysql 主从复制

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

  大家都知道在现实的生活中,我们每个人都有属于自己的一个ID号--身份证号码,你可以去派出所把你的姓名改了,但是你的身份证号却不能随着你自己的 姓名更改而更改。在网络世界中,我们常常可以听到IP地址的概念,不过MAC地址这个专业术语却很少被人提起,我们往往只知道IP地址,而MAC地址则是 幕后英雄。正如我们在日常交流的时候,常常叫别人的姓名而不会去称呼别人的身份证号道理是一样的。

本日志由 flyinweb 于 2009-10-29 10:41:14 发表到 技术文摘 中,目前已经被浏览 4056 次,评论 0 次;

作者添加了以下标签: MAC

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

         这两天一直在配置mysql数据库的多主一从的配置。其实现的思路是利用一个数据库启动两个实例(通过mysqld_multi),而这两个实例指向同一个数据库文件目录。但是配置过程中需要注意很多地方。

本日志由 flyinweb 于 2009-10-29 09:11:41 发表到 数据库技术 中,目前已经被浏览 9240 次,评论 4 次;

作者添加了以下标签: 多主一从复制同步

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

load.sh   文本文件  导入表名

  1. #!/bin/ksh  
  2. echo $1 $2  
  3. cat $1|wc -l>>file.txt  
  4. #按每10000条记录分割一个文件  
  5. split -l 10000 $1 $2_  
  6. ls $2_* >file2.txt  
  7. for i in `cat file2.txt`  
  8. do  
  9.     # 数据库被置为无日志状态时,SQL语句不用加事务.  
  10.     echo "begin work;load from $i insert into $2;commit work;">file3.sql  
  11.     dbaccess  dbsname file3.sql  
  12.     rm -rf $i  
  13. done  
  14.  
  15. #比较导入文本记录与导入后的记录数是否一致  
  16. echo "select count(*) from $2;" >count.sql  
  17. dbaccess dbsname count.sql>>file.txt   
  18.  
  19. #rm temp file  
  20. rm -f file2.txt count.sql file3.sql 

本日志由 flyinweb 于 2009-10-28 10:35:38 发表到 数据库技术 中,目前已经被浏览 4204 次,评论 0 次;

作者添加了以下标签: INFORMIX分割导入大数据量文件

在数据库没有做update statistics前,systables表里各表记录数与实际表记录数差别比较大,这种情况下可以通过以下方法统计各表的记录数.
脚本如下:

  1. #!/bin/ksh  
  2. if [ $# -ne 1 ];then  
  3.     cat << EOF 
  4.         Usage: $0 dbsname  
  5. EOF  
  6.     exit 1  
  7. fi  
  8.  
  9. dbsname="$1" #数据库名  
  10.  
  11. echo "unload to tables.txt  
  12. select tabname from systables where tabname not like 'sys%' and tabname not like ' %' and tabtype='T';">tables.sql  
  13. dbaccess $dbsname tables.sql 2>/dev/null  
  14. cat tables.txt|awk -F"|" '{print $1}'>tables2.txt  
  15. for i in `cat tables2.txt`  
  16.     do  
  17.         #统计数据库表记录数  
  18.         echo "unload to count.txt select \"$i\"||\"\",count(*) from $i;">file.sql  
  19.         dbaccess $dbsname file.sql  
  20.         cat count.txt>>total.txt  
  21.         rm count.txt  
  22.         rm -rf file.sql  
  23. done  
  24. rm -f tables2.txt tables.sql 

本日志由 flyinweb 于 2009-10-28 10:25:21 发表到 数据库技术 中,目前已经被浏览 3693 次,评论 0 次;

作者添加了以下标签: 统计Informix表记录数

/dev/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux.

shm / shmfs is also known as tmpfs, which is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but one which uses virtual memory instead of a persistent storage device.

If you type mount command you will see /dev/shm as a tempfs file system. Therefore, it is a file system, which keeps all files in virtual memory. Everything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost. By default almost all Linux distros configured to use /dev/shm.

本日志由 flyinweb 于 2009-10-27 10:53:43 发表到 Linux 中,目前已经被浏览 3977 次,评论 0 次;

作者添加了以下标签: /dev/shm

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Problem Statement

By default, CentOS installer creates a very large tmpfs (/dev/shm) filesystem. In fact, it is likely that if you have 4GB of RAM, the default tmpfs filesystem will take approximately 2GB.

本日志由 flyinweb 于 2009-10-27 10:51:51 发表到 Linux 中,目前已经被浏览 3898 次,评论 0 次;

作者添加了以下标签: tmpfs

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

351/5