当前位置:网站首页>Mac CentOS installation phpredis
Mac CentOS installation phpredis
2022-06-24 04:04:00 【Worry free 366】
Mac install phpredis
1. install redis
brew install redis
brew services start redis
2. install phpredis
2.1 Download the latest phpredis
https://github.com/phpredis/phpredis/releases/
My latest is 5.3.4
2.2 install
cd phpredis5.3.4
phpize
./configure
make
make test
make install
2.3 Change some paths
After running, the path will appear , Write the path in
sudo vim /usr/local/etc/php/7.2/php.ini
I added a custom extension before , So this time I will redis.so Copy to the previous folder
stay ./modules/redis.so find redis.so
2.4 restart php
brew services restart [email protected]
2.5 Check
php -m
See there are redis
Auxiliary order
1. see brew Running programs
brew services list
2. Many versions php Use a version
brew link --overwrite [email protected]
3. Open the folder with the terminal
open ./
4. View version
Check the server version
redis-server-v
Check the client version
redis-cli-v
5. php.ini Address
/usr/local/etc/php/7.2/php.ini
Centos install phpredis
1. install gcc rely on
yum install -y gcc
2. Download decompression redis package
wget http://download.redis.io/releases/redis-5.0.3.tar.gz
tar -zxvf redis-5.0.3.tar.gz
3. Executive variation
cd redis-5.0.3
make
4. Install and specify the directory
make install PREFIX=/usr/local/redis
5. Start the service
5.1 The front desk starts
cd /usr/local/redis/bin/
./redis-server
5.2 Background start
cp /usr/local/redis-5.0.3/redis.conf /usr/local/redis/bin/
modify redis.conf->daemonize no Change it to daemonize yes
vi redis.conf
Background start
./redis-server redis.conf
6. Start up the service
vi /etc/systemd/system/redis.service
Copy edge configuration
[Unit] Description=Redis After=network.target [Service] ExecStart=/usr/local/bin/redis-server /usr/local/redis/redis.conf --daemonize no ExecStop=/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 shutdown [Install] WantedBy=multi-user.target
systemctl enable redis.service
Service operation command
systemctl start redis.service # start-up redis service systemctl stop redis.service # stop it redis service systemctl restart redis.service # Restart the service systemctl status redis.service # View the current status of the service systemctl enable redis.service # Set power on self start systemctl disable redis.service # Stop power on and start up
Reference address :
https://www.cnblogs.com/heqiuyong/p/10463334.html
https://www.cnblogs.com/zuidongfeng/p/8032505.html
https://www.tpxhm.com/adetail/551.html
边栏推荐
- An accident caused by a MySQL misoperation, and the "high availability" cannot withstand it!
- Several options of F8 are very useful
- How to set the domain name on the server what is the role of the domain name
- Pycharm from installation to full armament
- 618 promotion: mobile phone brand "immortal fight", high-end market "who dominates the ups and downs"?
- How to adjust the incompleteness before and after TS slicing of easydss video recording?
- Clang代码覆盖率检测(插桩技术)
- Two edges are applied by default, one of which is a solid color icon. How to delete that solid color icon?
- RPM 包的构建 - SPEC 基础知识
- C language linked list points to the next structure pointer, structure and its many small details
猜你喜欢

黑帽SEO实战搜索引擎快照劫持

浅谈游戏安全 (一)

Halcon knowledge: contour operator on region (2)

【代码随想录-动态规划】T392.判断子序列

Black hat SEO actual combat directory wheel chain generates millions of pages in batch

ModStartCMS 主题入门开发教程

openGauss 3.0版本源码编译安装指南

你了解TLS协议吗?

ModStartCMS 企业内容建站系统(支持 Laravel9)v4.2.0

618 promotion: mobile phone brand "immortal fight", high-end market "who dominates the ups and downs"?
随机推荐
What should I pay attention to when choosing a data center?
[numpy] numpy's judgment on Nan value
How to save pictures to CDN? What are the advantages of this?
How EDI changes supply chain management
Demonstration of C language structure function research
Spirit breath development log (17)
What should I pay attention to when choosing a data center?
How to avoid man in the middle attack (mitm)
Event id:7001: after restarting the machine, the World Wide Web failed to start automatically, resulting in inaccessible websites
老弹出explorer.exe遇到问题已停止工作,怎么办?
API real-time signature scheme based on Yapi
Configuration process of easygbs access to law enforcement recorder
How to select a telemedicine program system? These four points are the key!
High quality travel on national day, visual start of smart Tourism
Black hat SEO actual combat directory wheel chain generates millions of pages in batch
LeetCode 938. Range sum of binary search tree
MySQL cases SQL causes 100% CPU utilization
RPM 包的构建 - SPEC 基础知识
Understanding of structure in C language
Kubernetes 资源拓扑感知调度优化