公司业务需求,需要搭建推流服务器,记录下完成搭建的过程,备用。服务器环境 Centos1.编译安装Nginx不过多介绍2.编译安装nginx-rtmp-moudle2.1 下载模块 https://github.com/arut/nginx-rtmp-module,并解压2.2 输入nginx –V 查看当前nginx已编译的模块,并复制configure arguments:后面的文本备用2.3进入nginx编译安装后带有configure目录(测试时进入的是nginx/src目录)粘贴2.2复制的文本,在最前面添加:./configure 在最后面添加—add-module=root/nginx-rtmp-module(具体文件目录根据2.1下载解压后的填写)并执行。2.4 完成后依次执行make make install3.进入nginx目录下的conf文件,修改nginx.conf文件Conf文件修改参考了http://blog.csdn.net/tao_627/article/details/22271559 http://lib.csdn.net/article/57/

杂谈 2018-12-21

在Sublime Text里,按ctrl+`,打开Console,一次性输入如下代码:import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())这样Sublime Text就会安装需要的Package Control。

杂谈 2018-12-19

模态框中加入 data-backdrop=”static” 属性<div class="modal fade examplemodal" tabindex="-1" aria-labelledby="mySmallModalLabel" aria-hidden="true" data-backdrop="static"></div>

前端 2018-12-04

根据时间戳及想要的时间格式装换出时间的js函数使用效果date("Y-m-d",1543920494) 2018-12-04 date("Y-m-d H:i:s",1543920494) 2018-12-04 18:48:14功能代码function date(format, timestamp) { var a, jsdate = ((timestamp) ? new Date(timestamp * 1000) : new Date()); var pad = function (n, c) { if ((n = n + "").length < c) { return new Array(++c - n.length).join("0") + n; } else { return n; } };

前端 2018-12-04

下载文件nodejs官网复制当前系统对应的下载链接在centos系统中选择目录并下载[root@192 ~]# cd /var [root@192 var]# mkdir app [root@192 var]# cd app [root@192 app]# wget https://nodejs.org/dist/v10.13.0/node-v10.13.0-linux-x64.tar.xz解压文件[root@192 app]# xz -d node-v10.13.0-linux-x64.tar.xz [root@192 app]# ll 总用量 60432 -rw-r--r--. 1 root root 61880320 10月 30 15:49 node-v10.13.0-linux-x64.tar [root@192 app]# tar -xf node-v10.13.0-linux-x64.tar [root@192 app]# ll 总用量 60432 drwxrwxr-x. 6 500 500 108 10月 30 15:48 node-v10.13.0-

在Bootstrap model弹出层上面使用layer prompt,input框无法获取焦点。解决方案:去除tabindex属性<div class="modal fade" id="template-modal" tabindex="-1" role="dialog" aria-hidden="true">

前端 2018-11-09

1、firewalld的基本使用启动: systemctl start firewalld关闭: systemctl stop firewalld查看状态: systemctl status firewalld开机禁用 : systemctl disable firewalld开机启用 : systemctl enable firewalld2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。启动一个服务:systemctl start firewalld.service关闭一个服务:systemctl stop firewalld.service重启一个服务:systemctl restart firewalld.service显示一个服务的状态:systemctl status firewalld.service在开机时启用一个服务:systemctl enable firewalld.service在开机时禁用一个服务:systemctl disable firewalld.service查看服务是否开机

由于个人使用的是windows系统,之前是直接在系统上安装开发环境进行php的开发,现打算在win上安装VMware虚拟机软件,CentOS 7 作为开发环境进行开发。直接跳过VMware的下载安装和CentOS系统的下载安装及环境部署。[root@localhost /]# mount -t cifs -o username=xxx,password=xxx,dir_mode=0777,file_mode=0777,giu=0,uid=0 //192.168.1.200/e /winssdusername 和 password对应当前windows的登录名和密码,最后面两个分别表示分享的文件夹路径和centos上的挂载位置

查询user表中,user_name字段值重复的数据及重复次数select user_name,count(*) as count from user group by user_name having count>1;

按钮<a data-toggle="modal" data-target=".detail" data-id="999" title="详细资料"><i class="ti-user"></i></a>获取参数$('.detail').on('show.bs.modal', function (e) { var btn = $(e.relatedTarget); var id = btn[0].dataset.id; })

前端 2018-10-11