基础--Redis在Windows环境下的安装

1. 安装Redisphp

1.1 下载安装包 https://github.com/ServiceStack/redis-windows#3-run-the-redis-serverexe-using-the-local-configurationgit

1.2 解押后选择要安装的Redis版本github

1.3 解押该版本后能够看到 redis-server.exe 和 redis-cli.exe 分别表明服务端和客户端redis

2. 安装PHPRedis扩展apache

2.1 查看本身的PHP版本信息,下载相应的扩展windows

https://github.com/nicolasff/phpredis spa

http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/.net

2.2 下载获得的 php_igbinary.dllphp_redis.dll 放入php的ext目录下server

2.3 修改配置文件 php.ini blog

  1. extension=php_igbinary.dll
  2. extension=php_redis.dll

2.4 重启apache,查看phpinfo就有redis扩展的信息

3. 开启redis服务

进入redis安装目录 cmd命令 redis-server.exe redis.conf

redis.conf为配置文件 具体修改成本身安装的文件名 如 redis.windows.conf

4. 设置为开机启动

4.1 在redis的目录下执行(执行后就做为windows服务了)
redis-server --service-install redis.windows.conf

4.2 安装好后须要手动启动redis
redis-server --service-start

4.3 中止服务
redis-server --service-stop

4.4 卸载redis服务redis-server --service-uninstall

相关文章
相关标签/搜索