首页
关于
Search
1
欢迎使用 Typecho
3 阅读
2
Centos7上部署属于自己的CSGO服务器
1 阅读
3
Plex云盘搭建及使用教程
1 阅读
4
Debian系统安装中文包
1 阅读
5
Linux中如何在后台运行Java的jar包
0 阅读
默认分类
登录
Search
标签搜索
Linux
CSGO
Plex
FlyPigs
累计撰写
6
篇文章
累计收到
1
条评论
首页
栏目
默认分类
页面
关于
搜索到
4
篇与
的结果
2023-12-06
Linux快速定位并且杀掉占用端口的进程
1.定位lsof -i:23333(23333为端口号)2.杀掉进程kill -9 63924(63924为PID号码)
2023年12月06日
0 阅读
0 评论
0 点赞
2023-12-06
Linux中如何在后台运行Java的jar包
1.直接运行最近在自己的服务器上玩,我的项目打包成jar后,在Linux使用 java – jar xxx.jar,可以正常运行,但是我的shell是被锁定的,我无法进行其他的操作,除非新打开另一个终端或者使用Ctrl+C结束当前的程序,显然这样不符合我的需求:java -jar server-0.0.1-SNAPSHOT.jar2.后台运行在命令后面加上 & ,那么这个进程就可以在后台运行了:java -jar server-0.0.1-SNAPSHOT.jar &我是需要这个项目一直运行着的,所以显然这种方式也无法满足我的需求。3.nohup方式运行nohup表示不挂断运行命令,即使shell关闭了,程序依然会在后台运行。nohup java -jar server-0.0.1-SNAPSHOT.jar >log.log &其中的>log.log表示将程序的输出重定向到log.log文件中,默认的情况下,是输出到当前目录下的nohup.out文件中。当我退出当前shell,打开新的窗口,再看可以发现这个进程依然在执行.那么我们要怎么才能让这个进程终止呢,很简单,使用kill命令就好了:4.进程终止ps kill(java******.jar)
2023年12月06日
0 阅读
0 评论
0 点赞
2023-12-06
Plex云盘搭建及使用教程
安装安装方法参考:https://www.plex.tv/downloads/。运行一下命令:#CentOS系统 yum -y update && yum -y install wget wget https://downloads.plex.tv/plex-media-server/1.12.1.4885-1046ba85f/plexmediaserver-1.12.1.4885-1046ba85f.x86_64.rpm yum install plexmediaserver*.rpm#Debian/Ubuntu系统 apt-get -y update && apt-get -y upgrade wget https://downloads.plex.tv/plex-media-server/1.5.5.3634-995f1dead/plexmediaserver_1.5.5.3634-995f1dead_amd64.deb dpkg -i plexmediaserver*.deb Docker安装方法请参考官方GitHub的说明:https://github.com/plexinc/pms-docker。设置Plex开机启动systemctl enable plexmediaserver.service systemctl start plexmediaserver.service 安装完成后进入http://IP:32400/就行了。如果无法访问,先检查运行状态。 systemctl status plexmediaserver 如果显示active,则一般是防火墙问题,关掉或打开端口即可。 #CentOS 7 systemctl stop firewalld.service systemctl disable firewalld.service #其它系统 iptables -I INPUT -p tcp --dport 32400 -j ACCEPT service iptables save service iptables restart使用如果第一次进入应用界面,会显示“找不到服务器。 下载并安装Plex Media Server,它会显示在这里”。因为初次使用是不允许远程访问Plex的,这里我们可以使用以下2种办法来解决这个问题。SSH转发端口先在电脑左下角程序搜索框输入PowerShell,然后双击Windows PowerShell工具,运行命令:ssh root@服务器IP -L 8888:localhost:32400 输入正确的密码后,再去浏览器里打开localhost:8888/web进入即可。隧道转发这里只列举常用的putty和xshell,其它自行模式,大致流程如下:xshell:点击plex服务器属性-隧道-添加,监听端口8888,目标端口32400putty:具体操作大概是connection–ssh–Tunnels,设置source port为8888,destination为127.0.0.1:32400先使用ssh连接服务器,然后再去浏览器里打开localhost:8888/web进入即可。
2023年12月06日
1 阅读
0 评论
0 点赞
2023-12-06
Centos7上部署属于自己的CSGO服务器
开工首先你得有一台服务器对吧,NAT也可以开,最好可以问一下商家有没有27015端口,让他直通给你。假设我们已经准备好了一台服务器,那么接下来我们来部署它。Centos7下我个人习惯是用宝塔面板来管理服务器所以我们先装个宝塔面板先官网 :宝塔面板然后安装完了面板,进去先改面板设置,怎么方便怎么来就是了,不过不推荐用默认的8888端口然后如果改了面板端口记得去SSH把这个端口放行这里我习惯直接关闭Centos7的防火墙systemctl stop firewalld.service systemctl disable firewalld.service完事了去宝塔面板的安全里面把你CSGO服务器的端口先放行了,一般都是27015然后进入到软件商店页面,这里我们可以选择性的装一个MySQL数据库,之后可以用到,然后把PureFTPD也装了,方便传文件,其他就暂时不用了之后你得有一个绑定了手机的Steam小号,用于生成GSLT,相当于开服的Key,为什么要用小号是因为以后加改皮肤模型的插件可能会被封网址:CSGO服务器管理GSLT{alert type="info"} GSLT creates a persistent token for a game server. This allows any users who added your server to favorites to join, even if you change your ip address. This is very useful if you change your server/hosting provider. {/alert}生成一个GSLT就行了,记一下等下要用安装服务接下来的话,该来安装CSGO服务器了一般我们都是用LinuxGSM来管理众多游戏服务器,CSGO是其中一个网址:LinuxGSM直接上命令:安装依赖 yum install epel-release yum install mailx postfix curl wget tar bzip2 gzip unzip python binutils bc jq tmux glibc.i686 libstdc++ libstdc++.i686 yum install python3 yum install zlib.i686 创建csgoserver用户 adduser csgoserver 修改密码 passwd csgoserver 切换到csgoserver用户 su - csgoserver 下载安装脚本 wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csgoserver 开始安装服务器 ./csgoserver install这个地方有个坑,GitHub的仓库被墙了,得改一手Host打开宝塔面板,hosts在/etc目录下,在这最后加一行就行了52.74.223.119 github.com 192.30.253.119 gist.github.com 54.169.195.247 api.github.com 185.199.111.153 assets-cdn.github.com 151.101.196.133 raw.githubusercontent.com 151.101.108.133 user-images.githubusercontent.com 151.101.76.133 gist.githubusercontent.com 151.101.76.133 cloud.githubusercontent.com 151.101.76.133 camo.githubusercontent.com 151.101.76.133 avatars0.githubusercontent.com 151.101.76.133 avatars1.githubusercontent.com 151.101.76.133 avatars2.githubusercontent.com 151.101.76.133 avatars3.githubusercontent.com 151.101.76.133 avatars4.githubusercontent.com 151.101.76.133 avatars5.githubusercontent.com 151.101.76.133 avatars6.githubusercontent.com 151.101.76.133 avatars7.githubusercontent.com 151.101.76.133 avatars8.githubusercontent.com之后就等它慢慢下载了,下完了它会问你是否成功安装然后要你输入GSTL,接下来还问你愿不愿意分享匿名数据,这个就看你自己了等它装好了,先别急着开,接下来我们要修改主配置文件:cd /home/csgoserver/lgsm/config-lgsm/csgoserver #直接把_default.cfg内的配置写到csgoserver.cfg: cat _default.cfg > csgoserver.cfg #然后把_default.cfg重命名让它里面的设置不生效也可以说是做个备份: mv _default.cfg _default.cfg.bak接着我们编辑csgoserver.cfg:vim csgoserver.cfg我的是这样配置的gslt="你的GSLT" defaultmap="de_mirage" maxplayers="12" tickrate="128" ip="0.0.0.0" port="27015" clientport="27005" sourcetvport="27020" gametype="0" gamemode="1" mapgroup="mg_active" fn_parms(){ parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} -nobots" }这个-nobots是不需要Bot的意思,看情况吧,另外双引号好像有没有都一样,我有点强迫症就都加算了{alert type="success"}休闲模式 +game_type 0 +game_mode 0竞技模式 +game_type 0 +game_mode 1军备竞赛 +game_type 1 +game_mode 0爆破模式 +game_type 1 +game_mode 1死亡竞赛 +game_type 1 +game_mode 2{/alert}修改配置好,接下来我们该来改一下主配置文件了/home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg可以照着默认改,之后就自由发挥了完成之后我们再来修改游戏的配置文件,这个配置文件主要的功能是修改服务器游戏内的一些设置,比如服务器的名字,服务器管理员密码之类的:vim /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg #其中hostname是服务器名字,rcon_password是管理员密码,其他的默认即可。服务器插件然后服务器插件肯定是少不了的,得去sourcemod以及metamodsource安装前置下载的时候选Stable Builds就是稳定版的意思就行了之后再去https://www.sourcemod.net里面找插件,这个就得自己折腾了,坑太多不想写另外如果你用宝塔面板上传文件的话,你得注意一下权限的问题,宝塔默认用户是wwwcsgo服务器它要求是csgoserver用户,得注意一下修改要用到的指令,自己看着改:chown -R csgoserver:csgoserver /home/csgoserver/serverfiles/你的文件名.cfg chmod 775 /home/csgoserver/serverfiles/你的文件名.cfg开服指令./csgoserver顺便说一下LinuxGSM的基础指令,记得要用csgoserver用户登录SSH:开服 ./csgoserver start 关服 ./csgoserver stop 重启 ./csgoserver restart 查看控制台 ./csgoserver console 更新服务器 ./csgoserver update 强制更新 ./csgoserver force-update 验证服务器完整性 ./csgoserver validate 查看服务器详细信息 ./csgoserver details Debug ./csgoserver debug 打包备份服务器 ./csgoserver backupCronjobs(设置自动更新程序)To automate LinuxGSM you can set scheduled tasks using cronjobs, to run any command at any given time. You can edit the crontab using the following.crontab -e Below are the recommended cron tasks.(三个自动化程序) */5 * * * * /home/csgoserver/csgoserver monitor > /dev/null 2>&1 */30 * * * * /home/csgoserver/csgoserver update > /dev/null 2>&1 0 0 * * 0 /home/csgoserver/csgoserver update-lgsm > /dev/n
2023年12月06日
1 阅读
0 评论
0 点赞