ITeye博客

飞奔的熊猫

飞奔的熊猫 · 共 118 篇文章

redis - 密码管理

【基本介绍】 给redis添加密码认证 【基本配置】 总共2个步骤: a.在配置文件中有个参数: requirepass 这个就是配置redis访问密码的参数。 比如 requirepass test123 b.配置文件中参数生效需要重启重启redis 。 【连接验证】 [root@localhost redis]# redis-cli -p 6379 -a test123 redis 127.0.0.1:6379> config get requirepass 1) "requirepass" 2) "test123" redis 127.0.0.1:6379> 【参考引用】 http:/…

2015-02-27 10:39 · cached · 评论(0)

redis - phpredisadmin

【基本介绍】 这里介绍安装redis查看工具phpredisadmin 【基本按照】 phpRedisAdmin: https://github.com/ErikDubbelboer/phpRedisAdmin predis https://github.com/nrk/predis 0.前提 php安装redis模块,并且webserver支持php 1.安装 git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git cd phpRedisAdmin/ cat README.markdown git submodule in…

2015-01-21 17:14 · cached · 评论(0)

mysql - 修改密码

【基本情况】 这里介绍mysql数据库修改密码 【常见方法】 1.数据库中修改 mysql -u root -p 回车 输入密码 mysql> user mysql mysql> select user,password from user; #查看密码 #可以看到密码41位,直接修改此表不为上策,但是可以通过函数计算密码来修改 mysql> select PASSWORD('abc'); #然后根据具体的条件把密码修改为算出来的值,可要小心哦。 2.命令行中修改 mysqladmin -u root -p PASSWORD yourpassword 回车 输入原来的密码 SET PASSW…

2015-01-16 12:12 · MySQL · 评论(0)

mysql grant - 权限授权

【基本介绍】 这里介绍mysql权限授权 【授权情况】 grant 权限 on 数据库对象 to 用户 grant select on testdb.* to common_user@'%' grant select on testdb.* to common_user@'192.168.0.%'; grant select, insert, update, delete on testdb.* to common_user@'%' grant select on *.* to dba@localhost; -- dba 可以查询 MySQL 中所有数据库中的表。 grant all on …

2015-01-16 12:04 · MySQL · 评论(0)

SVN - 获得最新的更新目录

【基本介绍】 想或者指定的svn tag路径下面最新的版本文件,然后就可以执行下载等其他后续操作。 【解决方案】 svn log可以打印出所有的更新信息,版本,作者,时间等 svn log -v 可以更加详细的打印出,更新了哪些文件等 这样就可以直接获得最后更新的文件路径及版本文件。 svn log -v svn://server | awk '/^ A/ { print $2 }' | grep -v RC | head -1 [root@xx ~]# svn log -v svn://servers/tags | awk '/^ A/ { print $2 }' | grep -v RC…

2015-01-12 15:32 · SVN · 评论(0)

linux shell - 远端修改非root密码

【基本介绍】 通过远端修改普通用户密码,而passwd --stdin , chpasswd都不许要root权限。 【方法介绍】 在要修改密码的机器上准备一个脚本 [root@bogon ~]# cat test.sh passwd <<EOF $1 $2 $2 EOF 然后在远端调用脚本 [root@bogon ~]# ssh test@192.168.243.169 "/bin/bash /home/test/test.sh oldpass newpass" 【其他方法】 - 有root权限 echo <newpasswd> | passwd --stdin <username> ech…

2015-01-09 20:40 · Linux · 评论(0)

linux shell - broken pip error

【基本介绍】 这里我们介绍发生broken pipe错误的原因以及解决方案。 【broken pip error】 例如:svn log svn://xxxx | head -10 这样bash在执行的svn log svn://xxxx的时候起一个线程1,在执行head -10的时候起一个线程2。两个线程同时运行。线程2读到第10行的时候退出,然后关闭管道。但是线程1还在跑,继续往管道里面写数据,但是相对应的线程2的管道已经关闭,所以抛出write error: broken pipe. 【解决方案】 对抛出的异常信号进行特殊处理 先不用管道,把内容先写到临时文件后在处理 【参考引用】 h…

2015-01-07 15:36 · Linux · 评论(0)

php - phpMyAdmin adminer

