您的当前位置: 首页>帮助中心>

博云建站

新闻公告
关于我们

直播商城互动直播配置linux php


阅读:12


基础环境

1、PHP(建议使用5.6以上版本)、

2、服务器放行9501、6379端口

3、在当前php版本中安装插件Redis、Swoole

必须安装组件支持

Redis、Swoole

 

修改配置文件

Redis配置

wwwroot/www.demo.com/data/config.php

1. 修改$config['setting']['cache'] = 'mysql';为$config['setting']['cache'] = 'redis';

// --------------------------  CONFIG SETTING  --------------------------- //

$config['setting']['charset'] = 'utf-8';

$config['setting']['timezone'] = 'Asia/Shanghai';

$config['setting']['memory_limit'] = '256M';

$config['setting']['filemode'] = 0644;

$config['setting']['authkey'] = 'c445a6b6';

$config['setting']['founder'] = '1';

$config['setting']['development'] = 0;

$config['setting']['referrer'] = 0;

2、redis服务器地址和端口

// --------------------------  CONFIG REDIS  --------------------------- //

$config['setting']['redis']['server'] = '127.0.0.1';  //默认本地,你也可以用云库地址(远程)

$config['setting']['redis']['port'] = 6379;   //默认端口

$config['setting']['redis']['pconnect'] = 1;

$config['setting']['redis']['auth'] = '';  //redis密码, 默认为空

$config['setting']['redis']['requirepass'] = '';   //redis密码,默认为空,没用人人商城删除这行

$config['setting']['redis']['timeout'] = 1;

 

Swoole配置

addons/ewei_shopv2/core/socket下socket.config.php

1、// 设置服务端IP

define('SOCKET_SERVER_IP', 'localhost');

2、// 不管是否开启https均需配置域名

define('SOCKET_CLIENT_IP', ' www.demo.com ');

 

启动服务(先手动启动,再添加自动启动防止服务器重启直播服务关闭)

手动启动

 

 

/www/server/php/56/bin/php -f  /www/wwwroot/ www.demo.com /addons/ewei_shopv2/core/socket/server.php

自动启动

echo "/www/server/php/56/bin/php -f  /www/wwwroot/ www.demo.com /addons/ewei_shopv2/core/socket/server.php" >> /etc/rc.d/rc.local


上一篇:xstream-1.3.1.jar 下一篇:phpcms 9 迁移、linux 部署 全县设置

 
 
0314-7055630 /185-3146-6707