首页
留言
统计
壁纸
直播
友链
Search
1
Linux
653 阅读
2
Redis
547 阅读
3
服务器安全与病毒
519 阅读
4
Nginx
472 阅读
5
笔记
433 阅读
笔记
服务器
前端
后端
登录
/
注册
Search
标签搜索
服务器
Docker
工具
linux
前端
Yarn
NingShuYang
累计撰写
15
篇文章
累计收到
16
条评论
首页
栏目
笔记
服务器
前端
后端
页面
留言
统计
壁纸
直播
友链
搜索到
15
篇与
的结果
2024-05-21
NodeJs
先确认系统是否已经安装了epel-release包:yum info epel-release如果有输出有关epel-release的已安装信息,则说明已经安装,如果提示没有安装或可安装,则安装yum install epel-release安装完后,就可以使用yum命令安装nodejs了,安装的一般会是6.x的版本,并且会将npm(3.x)作为依赖包一起安装yum install nodejs安装完成后,验证是否正确的安装,node -v,如果输出如下版本信息,说明成功安装node -v
2024年05月21日
260 阅读
0 评论
0 点赞
2024-05-21
Yarn
1、配置yarn官方yum存储库curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo2、安装yarnyum install -y yarn3、验证yarn -v
2024年05月21日
281 阅读
0 评论
0 点赞
2024-01-16
IDEA Alibaba Cloud Toolkit一键部署java或vue项目
商店安装插件 Alibaba Cloud Toolkit右上角调试配置如图sh脚本代码,改个jar包名称即可#!/bin/sh # ./ry.sh start 启动 stop 停止 restart 重启 status 状态 AppName=system-2.6.jar # JVM参数 JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" #APP_HOME=`/home/traffic-cloud` LOG_PATH=/home/traffic-cloud/logs2/$AppName.log if [ "$1" = "" ]; then echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m" exit 1 fi if [ "$AppName" = "" ]; then echo -e "\033[0;31m 未输入应用名 \033[0m" exit 1 fi function start() { PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` if [ x"$PID" != x"" ]; then echo "$AppName is running..." else nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 & echo "Start $AppName success..." fi } function stop() { echo "Stop $AppName" PID="" query(){ PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` } query if [ x"$PID" != x"" ]; then kill -TERM $PID echo "$AppName (pid:$PID) exiting..." while [ x"$PID" != x"" ] do sleep 1 query done echo "$AppName exited." else echo "$AppName already stopped." fi } function restart() { stop sleep 2 start } function status() { PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l` if [ $PID != 0 ];then echo "$AppName is running..." else echo "$AppName is not running..." fi } case $1 in start) start;; stop) stop;; restart) restart;; status) status;; *) esac
2024年01月16日
267 阅读
0 评论
0 点赞
2023-11-08
网页特效方面
vue 滚动插件vue-seamless-scrollParticlesJSParticlesJS粒子特效点点粒子特效<html><head> <meta charset="utf-8"> <title></title> <style> html { height: 100%; background-image: -webkit-radial-gradient(ellipse farthest-corner at center center, #1b44e4 0%, #020f3a 100%); background-image: radial-gradient(ellipse farthest-corner at center center, #1b44e4 0%, #020f3a 100%); cursor: move; } body { width: 100%; margin: 0; overflow: hidden; } </style> </head> <body> <canvas id="canv" width="1920" height="572"></canvas> <script> var num = 1000; var w = window.innerWidth; var h = window.innerHeight; var max = 100; var _x = 0; var _y = 0; var _z = 150; var dtr = function(d) { return d * Math.PI / 180; }; var rnd = function() { return Math.sin(Math.floor(Math.random() * 360) * Math.PI / 180); }; var dist = function(p1, p2, p3) { return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2) + Math.pow(p2.z - p1.z, 2)); }; var cam = { obj: { x: _x, y: _y, z: _z }, dest: { x: 0, y: 0, z: 1 }, dist: { x: 0, y: 0, z: 200 }, ang: { cplane: 0, splane: 0, ctheta: 0, stheta: 0 }, zoom: 1, disp: { x: w / 2, y: h / 2, z: 0 }, upd: function() { cam.dist.x = cam.dest.x - cam.obj.x; cam.dist.y = cam.dest.y - cam.obj.y; cam.dist.z = cam.dest.z - cam.obj.z; cam.ang.cplane = -cam.dist.z / Math.sqrt(cam.dist.x * cam.dist.x + cam.dist.z * cam.dist.z); cam.ang.splane = cam.dist.x / Math.sqrt(cam.dist.x * cam.dist.x + cam.dist.z * cam.dist.z); cam.ang.ctheta = Math.sqrt(cam.dist.x * cam.dist.x + cam.dist.z * cam.dist.z) / Math.sqrt(cam.dist.x * cam.dist.x + cam.dist.y * cam.dist.y + cam.dist.z * cam.dist.z); cam.ang.stheta = -cam.dist.y / Math.sqrt(cam.dist.x * cam.dist.x + cam.dist.y * cam.dist.y + cam.dist.z * cam.dist.z); } }; var trans = { parts: { sz: function(p, sz) { return { x: p.x * sz.x, y: p.y * sz.y, z: p.z * sz.z }; }, rot: { x: function(p, rot) { return { x: p.x, y: p.y * Math.cos(dtr(rot.x)) - p.z * Math.sin(dtr(rot.x)), z: p.y * Math.sin(dtr(rot.x)) + p.z * Math.cos(dtr(rot.x)) }; }, y: function(p, rot) { return { x: p.x * Math.cos(dtr(rot.y)) + p.z * Math.sin(dtr(rot.y)), y: p.y, z: -p.x * Math.sin(dtr(rot.y)) + p.z * Math.cos(dtr(rot.y)) }; }, z: function(p, rot) { return { x: p.x * Math.cos(dtr(rot.z)) - p.y * Math.sin(dtr(rot.z)), y: p.x * Math.sin(dtr(rot.z)) + p.y * Math.cos(dtr(rot.z)), z: p.z }; } }, pos: function(p, pos) { return { x: p.x + pos.x, y: p.y + pos.y, z: p.z + pos.z }; } }, pov: { plane: function(p) { return { x: p.x * cam.ang.cplane + p.z * cam.ang.splane, y: p.y, z: p.x * -cam.ang.splane + p.z * cam.ang.cplane }; }, theta: function(p) { return { x: p.x, y: p.y * cam.ang.ctheta - p.z * cam.ang.stheta, z: p.y * cam.ang.stheta + p.z * cam.ang.ctheta }; }, set: function(p) { return { x: p.x - cam.obj.x, y: p.y - cam.obj.y, z: p.z - cam.obj.z }; } }, persp: function(p) { return { x: p.x * cam.dist.z / p.z * cam.zoom, y: p.y * cam.dist.z / p.z * cam.zoom, z: p.z * cam.zoom, p: cam.dist.z / p.z }; }, disp: function(p, disp) { return { x: p.x + disp.x, y: -p.y + disp.y, z: p.z + disp.z, p: p.p }; }, steps: function(_obj_, sz, rot, pos, disp) { var _args = trans.parts.sz(_obj_, sz); _args = trans.parts.rot.x(_args, rot); _args = trans.parts.rot.y(_args, rot); _args = trans.parts.rot.z(_args, rot); _args = trans.parts.pos(_args, pos); _args = trans.pov.plane(_args); _args = trans.pov.theta(_args); _args = trans.pov.set(_args); _args = trans.persp(_args); _args = trans.disp(_args, disp); return _args; } }; (function() { "use strict"; var threeD = function(param) { this.transIn = {}; this.transOut = {}; this.transIn.vtx = (param.vtx); this.transIn.sz = (param.sz); this.transIn.rot = (param.rot); this.transIn.pos = (param.pos); }; threeD.prototype.vupd = function() { this.transOut = trans.steps( this.transIn.vtx, this.transIn.sz, this.transIn.rot, this.transIn.pos, cam.disp ); }; var Build = function() { this.vel = 0.04; this.lim = 360; this.diff = 200; this.initPos = 100; this.toX = _x; this.toY = _y; this.go(); }; Build.prototype.go = function() { this.canvas = document.getElementById("canv"); this.canvas.width = window.innerWidth; this.canvas.height = window.innerHeight; this.$ = canv.getContext("2d"); this.$.globalCompositeOperation = 'source-over'; this.varr = []; this.dist = []; this.calc = []; for (var i = 0, len = num; i < len; i++) { this.add(); } this.rotObj = { x: 0, y: 0, z: 0 }; this.objSz = { x: w / 5, y: h / 5, z: w / 5 }; }; Build.prototype.add = function() { this.varr.push(new threeD({ vtx: { x: rnd(), y: rnd(), z: rnd() }, sz: { x: 0, y: 0, z: 0 }, rot: { x: 20, y: -20, z: 0 }, pos: { x: this.diff * Math.sin(360 * Math.random() * Math.PI / 180), y: this.diff * Math.sin(360 * Math.random() * Math.PI / 180), z: this.diff * Math.sin(360 * Math.random() * Math.PI / 180) } })); this.calc.push({ x: 360 * Math.random(), y: 360 * Math.random(), z: 360 * Math.random() }); }; Build.prototype.upd = function() { cam.obj.x += (this.toX - cam.obj.x) * 0.05; cam.obj.y += (this.toY - cam.obj.y) * 0.05; }; Build.prototype.draw = function() { this.$.clearRect(0, 0, this.canvas.width, this.canvas.height); cam.upd(); this.rotObj.x += 0.1; this.rotObj.y += 0.1; this.rotObj.z += 0.1; for (var i = 0; i < this.varr.length; i++) { for (var val in this.calc[i]) { if (this.calc[i].hasOwnProperty(val)) { this.calc[i][val] += this.vel; if (this.calc[i][val] > this.lim) this.calc[i][val] = 0; } } this.varr[i].transIn.pos = { x: this.diff * Math.cos(this.calc[i].x * Math.PI / 180), y: this.diff * Math.sin(this.calc[i].y * Math.PI / 180), z: this.diff * Math.sin(this.calc[i].z * Math.PI / 180) }; this.varr[i].transIn.rot = this.rotObj; this.varr[i].transIn.sz = this.objSz; this.varr[i].vupd(); if (this.varr[i].transOut.p < 0) continue; var g = this.$.createRadialGradient(this.varr[i].transOut.x, this.varr[i].transOut.y, this.varr[i].transOut.p, this.varr[i].transOut.x, this.varr[i].transOut.y, this.varr[i].transOut.p * 2); this.$.globalCompositeOperation = 'lighter'; g.addColorStop(0, 'hsla(255, 255%, 255%, 1)'); g.addColorStop(.5, 'hsla(' + (i + 2) + ',85%, 40%,1)'); g.addColorStop(1, 'hsla(' + (i) + ',85%, 40%,.5)'); this.$.fillStyle = g; this.$.beginPath(); this.$.arc(this.varr[i].transOut.x, this.varr[i].transOut.y, this.varr[i].transOut.p * 2, 0, Math.PI * 2, false); this.$.fill(); this.$.closePath(); } }; Build.prototype.anim = function() { window.requestAnimationFrame = (function() { return window.requestAnimationFrame || function(callback, element) { window.setTimeout(callback, 1000 / 60); }; })(); var anim = function() { this.upd(); this.draw(); window.requestAnimationFrame(anim); }.bind(this); window.requestAnimationFrame(anim); }; Build.prototype.run = function() { this.anim(); window.addEventListener('mousemove', function(e) { this.toX = (e.clientX - this.canvas.width / 2) * -0.8; this.toY = (e.clientY - this.canvas.height / 2) * 0.8; }.bind(this)); window.addEventListener('touchmove', function(e) { e.preventDefault(); this.toX = (e.touches[0].clientX - this.canvas.width / 2) * -0.8; this.toY = (e.touches[0].clientY - this.canvas.height / 2) * 0.8; }.bind(this)); window.addEventListener('mousedown', function(e) { for (var i = 0; i < 100; i++) { this.add(); } }.bind(this)); window.addEventListener('touchstart', function(e) { e.preventDefault(); for (var i = 0; i < 100; i++) { this.add(); } }.bind(this)); }; var app = new Build(); app.run(); })(); window.addEventListener('resize', function() { canvas.width = w = window.innerWidth; canvas.height = h = window.innerHeight; }, false); </script> </body></html>
2023年11月08日
268 阅读
0 评论
0 点赞
2023-11-07
Centos7安装杀毒软件----ClamAV
https://www.cnblogs.com/chuanghongmeng/p/17600613.html1.下载rpmwget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm2.升级epel源rpm -ihv epel-release-latest-7.noarch.rpm3.安装ClamAVyum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd4.修改配置example注释掉vim /etc/freshclam.conf vim /etc/clamd.d/scan.conf ## (一样的操作需要注释)clamscan targetfile ##文件扫描freshclam ## 更新病毒库systemctl start clamav-freshclam.servicesystemctl enable clamav-freshclam.service systemctl status clamav-freshclam.serviceclamscan:通用,不依赖服务,命令参数较多,执行速度稍慢; 用clamscan扫描,不需要开始服务就能使用; -r 递归扫描子目录 -i 只显示发现的病毒文件 --no-summary 不显示统计信息 扫描参数:-r/--recursive[=yes/no] 所有文件 --log=FILE/-l FILE 增加扫描报告 --move [路径] 移动病毒文件至.. --remove [路径] 删除病毒文件 --quiet 只输出错误消息 --infected/-i 只输出感染文件 --suppress-ok-results/-o 跳过扫描OK的文件 --bell 扫描到病毒文件发出警报声音 --unzip(unrar) 解压压缩文件扫描 扫描所有文件并且显示有问题的文件的扫描结果clamscan -r --bell -i /只显示找到的病毒信息clamscan --no-summary -ri /tmp扫描home,删除病毒clamscan --infected --remove --recursive /home让服务器每天晚上定时更新和杀毒,保存杀毒日志,crontab文件如下:1 3 * freshclam --quiet20 3 * clamscan -r /home --remove -l /var/log/clamscan.log
2023年11月07日
296 阅读
0 评论
0 点赞
2023-10-30
Jenkins
查看对应版本jenkinshttps://get.jenkins.io/war-stable/
2023年10月30日
347 阅读
0 评论
0 点赞
2023-09-14
Rsync 定时同步文件服务
参考地址命令行 参考两个机器都装rsyncyum install rsync –ysystemctl start rsyncd # 启动systemctl enable rsyncd # 增加开机启动开放端口873源文件的机器1.etc/rsync.conf 配置文件修改uid = root gid = root use chroot = no read only = no max connections = 200 transfer logging = yes log file =/var/log/rsyncd.log timeout = 900 [image] path = /home/data/file #本地源文件的路径 ignore erros auth users = root #用户名 secrets file = /etc/rsyncd.secrets #密码本路径 hosts allow = 备份机IP hosts deny = * list = false2.创建密码本/etc/rsyncd.secrets用户名:本机密码备份文件的机器rsync -avzP --partial --password-file=/root/passwd root@::image /home/trafficBak/file其中ip是源文件机器ip;::image是rsync.conf配置的模块名,路径是本地备份机器的存储路径,创建密码本并授权600,密码是源文件的机器密码例如:echo "rsync:123456" > /root/passwdchmod 600 /root/passwd
2023年09月14日
315 阅读
0 评论
0 点赞
2022-07-20
服务器安全与病毒
kdevtmpfsi病毒(redis开启远程访问后,又是弱口令导致中redis勒索挖矿病毒)现象:cpu一直100%飙满解决:top命令或FinalShell软件查cpu和内存情况kdevtmpfsi 病毒 和他的守护进程kinsing和恶意程序red2.so全局查找删干净,包括定时任务 crontab 会恢复病毒程序,一起删了病毒导致内存吃满卡机,服务器瘫痪现象:ssh连接上去后,几秒钟程序就内存吃满后卡死,无法输入命令,一直断线,重启无果,导致服务器瘫痪,无法做任何操作,只有刚连接进去后的5秒的有效操作时间(病毒未吃满内存前),5秒钟以后内容爆满系统卡死断开连接,并且top命令和系统监控工具全被删除,无法使用,无法找到占内存的进程解决:ps aux --sort -rss | head 命令查找前几秒一瞬间的运行程序,发现几百个top.original进程在大量吃内存,发现恶意程序,删除以后内存恢复,但是被删top无法恢复,只能装 htop等类似软件使用完成后最好安装阿里云骑士,安全中心全局扫描隐藏病毒,否则会恢复(第一次就是没删干净有隐藏恢复程序导致第二次服务器瘫痪)总结经验:1.数据库,redis,ftp等能不开远程连接就不开,开了也得密码强度要高默认端口也得改,并且SSH默认默认端口也得改,防止暴力破解2.定期备份数据库和服务器系统
2022年07月20日
519 阅读
0 评论
0 点赞
2022-07-13
Nginx
限制当前站点最大并发数289 限制单个IP访问最大并发数28http:{ limit_conn_zone $server_name zone=perserver:10m; limit_conn_zone $binary_remote_addr zone=perip:10m;}server{ limit_conn perserver 289; limit_conn perip 28;}开启压缩# 开启gzip gzip on; # 低于1kb的资源不压缩 gzip_min_length 1k; # 设置压缩所需要的缓冲区大小 gzip_buffers 4 16k; # 压缩级别【1-9】,越大压缩率越高,同时消耗cpu资源也越多,建议设置在4左右。 gzip_comp_level 6; # 需要压缩哪些响应类型的资源,缺少的类型自己补。 gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml; # 配置禁用gzip条件,支持正则。此处表示ie6及以下不启用gzip(因为ie低版本不支持) gzip_disable "MSIE [1-6]\."; # 是否添加“Vary: Accept-Encoding”响应头, gzip_vary on; # 设置gzip压缩针对的HTTP协议版本,没做负载的可以不用 # gzip_http_version 1.0;
2022年07月13日
472 阅读
0 评论
0 点赞
2022-07-13
Redis
requirepass 123456bind 0.0.0.0改成 protected-mode no清空所有缓存./redis-cli FLUSHALL或./redis-cli -h 127.0.0.1 -p 6379 -a 密码FLUSHALL
2022年07月13日
547 阅读
0 评论
0 点赞
1
2