摘要: 原文:http://www.jb51.net/article/24392.htm Mysql优化: 建表时: 1.把ip地址存成unsigned int 2.固定长度的表会更快 固定长度的表会提高性能,因为MySQL搜寻得会更快一些,因为这些固定的长度是很容易计算下一个数据的偏移量的,所以读取的自然 阅读全文
posted @ 2017-04-19 11:25 shen1hua 阅读(153) 评论(0) 推荐(0) 编辑
摘要: config.php文件设置如下: return array( 'URL_MODE'=>0, 'DB_TYPE'=>'mysql', 'DB_HOST'=>'localhost,192.168.1.2',//两台数据库服务器 'DB_PORT'=>'3306', 'DB_NAME'=>'thinkp 阅读全文
posted @ 2017-04-16 18:43 shen1hua 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 百度百科的解释:约瑟夫环(约瑟夫问题)是一个数学的应用问题:已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列。通常解决这类问题时我们把编号从0~n 阅读全文
posted @ 2017-03-15 15:51 shen1hua 阅读(1659) 评论(0) 推荐(0) 编辑
摘要: merge合并表的要求 1.合并的表使用的必须是MyISAM引擎 2.表的结构必须一致,包括索引、字段类型、引擎和字符集 实例: create table if not exists user1( id int(11) not null auto_increment, name varchar(50 阅读全文
posted @ 2017-03-01 10:59 shen1hua 阅读(13285) 评论(3) 推荐(1) 编辑
摘要: 原文:http://blog.csdn.net/whatday/article/details/50659992 php-fpm在5.3.2版本以后不支持service php-fpm start等命令,如果想要支持这些命令可以做如下操作 我使用源码安装的php5.6.30 修改安装目录下的/www 阅读全文
posted @ 2017-02-21 15:02 shen1hua 阅读(1603) 评论(0) 推荐(0) 编辑
摘要: php为源码安装,安装目录为/www/php/,源码包目录为/www/software/php-5.6.30 首先,进入到源码包中扩展目录 /www/software/php-5.6.30/ext/pcntl 执行phpize /www/php/bin/phpize 编译 ./configure - 阅读全文
posted @ 2017-02-21 11:01 shen1hua 阅读(791) 评论(0) 推荐(0) 编辑
摘要: 参考博客:http://blog.csdn.net/yanzi1225627/article/details/49123659 服务器环境为:CentOS6.6 64位(虚拟机) 一.安装前准备 创建www目录,在www目录下创建software目录用来存储软件安装包 二.安装所有的依赖包 yum 阅读全文
posted @ 2017-02-20 16:19 shen1hua 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1.rabbitmq是有erlang开发的,所以首先要先安装erlang rpm -ivh erlang-18.1-1.el7.centos.x86_64.rpm rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch .rpm 安装rabbimq时提示依赖包soca 阅读全文
posted @ 2017-02-18 12:16 shen1hua 阅读(703) 评论(0) 推荐(0) 编辑
摘要: mysqldumpslow --help显示如下 Parse and summarize the MySQL slow query log. Options are --verbose verbose --debug debug --help write this text to standard 阅读全文
posted @ 2017-02-17 11:32 shen1hua 阅读(562) 评论(0) 推荐(0) 编辑
摘要: 修改/etc/my.cnf文件 在[mysqld]下面修改或添加配置(在别处不起作用) slow_query_log = on slow_query_log_file = /usr/local/mysql/data/slow-query.log long_query_time = 0.1 修改完后重 阅读全文
posted @ 2017-02-17 10:20 shen1hua 阅读(156) 评论(0) 推荐(0) 编辑