1.安装gcc*

 

wKiom1lJJ07BTWLcAAA8Xc8LYZY179.png-wh_50


2.安装所需要的包


wKioL1lJJ2eRgs5GAACCtcqIOSw253.png-wh_50


3.配置网站nginx

a) vim /etc/nginx/conf.d/default.conf


wKioL1lJJ6PTCQ6BAAAJczu6yGk278.png-wh_50

wKioL1lJJ6PjVgBmAAAtz8w9hQE240.png-wh_50

wKiom1lJJ6PQQDYxAAAfXEhkApo445.png-wh_50


b) vim /etc/php-fpm.d/www.conf


wKioL1lJJ8eiytUwAAAskMNIbz8402.png-wh_50


4.启动php和数据库

wKiom1lJJ-LRdUBvAABOOObECxc428.png-wh_50



5.授权,使登录数据库时使用123456’密码


wKiom1lJJ_yDckC1AABeI6fIMag554.png-wh_50

以上搭建了一个lnmp环境。。。。。


7.安装redis


wKiom1lJKHyT5a-FAABeZnRG4OE348.png-wh_50


wKiom1lJKHzzTFVuAABJ6HhXNF0830.png-wh_50


8.安装提供phpredis联系的软件


a.解压


wKioL1lJKLSjf7WgAABw8Ium90w779.png-wh_50


b. 安装


wKiom1lJKNyiAlUpAABbUaBOWng966.png-wh_50

wKioL1lJKN2zeEyEAAApbkGfpfM908.png-wh_50


c.让php支持redis


wKiom1lJKQGzGUAuAAAszG0hxUE984.png-wh_50

wKioL1lJKQLQD_wSAAAVcW_9YFY722.png-wh_50


进入mysql插数据


wKiom1lJKTGzMjRJAAB43tI16PU751.png-wh_50


wKiom1lJKUvgK1eUAAAk9VrtYTQ751.png-wh_50


开启redis,并编写脚本


wKiom1lJKXOC_0sFAAAK8yWKrYc231.png-wh_50

wKioL1lJKXSDFEVdAAAcZ6PaJus531.png-wh_50


wKioL1lJKYuC91juAAB6V3XBkI0982.png-wh_50


wKioL1lJKa3CKUqeAABSPiXoYUU675.png-wh_50

wKiom1lJKa6QYqjpAABX2Qp_H48968.png-wh_50