当前位置: 首页 > news >正文

网站管理的内容安平网站建设优化

网站管理的内容,安平网站建设优化,易语言 做的网站,整站建设和网站优化官方Github#xff1b;官方下载地址。没有Git加速的话很难下载#xff0c;分享一下发布日期为2023.01.29的当前最新稳定版v2.12.0网盘连接。 包含文件#xff1a; WinSW-x64.exesample-minimal.xmlsample-allOptions.xml 链接#xff1a;https://pan.baidu.com/s/1sN3hL5H…官方Github官方下载地址。没有Git加速的话很难下载分享一下发布日期为2023.01.29的当前最新稳定版v2.12.0网盘连接。 包含文件 WinSW-x64.exesample-minimal.xmlsample-allOptions.xml 链接https://pan.baidu.com/s/1sN3hL5HvFzzNwuz8npaQNw 提取码vsvg 为什么要注册为服务 服务器重启后服务可以自行重启。 WinSW官网使用说明及实例分享 1.官网使用说明1.1 使用配置说明Use WinSW as a global toolUse WinSW as a bundled toolSample configuration file 1.2 Usage 2.实例分享2.1 将exe注册成服务2.2 将jar注册成服务 3.总结 1.官网使用说明 1.1 使用配置说明 Use WinSW as a global tool Take WinSW.exe or WinSW.zip from the distribution.Write myapp.xml (see the XML config file specification and samples for more details).Run winsw install myapp.xml [options] to install the service.Run winsw start myapp.xml to start the service.Run winsw status myapp.xml to see if your service is up and running. 作为全局工具使用不同服务使用不同的xml文件进行操作。 Use WinSW as a bundled tool Take WinSW.exe or WinSW.zip from the distribution, and rename the .exe to your taste (such as myapp.exe).Write myapp.xml (see the XML config file specification and samples for more details).Place those two files side by side, because that’s how WinSW discovers its co-related configuration.Run myapp.exe install [options] to install the service.Run myapp.exe start to start the service. 作为绑定工具使用默认使用同名的xml文件进行操作个人感觉这种方式更适合实施的小伙伴儿。 Sample configuration file You write the configuration file that defines your service. The example below is a primitive example being used in the Jenkins project: serviceidjenkins/idnameJenkins/namedescriptionThis service runs Jenkins continuous integration system./descriptionenv nameJENKINS_HOME value%BASE%/executablejava/executablearguments-Xrs -Xmx256m -jar %BASE%\jenkins.war --httpPort8080/argumentslog moderoll/log /serviceThe full specification of the configuration file is available here. You can find more samples here. 这个配置文件举例是很典型的可执行文件参数适合很多服务。 1.2 Usage WinSW is being managed by the XML configuration file. Your renamed WinSW.exe binary also accepts the following commands: CommandDescriptioninstallInstalls the service.uninstallUninstalls the service.startStarts the service.stopStops the service.restartStops and then starts the service.statusChecks the status of the service.refreshRefreshes the service properties without reinstallation.customizeCustomizes the wrapper executable.devExperimental commands. Experimental commands: CommandDescriptiondev psDraws the process tree associated with the service.dev killTerminates the service if it has stopped responding.dev listLists services managed by the current executable. Most commands require Administrator privileges to execute. WinSW will prompt for UAC in non-elevated sessions. 这些命令不再详细说明用到的时候再介绍。 2.实例分享 2.1 将exe注册成服务 这里使用对象存储MinIO的minio.exe进行Use WinSW as a bundled tool举例详细步骤如下 将WinSW-x64.exe重命名为minio-server.ext添加配置文件minio-server.xim内容如下配置详情可查看sample-allOptions.xml serviceidminio-server/idnameMinIO-Server/namedescriptionThis service runs MINIO OBJECT STORE./descriptionenv nameMINIO_HOME value%BASE%/executable%BASE%\minio.exe/executableargumentsserver D:\minio_data --console-address :9001/argumentslogpath%BASE%\logs/logpathlog moderoll-by-size-timesizeThreshold1024/sizeThresholdpatternyyyyMMdd/patternautoRollAtTime00:00:00/autoRollAtTimezipOlderThanNumDays5/zipOlderThanNumDayszipDateFormatyyyyMMdd/zipDateFormat/logenv nameMINIO_ROOT_USER valueadmin /env nameMINIO_ROOT_PASSWORD valueadmin123 / /servicecmd执行命令minio-server.exe install安装为服务此时服务并未启动 INFO - Installing service MinIO-Server (minio-server)... INFO - Service MinIO-Server (minio-server) was installed successfully.执行命令minio-server.exe start启动服务 完整流程测试 2.2 将jar注册成服务 这里使用 Arthas阿尔萨斯用于测试的math-game.jar包进行Use WinSW as a bundled tool举例详细步骤如下 将WinSW-x64.exe重命名为math-game-server.exe添加配置文件math-game-server.xml内容如下 serviceidmath-game-server/idnameMath-Game-Server/namedescriptionThis service runs math-game server./descriptionenv nameMATHGAME_HOME value%BASE%/executablejava/executablearguments-Xrs -Xmx128m -jar %BASE%\math-game.jar/argumentslogpath%BASE%\logs/logpathlog moderoll-by-size-timesizeThreshold1024/sizeThresholdpatternyyyyMMdd/patternautoRollAtTime00:00:00/autoRollAtTimezipOlderThanNumDays5/zipOlderThanNumDayszipDateFormatyyyyMMdd/zipDateFormat/log /service-Xrs 参数是Reduce Signal Usage的缩写它告诉JVM降低对操作系统信号的使用。通常情况下JVM会捕获一些操作系统信号如SIGTERM终止信号和SIGINT中断信号用于优雅地关闭Java进程。然而使用 -Xrs 参数后JVM会尽量减少对这些信号的使用而是依赖于Java代码来处理关闭操作。这可以提高JVM在某些情况下的稳定性。 cmd执行命令math-game-server.exe install安装为服务此时服务并未启动状态为已停止 INFO - Installing service Math-Game-Server (math-game-server)... INFO - Service Math-Game-Server (math-game-server) was installed successfully.执行命令minio-server.exe start启动服务 启动后打印的日志 跟exe一样这里仅作部分测试 3.总结 WinSWWindows Service Wrapper是一个开源的项目它允许将任何可执行文件通常是.NET应用程序、exe应用程序、Java JAR文件等转化为Windows服务。WinSW的目标是使在Windows操作系统上运行非Windows服务变得更加容易。它提供了一种将应用程序包装为Windows服务的方式允许你以服务的形式启动、停止、暂停和恢复应用程序。 以下是WinSW的主要特点和用途 应用程序包装为服务WinSW允许你将各种类型的应用程序包装为Windows服务而无需修改应用程序代码。这对于将常规应用程序部署为服务非常有用。简化管理一旦应用程序被包装为服务你可以使用Windows服务管理器或命令行工具来管理它例如sc命令。这使得在Windows上部署和管理应用程序更加方便。自定义配置WinSW允许你通过XML或YAML配置文件自定义服务的行为包括服务名称、描述、工作目录、启动参数等。这使得你可以灵活地配置服务以适应不同的需求。
http://www.dnsts.com.cn/news/85650.html

