In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This paper gives an example of installing Redis3.0 and phpredis extension testing in CentOS environment. Share with you for your reference, the details are as follows:
The online unified chat and push system redis version 2.8.6 has been running well for nearly a year. The reason for testing redis3.0 is that 3.0has many new features compared with 2.8:
Redis Cluster-- A distributed Redis implementation
The new "embedded string" object coding results with less cache loss and a significant increase in speed under specific workloads
AOF child-> parent final data transfer minimizes latency through "last write" in the AOF rewrite process
Greatly improved LRU approximation algorithm for key erasure
The WAIT command jams waiting for write operations to be transferred to a specified number of slave nodes
MIGRATE connection cache, greatly increasing the speed of key migration
New parameters COPY and REPLACE for MIGARTE
CLIENT PAUSE command: stops processing client requests within a specified time
BITCOUNT performance improvement
CONFIG SET accepts memory values from different units, such as "CONFIG SET maxmemory 1gb".
The Redis log format adjusts the role used to reflect the instance (master/slave)
INCR performance improvement
Keep an exploratory mind to technology while you are young!
Start installation
1. Install the dependency package
The copy code is as follows: [root@localhost ~] # yum install gcc gcc-c++ kernel-devel automake autoconf libtool make wget tcl vim ruby rubygems unzip php-devel git-y
2. Install the redis server
No. / configure, just compile it without make install
[root@localhost ~] # wget http://download.redis.io/releases/redis-3.0.6.tar.gz[root@localhost ~] # tar xzf redis-3.0.6.tar.gz [root@localhost ~] # cd redis-3.0.6 [root@localhost redis-3.0.6] # make [root@localhost redis-3.0.6] # src/redis-server
3. Use redis client to test
[root@localhost redis-3.0.6] # src/redis-cli127.0.0.1:6379 > set key valOK127.0.0.1:6379 > get key "val" 127.0.0.1 set key valOK127.0.0.1:6379 6379 > del key (integer) 1127.0.1 purl 6379 > exists key (integer) 0
4. Install phpredis to make it easy to use php to operate redis
Phpredis download address: https://github.com/nicolasff/phpredis
[root@localhost ~] # unzip phpredis-develop.zip [root@localhost ~] # cd phpredis-develop [root@localhost phpredis-develop] # phpize [root@localhost phpredis-develop] #. / configure [root@localhost phpredis-develop] # make & & make install
Hint: Installing shared extensions: / usr/lib64/php/modules/
Vi / etc/php.ini
Join
Extension=redis.so
Restart apache
Service httpd restart
5. Php connection redis code test
I hope what is described in this article will be helpful to the configuration of CentOS server.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.