啊八八八八八八
6666666666666666666666
看看
下载看看,谢谢
张旭博客 || http://zxbke.cn || http://q1.qlogo.cn/g?b=qq&nk=160323770&s=640 || 张旭博客是一个简洁的个人博客,专注于分享学习笔记、软件工具等资源! || http://zxbke.cn
看看
好东西啊!!!
试了这段代码,出来的标签选择是下拉列表的形式,和上面的动图显示的不一样,没有动图上的方便,环境是typecho v1.2
看看
看看
1111111111
感谢纷纷向!!
谢谢老哥
好东西 谢谢分享!!
看看
首页
使用攻略
友情链接
关于我们
留言反馈
我要投稿
推荐
星泽主页
星泽图床
Search
1
全网最全软件库合集!享你想要!-星泽V社
14,170 阅读
2
新版QQ修改彩色颜色字体代码教程-星泽V社
3,442 阅读
3
Genshin EMU V5 原神服务端整合一键运行包- 星泽V社
2,238 阅读
4
星泽潮品社-终端供货-一件代发-退换无忧-星泽V社
2,107 阅读
5
Typecho博客全站部署腾讯云CDN教程-星泽V社
1,939 阅读
未来可期
短篇文学
日积月累
谈天说地
NFT发售日历
公告信息
玩机广场
实用软件
玩机教程
值得一看
程序源码
干货教程
Search
标签搜索
星泽V社
typecho
实用软件
程序源码
源码
typecho插件
插件
电脑软件
软件ku
APP
个人主页
图床
Joe
jsDelivr
安卓软件
引导页
教程
Linux
Github
腾讯云
Mr.星泽
累计撰写
244
篇文章
累计收到
615
条评论
今日撰写
0
篇文章
首页
栏目
未来可期
短篇文学
日积月累
谈天说地
NFT发售日历
公告信息
玩机广场
实用软件
玩机教程
值得一看
程序源码
干货教程
页面
使用攻略
友情链接
关于我们
留言反馈
我要投稿
推荐
星泽主页
星泽图床
搜索到
1
篇与
聊天室
的结果
2022-05-22
一款二次元的Web多人在线网络聊天系统:Fiora安装及使用
说明:Fiora是一款偏二次元的Web多人在线聊天应用,使用Node.js、Mongodb、Socket.io和React编写,使用起来还行,挺简洁的,这里水个搭建教程,有兴趣的可以玩玩。截图演示站点击进入功能 好友,群组,私聊,群聊 文本,图片,代码,url等多种类型消息 贴吧表情,滑稽表情,搜索表情包 桌面通知,声音提醒,语音播报 自定义桌面背景,主题颜色,文本颜色 查看在线用户,@功能 小黑屋禁言 手动安装Github地址:https://github.com/yinxin630/fiora所需环境:Nodejs >= 8.9.0、Mongodb。说明:512M内存vps可能还需要先加一点虚拟内存,不然构建过程会失败。1、安装Nodejs#Debian/Ubuntu系统 curl -sL https://deb.nodesource.com/setup_10.x | bash - apt install -y git nodejs #CentOS系统 curl -sL https://rpm.nodesource.com/setup_10.x | bash - yum install nodejs git -y2、安装Mongodb#CentOS 6系统,将下面命令一起复制进SSH客户端运行 cat <<EOF > /etc/yum.repos.d/mongodb.repo [mongodb-org-4.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/6/mongodb-org/4.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc EOF yum -y install mongodb-org #CentOS 7系统,将下面命令一起复制进SSH客户端运行 cat <<EOF > /etc/yum.repos.d/mongodb.repo [mongodb-org-4.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc EOF yum -y install mongodb-org #Debian 8系统 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/4.0 main" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list apt update -y apt install -y mongodb-org #Debian 9系统 curl https://www.mongodb.org/static/pgp/server-4.0.asc | apt-key add - echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list apt-get update -y apt-get install -y mongodb-org #Debian 10系统 curl https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list apt update -y apt install -y mongodb-org #Ubuntu 16.04系统 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 echo "deb https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list apt update -y apt install -y mongodb-org #Ubuntu 18.04、18.10、19.04系统 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 echo "deb https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list apt update -y apt install -y mongodb-org复制如果导入公匙时出现gnupg, gnupg2 and gnupg1 do not seem to be installed错误,使用apt install -y gnupg2,然后重新导入即可。启动Mongodb并设置开机自启:#CentOS 6系统 service mongod start chkconfig mongod on #CentOS 7、Debian、Ubuntu系统 systemctl start mongod systemctl enable mongod3、安装fiora#拉取源码并存放于/opt文件夹 git clone https://github.com/yinxin630/fiora.git -b master /opt/fiora cd /opt/fiora #安装依赖,这里不能用npm,需要用yarn来安装 npm i -g yarn yarn #构建 npm run build #转移产物 npm run move-dist #启动 npm start运行后打开ip:9200,注册一个账号,然后可以看SSH客户端运行日志,获取自己的userId。#这里注册或登录的时候返回的信息,后面的5d329dd354b9则为自己的userId <-- getLinkmansLastMessages mYNheu93jds7 5d329dd354b9如果ip:9200打不开的,可以检查下防火墙,CentOS系统可以使用以下命令:#CentOS 6 iptables -I INPUT -p tcp --dport 9200 -j ACCEPT service iptables save service iptables restart #CentOS 7 firewall-cmd --zone=public --add-port=9200/tcp --permanent firewall-cmd --reload像阿里云等,还需要额外在安全组开放端口。接下来再将自己的账号设置成管理员,先使用Ctrl+C断开运行。新建Systemd配置文件,只适用于CentOS 7、Debian 8+、Ubuntu 16+等。#先修改你的userId和运行端口后复制到SSH运行 Administrator=5d329dd354b9 Port=9200 #新建fiora用户并授权 useradd -M fiora && usermod -L fiora chown -R fiora:fiora /opt/fiora #新建systemd配置文件,将以下代码一起复制到SSH运行 cat > /etc/systemd/system/fiora.service <<EOF [Unit] Description=fiora After=network.target Wants=network.target [Service] Type=simple PIDFile=/var/run/fiora.pid ExecStart=$(command -v npm) start WorkingDirectory=/opt/fiora Environment=Administrator=$Administrator Port=$Port User=fiora Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.target EOF开始启动并设置开机自启:systemctl start fiora systemctl enable fiora其它系统,比如CentOS、Debian 7等系统,可以直接使用以下方法启动:#管理员userId和运行端口自行修改 export Administrator=5d329dd354b9 Port=9200 nohup npm start &此时就可以访问ip:9200,运行端口以你设置的为准,这时候你登陆的时候,会发现左侧多了个管理员图标。4、域名反代 如果你想使用域名的话,这里依旧使用Caddy反代,操作如下:安装Caddy:wget -N --no-check-certificate https://raw.githubusercontent.com/iiiiiii1/doubi/master/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh #备用地址 wget -N --no-check-certificate https://www.moerats.com/usr/shell/Caddy/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh配置Caddy:#以下全部内容是一个整体,请修改域名后一起复制到SSH运行! #http访问,该配置不会自动签发SSL echo "www.moerats.com { gzip proxy / 127.0.0.1:9200 { websocket header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream X-Forwarded-For {remote} header_upstream X-Forwarded-Port {server_port} header_upstream X-Forwarded-Proto {scheme} } }" > /usr/local/caddy/Caddyfile #https访问,该配置会自动签发SSL,请提前解析域名到VPS服务器 echo "www.moerats.com { gzip tls admin@moerats.com proxy / 127.0.0.1:9200 { websocket header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream X-Forwarded-For {remote} header_upstream X-Forwarded-Port {server_port} header_upstream X-Forwarded-Proto {scheme} } }" > /usr/local/caddy/Caddyfiletls参数会自动帮你签发ssl证书,如果你要使用自己的ssl,改为tls /root/xx.crt /root/xx.key即可。后面为ssl证书路径。启动Caddy:/etc/init.d/caddy start就可以打开域名进行访问了。如果你想修改默认的频道名称的话,可以编辑config/server.js文件,修改最下面的代码:defaultGroupName: 'fiora',然后重启应用即可。需要使用到七牛云CDN的,可以参考作者给的教程自行设置→传送门宝塔安装1、安装宝塔#CentOS系统 wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh #Ubuntu系统 wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh #Debian系统 wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh安装完成后,进入面板,点击左侧软件商店,然后安装PM2管理器、MongoDB、Nginx(使用域名访问才需要安装,反之不用)。注意:Debian安装MongoDb之前还需要使用命令apt install sudo,不然可能存在MongoDb启动不了的情况;如果你已经安装了MongoDb,那就先使用apt install sudo,再使用/etc/init.d/mongodb start启动即可。2、安装fiora 该步骤参考上面的手动步骤3,区别在于新建systemd配置文件的时候,Environment参数还需要加一样,不然启动可能失败。只需要把新建systemd配置文件步骤换成下面这个,其它一模一样。#先给node做个软连接,不然后面会启动失败 ln -sf $(which node) /usr/bin/node #修改运行端口,可以默认 Port=9200 #以下命令一起复制进SSH客户端运行 cat > /etc/systemd/system/fiora.service <<EOF [Unit] Description=fiora After=network.target Wants=network.target [Service] Type=simple PIDFile=/var/run/fiora.pid ExecStart=$(command -v npm) start WorkingDirectory=/opt/fiora Environment=NODE_ENV=production Administrator=$Administrator Port=$Port User=fiora Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.target EOF3、域名反代 先点击左侧网站,添加站点,然后再点击添加好了的域名名称,这时候就进入了站点配置,点击配置文件,在中间添加以下代码:location / { proxy_pass http://127.0.0.1:9200; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Forward-Proto http; proxy_set_header X-Nginx-Proxy true; proxy_http_version 1.1; proxy_redirect off; }其它的就自己慢慢摸索吧,博主也没过多使用,有问题可以直接去Github Issues反馈。
2022年05月22日
308 阅读
0 评论
0 点赞
首页
复制
搜索
前进
后退
重载网页
和我当邻居
给我留言吧