【基本介绍】 这里我们来安装phpMyAdmin软件来查看数据库。 【软件安装】 php + webserver 省略 直接下载phpMyAdmin放在webserver的根目录下面。 http://sourceforge.net/projects/phpmyadmin/?source=typ_redirect 【phpMyAdmin配置】 修改phpmyadmin目录中libraries文件夹下的config.default.php文件 1、查找$cfg ,将其值设置为http://mysqlserver/phpmyadmin 2、查找$cfg , 将其值设置为mysqlserver_id…

2015-01-07 11:20 · php · 评论(0)

SVN - 文件图标不显示

【基本介绍】 svn checkout之后文件上面没有勾号等图标显示 【解决】 对于SVN来说,因为每个图标都代表着不同的含义,预示着不同的状态,是指示灯的作用,如果没有正确的图标很可能造成数据的丢失等。 系统重启后可能解决 按照参考引用里面的方法在注册表里面查看 【参考引用】 http://blog.csdn.net/lishehe/article/details/8257545

2015-01-04 16:02 · SVN · 评论(0)

Docker - nsenter

【基本介绍】 这里我们介绍docker的nsenter命令安装和使用。在大多数Linux发行版中,util-linux包中含有nsenter. nsenter - run program with namespaces of other processes 【安装】 源码安装 $ wget https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz; tar xzvf util-linux-2.24.tar.gz $ cd util-linux-2.24 $ ./configure --with…

2014-12-31 10:44 · Docker · 评论(0)

linux locate - find files by name

【基本介绍】 这里我们介绍locate命令,用来查找文件。 【安装配置】 安装mlocate yum install mlocate 生成db数据文件 [root@root ~]# updatedb [root@root ~]# ls /var/lib/mlocate/mlocate.db /var/lib/mlocate/mlocate.db 用locate进行查找 [root@root tmp]# locate 6385.conf /etc/redis/6385.conf 【参考引用】 https://www.digitalocean.com/community/tutorials/ho…

2014-12-17 17:46 · Linux · 评论(0)

apache speling_module - URL忽略大小写

【基本介绍】 这里我们介绍apache的speling_module模块,该模块支持URL忽略大小写。windows端大小写不敏感,linux端大小写敏感。 【speling_module】 检查是否有speling_module模块 [root@xxmodules]# ls -ld /etc/httpd/modules/mod_speling.so -rwxr-xr-x. 1 root root 14608 Jul 23 22:18 /etc/httpd/modules/mod_speling.so 检查是否已经加载speling_module模块 LoadModule speling_m…

2014-12-17 14:38 · webs · 评论(0)

apache 主服务器部署 - 容器

【基本介绍】 这里介绍apache主服务配置文件httpd.conf中的容器部分。 它以<容器名>开头</容器名>为结束的样式来对指令进行封装,指令的作用域在容器里面。 【容器介绍】 IfModule 容器作用于模块,它会判断模块是否载入,然后再决定是否进行处理,只有在判断结果为真时才会执行容器内的指令,相反如果为假,则会全部忽略。 例如: 如果载入了dir_module模块那么执行里面的指令 <IfModule dir_module> DirectoryIndex index.html <IfModule> IfDefine 与IfModule类似,判断为真时执行指令,但是它需要在http…

2014-12-15 17:37 · webs · 评论(0)

cacti 错误集 - 无法登入

【基本介绍】 具体表现是在index.php页面,及时输入正确的用户名和密码,还是在index.php页面而无法进入。 【问题解决】 原因由于是php的session问题,无法读取php的session导致无法读取session信息而进入到内容显示页面。 php的session路径可以查看php.ini配置session.save_path,然后查看允许cacti的用户是否有权限进入session目录。

2014-12-15 11:08 · cacti · 评论(0)

apache 主服务器部署 - 指令

【基本介绍】 这里介绍apache主服务配置文件httpd.conf中的指令部分。 【指令介绍】 ServerName ServerName用来定义Apache默认主机名,这个指令在httpd.conf中默认被注释掉,因此要启动它。 eg: ServerName www.example.com 或者 ServerName 127.0.0.1 如果启动apache的时候会报错: httpd:Could not reliably detemine the server's full qualified domain name , using 127.0.0.1 for ServerName 原因…

2014-12-12 16:31 · webs · 评论(0)