[nodeJS]redis设置密码及nodejs带密码连接
redis 默认不需要密码即可访问,黑客直接访问即可获取数据库中所有信息,造成严重的信息泄露。 修复方案: 1、绑定需要访问数据库的IP 修改 redis.conf 中的 “bind 127.0.0.1” ,改成需要访问此数据库的IP地址。 2、设置访问密码 在 redis.conf 中找到“requirepass”字段,在后面填上你需要的密码。 注:上述两种方法修改后,需要重启redis才能生效。 nodejs带密码连接:(片段) args = [port, host, {auth_pass:pass}]; app....标签: nodeJS
[ubuntu]ubuntu 12.04 install redis
1.Install redis $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz $ tar xzf redis-2.8.3.tar.gz $ cd redis-2.8.3 $ make $ sudo make install #These files are put in /usr/local/bin now. 2.Copy some files important # cp ...[nodeJS]ubuntu Nodejs和npm的安装
一.NodeJs安装 1.下载nodejs源码,这是目前最新版本 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz 首先确保系统安装来python,gcc,g++,如果没有则安装: $ sudo apt-get install python $ sudo apt-get install build-essential $ sudo apt-get install gcc $ sudo apt-get install g++ 2.解压...标签: nodeJS
[nodeJS]mysql.pool must release connection
/* In nodejs. While processing database by pool, don't forget release the connection. */ var pool = app.mysql.pool; ...标签: nodeJS
日历
最新微语
- Watching the autumn leaves falling as you grow older together
2018-10-25 09:45
- 时间不可以倒流,但空间可以
2017-08-01 09:03
- 含羞草、电磁炮;汽车工业革命
2017-05-23 22:51
- 那个点子页面加几点:
去中心化的物联网通信协议
2017-05-09 22:13
- 有一种人怀疑阴阳的存在,另有一种人会怀疑1+1=2的正确性……
2017-03-01 17:08
分类
最新评论
- 萧
@Fluzak:The web host... - Fluzak
Nice blog here! Also... - Albertarive
In my opinion you co... - ChesterHep
What does it plan? - ChesterHep
No, opposite. - mojoheadz
Everything is OK!... - Josephmaigh
I just want to say t... - ChesterHep
What good topic - AnthonyBub
Certainly, never it ... - DavidNed
I think, that you ar...