随笔分类 -  node.js

摘要:yum install wget yum install gcc-c++ yum -y install pcre prec-devel yum -y install zlib zlib-devel yum install -y openssl openssl-devel wget -c https: 阅读全文
posted @ 2018-06-14 17:48 编程让我快乐 阅读(129) 评论(0) 推荐(0)
摘要:util是nodejs的一大核心模块,用来提供常用函数的集合 1.util.inherits(实现对象原型继承) 概要:js的继承是基于原型的,本身并没有继承的语言特性,仅仅是通过复制原型的方式来实现继承对象。 一、首先在nodejs的环境里引入util模块 const util = require 阅读全文
posted @ 2018-06-09 15:48 编程让我快乐 阅读(1940) 评论(0) 推荐(0)
摘要:UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1; 讲root账户,的HOST设置为%,允许所有公网IP访问。 flush privileges; 刷新权限 grant all privileges on *.* to 'root' 阅读全文
posted @ 2018-05-28 17:49 编程让我快乐 阅读(369) 评论(0) 推荐(0)
摘要:firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload 阅读全文
posted @ 2018-05-28 17:06 编程让我快乐 阅读(402) 评论(0) 推荐(0)
摘要:yum install firewalld systemctl stop iptables; systemctl mask iptables; systemctl unmask firewalld systemctl start firewalld systemctl status firewall 阅读全文
posted @ 2018-05-28 15:47 编程让我快乐 阅读(192) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/pythonal/p/6141516.html 1.默认linux是有自己的数据库分支的,我们要现将其删除,不然会有冲突 运行: rpm -qa | grep mariadb 查看有哪些分支 运行: rpm -e --nodeps mariadb-li 阅读全文
posted @ 2018-05-28 14:45 编程让我快乐 阅读(469) 评论(0) 推荐(0)
摘要:在服务器端安装pm2 npm install npm2 -g --save 之后再项目目录下运行 pm2 start app.js 在查看进程,是否已经启动 pm2 list 多个项目,我们只要监听端口,让nginx去转发 在conf文件目录下在建一个.conf文件,写上配置文件即可 阅读全文
posted @ 2018-05-28 13:30 编程让我快乐 阅读(449) 评论(0) 推荐(0)
摘要:首先在阿里云配置解析域名 指向端口为3200的nodejs服务,在nginx/conf.d下增加文件chat.conf,内容如下: 重启nginx 阅读全文
posted @ 2018-05-28 09:35 编程让我快乐 阅读(608) 评论(0) 推荐(0)
摘要:博客先言 阅读全文
posted @ 2017-10-09 18:07 编程让我快乐 阅读(144) 评论(0) 推荐(0)