redis 批量删除数据

redis在cli里不能直接操作。批量删除gameRankData_DGJD开始的keys需要: 1 ./redis-cli -n 0 keys "gameRankData_DGJD*"|xargs ./redis-cli -n 0 del

MySQL生成随机时间

随机生成2014/05/01到现在的时间 1 SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('20140501000000') + ROUND(RAND()*(UNIX_TIMESTAMP() - UNIX_TIMESTAMP('20140501000000'))));

grep 匹配行和前后行显示

grep 检索显示匹配行以及前后行 info.txt里检索KEY,显示KEY的后10行。 1 grep -A 10 'KEY' info.txt info.txt里检索KEY,显示KEY的前10行

Wordpress缺少MySQL扩展

访问wordpress时提示:鎮ㄧ殑 PHP 浼间箮娌℃湁瀹夎杩愯 WordPress 鎵€蹇呴渶鐨 MySQL 鎵╁睍銆 这是在说:您的 PHP 似乎没有安装运行 WordPress 所必需的 MySQL 扩展 可以w

Centos 编译安装Git(git clone git push git pull 401错误)

低版本时osc git clone git pull git push 会报401错误 1、准备工作 1 2 yum install curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel 2、下载git 去下载页面 下载 1 wget https://git-core.googlecode.com/files/git-1.9.0.tar.gz 3、解压安装 1 2 3 4 5 6 7 8

Centos6.3 yum方式安装nginx

1、软件包管理 1 rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm CentOS 5,就用下面的源: 1 rpm -ivh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm Red Hat Enterprise Linux 6: 1 rpm -ivh http://nginx.org/packages/rhel/6/noarch/RPMS/nginx-release-rhel-6-0.el6.ngx.noarch.rpm Red Hat Enterprise Linux 5: 1 rpm -ivh http://nginx.org/packages/rhel/5/noarch/RPMS/nginx-release-rhel-5-0.el5.ngx.noarch.rpm 2、安装 1 yum install nginx 3、启动 1 service nginx start 4、测试 访问:ht

yum方式安装MySQL

1、安装 1 yum install mysql mysql-server 2、启动 1 service mysqld start 3、登录 1 mysql -uroot -p 4、改密码 1 set password for [email protected]=password('your_password') 5、查看密码 1 select user,host,password from mysql.user 备注: 更改数据库编码参考: 1 SET character_set_client = utf8 ;