相关文章:

  • 在线生成电子印章张家口建站优化
  • 国外网站排行宁波网站建设与推广方案
  • 企业网站开发制作费入那里西安注册公司流程及资料
  • 网站开发工程师培训班如何做网站的逻辑结构图
  • 郑州网站制作多少钱电商哪个平台好做
  • 做一电影网站怎么赚钱如何在外管局网站做付汇延期
  • 云空间网站怎么做做自媒体好还是网站好
  • 做课展网站网络营销策划创意案例点评
  • wordpress网站建设软件开发培训难学吗
  • 视频网站开发视频东莞网页设计公司排名
  • 网站上怎么做推广比较好呢乐清手机网站优化推广
  • 做网站设计师的感想dw怎样制作网页
  • 营口 微网站建设能不能用自己的主机做网站
  • 网站可信认证在哪里做郑州睿网站建设
  • 做网站按钮相城专业的网站建设
  • 平台兼职网站开发发布工程信息的网站有哪些
  • 手机网站页面html网站建设的步骤
  • 校园网站建设中期报告我要做个网站该怎么做
  • 模板网站缺点徐州集团网站建设报价
  • 北京网站建设小鱼在线淘宝手机版网页
  • 制作微信公众的网站开发优化设计答案六年级
  • 贵阳网站建设odenet网站维护 年费
  • 网站 优化进qq空间上面没有网站
  • 潜江网站开发啄木鸟网站建设
  • 游戏网站平台怎么做的网页图片制作
  • 目前最好的网站建设企业微信优惠券网站怎么做
  • 狮山网站开发商城网站建设公司地址
  • 深圳房地产网站设计重庆电子网站建设
  • 网站的建设有什么好处织梦小说网站模板下载
  • 站点的几种推广方式汉口网站关键词排名