一切福田,不離方寸,從心而覓,感無不通。

Category Archives: Backend

Module ngx_http_proxy_module

Example Configuration Directives proxy_bind proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_bypass proxy_cache_convert_head proxy_cache_key proxy_cache_lock proxy_cache_lock_age proxy_cache_lock_timeout proxy_cache_max_range_offset proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_purge proxy_cache_revalidate proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_cookie_domain proxy_cookie_path proxy_force_ranges proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_http_version proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_limit_rate proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_next_upstream_timeout proxy_next_upstream_tries proxy_no_cache proxy_pass proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_request_buffering proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_certificate proxy_ssl_certificate_key proxy_ssl_ciphers proxy_ssl_crl proxy_ssl_name proxy_ssl_password_file proxy_ssl_server_name proxy_ssl_session_reuse proxy_ssl_protocols proxy_ssl_trusted_certificate proxy_ssl_verify proxy_ssl_verify_depth proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path Embedded Variables The ngx_http_proxy_module module allows passing requests to another server.   Example Configuration  

  Directives Syntax: proxy_bind […]

龙生   15 May 2017
View Details

Happy 15th Birthday .NET!

Today marks the 15th anniversary since .NET debuted to the world. On February 13th, 2002, the first version of .NET was released as part of Visual Studio.NET. It seems just like yesterday when Microsoft was building its “Next Generation Windows Services” and unleashed a new level of productivity with Visual Studio.NET. Since the beginning, the .NET platform has allowed developers to quickly build and deploy robust applications, starting with Windows desktop and web server applications in 2002. You got an entire managed framework for building distributed Windows applications, […]

龙生   15 May 2017
View Details

mysql c# Unable to convert MySQL date/time value to System.DateTime 错误

C#读取MySQL时,如果存在字段类型为date/datetime时的可能会出现以下问题 “Unable to convert MySQL date/time value to System.DateTime” 原因:可能是该字段(date/datetime)的值默认缺省值为:0000-00-00/0000-00-00 00:00:00,这样的数据读出来转换成System.DateTime时就会有问题; 解决办法: 1、将该字段的缺省值设置为null,而不是0000-00-00/0000-00-00 00:00:00的情况; 2、在链接MySQL的字符串中添加:Convert Zero Datetime=True 和 Allow Zero Datetime=True两个属性; 3、将该字段设置成字符串类型; 建议采用方法2,这样可以不用该数据库,也不用该c#代码 转自http://www.cnblogs.com/aeron/archive/2012/08/30/2663908.html

龙生   15 May 2017
View Details

Redis集群搭建与简单使用

介绍安装环境与版本 用两台虚拟机模拟6个节点,一台机器3个节点,创建出3 master、3 salve 环境。 redis 采用 redis-3.2.4 版本。 两台虚拟机都是 CentOS ,一台 CentOS6.5 (IP:192.168.31.245),一台 CentOS7(IP:192.168.31.210) 。 安装过程 1. 下载并解压 1 cd /root/software wget http://download.redis.io/releases/redis-3.2.4.tar.gz tar -zxvf redis-3.2.4.tar.gz 2. 编译安装 1 2 cd redis–3.2.4 make && make install 3. 将 redis-trib.rb 复制到 /usr/local/bin 目录下 1 2 cd src cp redis–trib.rb /usr/local/bin/ 4. 创建 Redis 节点 首先在 192.168.31.245 机器上 /root/software/redis-3.2.4 目录下创建 redis_cluster 目录; 1 mkdir redis_cluster 在 redis_cluster 目录下,创建名为7000、7001、7002的目录,并将 redis.conf 拷贝到这三个目录中 1 2 3 mkdir 7000 7001 7002<br>cp redis.conf redis_cluster/7000 cp redis.conf redis_cluster/7001 cp redis.conf redis_cluster/7002 分别修改这三个配置文件,修改如下内容 1 2 3 4 5 6 7 […]

龙生   15 May 2017
View Details

超强、超详细Redis数据库入门教程

这篇文章主要介绍了超强、超详细Redis入门教程,本文详细介绍了Redis数据库各个方面的知识,需要的朋友可以参考下 1、【redis是什么】 redis是一个开源的、使用C语言编写的、支持网络交互的、可基于内存也可持久化的Key-Value数据库。 redis的官网地址,非常好记,是redis.io。(特意查了一下,域名后缀io属于国家域名,是british Indian Ocean territory,即英属印度洋领地) 目前,Vmware在资助着redis项目的开发和维护。 2、【redis的作者何许人也】 开门见山,先看照片: 是不是出乎了你的意料,嗯,高手总会有些地方与众不同的。 这位便是redis的作者,他叫Salvatore Sanfilippo,来自意大利的西西里岛,现在居住在卡塔尼亚。目前供职于Pivotal公司。 他使用的网名是antirez,如果你有兴趣,可以去他的博客逛逛,地址是antirez.com,当然也可以去follow他的github,地址是http://github.com/antirez。 3、【谁在使用redis】 Blizzard、digg、stackoverflow、github、flickr … 4、【学会安装redis】 Redis可以到官方网站:http://www.redis.io/download下载 Win版下载地址:https://github.com/dmajkic/redis/downloads 从redis.io下载最新版redis-X.Y.Z.tar.gz后解压 解压Redis的tar包很简单: tar -zxvf redis-x.y.z.tar.gz 这样就在当前目录下新建了一个包含发行版源代码的目录,必须cd进入这个目录以继续服务器的编译。 然后进入redis-X.Y.Z文件夹后直接make即可,安装非常简单。 如果make失败,可能是没装装GCC,使用yum install gcc进行安装后再make 如果报错:error: jemalloc/jemalloc.h: No such file or directory,则需要指定MALLOC,如:make MALLOC=libc,这在README 有这个说明,说关于分配器allocator, 如果有MALLOC  这个 环境变量, 会用这个环境变量去建立Redis。而libc 并不是默认的 分配器, 默认的是 jemalloc, 但是如果你没有jemalloc 而只有 libc 当然 make 出错。 所以加这么一个参数,make MALLOC=libc make成功后会在src文件夹下生成几个可执行文件,分别是redis-server、redis-cli、redis-benchmark、redis-check-aof、redis-check-dump等: 复制代码代码如下: $ find . -type f -executable ./redis-benchmark //用于进行redis性能测试的工具 ./redis-check-dump //用于修复出问题的dump.rdb文件 ./redis-cli //redis的客户端 ./redis-server //redis的服务端 ./redis-check-aof //用于修复出问题的AOF文件 ./redis-sentinel //用于集群管理 然后可以使用make install进行安装,会将redis的指令添加到环境变量中,可在任何目录调用 4、【学会启动redis】 启动redis非常简单,直接./redis-server就可以启动服务端了,还可以用下面的方法指定要加载的配置文件,不指定时会加载默认配置文件: 复制代码代码如下: ./redis-server ../redis.conf 默认情况下,redis-server会以非daemon的方式来运行,且默认服务端口为6379。有关作者为什么选择6379作为默认端口,还有一段有趣的典故,英语好的同学可以看看作者这篇博文中的解释。 有关于配置文件的配置说明,详见下文。 一般修改的是:IP,端口,访问密码,日志存放路径,数据库存放路径,日志级别这些 测试启动 redis-cli ping […]

龙生   15 May 2017
View Details

windows 下安装配置mysql cluster

1、环境规划(我是在虚拟机环境下安装的) win03 192.168.2.57(管理节点,存储节点,sql节点) win03 192.168.2.56(存储节点,sql节点)   2、安装程序 在两台机器上面同时进行 第一步: 下载安装软件地址:https://edelivery.oracle.com/EPD/Search/handle_go 我的用的版本是MySQL Cluster 7.3.8 第二步: 管理节点安装时必须安装在c盘下,建议使用默认安装目录。如:C:\Program Files\MySQL\MySQL Cluster 7.3 非管理节点可安装在任意路径下 第三步: 安装mysql服务 在CMD命令行参数下: C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Cluster 7.3\bin C:\Program Files\MySQL\MySQL Cluster 7.3\bin>mysqld.exe --install mysql 第四步: 设置环境变量 3、创建管理节点配置文件 第一步: 创建config.ini文件,存放路径可任意存放 在c:\cluster\config.ini文件 内容为: [NDBD DEFAULT] NoOfReplicas=2   /*设置的节点个数*/ [NDB_MGMD] ID=1 hostname=192.168.2.57 datadir=c:\cluster\data #config storage nodeid [NDBD] ID=2 hostname=192.168.2.57 datadir=c:\cluster\ndbdata [NDBD] ID=3 hostname=192.168.2.56 datadir=C:\cluster\ndbdata #config SQL NODEID [MYSQLD] ID=4 hostname=192.168.2.57 [MYSQLD] ID=5 hostname=192.168.2.56 4、配置存储节点、SQL节点 第一步: 创建管理节点my.ini, 在安装路径下找一个my-default.ini文件,重命名为my.ini 如果将存储节点、SQL节点存放在同一台服务上,请在my.ini加入以下信息 建议在[mysqld]上方加入以下信息,此配置作用于存储节点挂载 [mysql_cluster] ndb-connectstring=192.168.2.57 在[mysqld]下加入,此配置作用于sql节点挂载 ndbcluster ndb-connectstring=192.168.2.57 #防止出现table is full错误 tmp_table_size = 1600M max_heap_table_size = 1600M […]

龙生   10 Oct 2016
View Details

windows 下 cannal & otter 配置

技术准备:下载相关组件和文档,下载地址:http://pan.baidu.com/s/1mgVIL5Y 电脑:最好准备两台以上机器进行测试; mysql数据库配置: [client] port=3306 [mysql] #如果不是修改成UTF8 default-character-set=UTF8 [mysqld] port=3306 #Path to installation directory. All paths are usually resolved relative to this. basedir="C:/Program Files/MySQL/MySQL Server 5.5/" #Path to the database root datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/" # The default character set that will be used when a new schema or table is #如果不是修改成UTF8 character-set-server=UTF8 # The default storage engine that will be used when create new tables when default-storage-engine=INNODB # Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" # connection limit has been reached. max_connections=100 query_cache_size=0 table_cache=256 tmp_table_size=35M thread_cache_size=8 myisam_max_sort_file_size=100G myisam_sort_buffer_size=69M […]

龙生   10 Oct 2016
View Details

迁移IIS其实很方便

迁移IIS其实很简单,拿IIS7以上举例,只需把C:\Windows\System32\inetsrv\config\applicationHost.config复制到新服务器,文件目录要求相同的。

龙生   10 Oct 2016
View Details

C# windows服务:如何检测指定的Windows服务是否启动

  from:http://www.cnblogs.com/lujin49/p/3527704.html

龙生   24 Sep 2016
View Details

C#windows service服务安装、注册、判断服务是否存在、是否启动

from:http://blog.csdn.net/smartsmile2012/article/details/8666635

龙生   24 Sep 2016
View Details
1 185 186 187 282