打包
- python 打包
文件放在Pyinstaller根目录下,pyinstaller -F test.py (https://my.oschina.net/u/4636319/blog/4973121)
- Hbuilder打包
发行-网站.导出h5路径下的static文件夹和index.html文件。
- 后端打包
maven里(root)先clean,再package。项目路径system文件夹下的boot-system-1.18.0.jar。启动java -jar XX.jar
- 前端打包
终端输入yarn run build。项目路径下dist文件夹。放到nginx html文件夹下,重启nginx。
安装nginx
https://blog.csdn.net/qq_44726330/article/details/128633641
配置nginx(服务器 设置防火墙,将刚才 nginx.conf 配置的端口对外暴露,对安全组进行配置)
https://blog.csdn.net/qq_44726330/article/details/128653969
远程连接服务器
user为服务器的用户名,一般为root,ip是服务器的ip ,默认端口号为22,例如:ssh root@172.12.134.12
emqx开机自启
https://blog.csdn.net/WangKun_0612/article/details/132490230
https://blog.csdn.net/qq_32024669/article/details/131536312
@echo off
%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
set EMQX_PATH=D:\emqx-5.1.4(地址)
set OUTPUT_FILE=%EMQX_PATH%\emqx_monitor.log
:loop
cd /d "%EMQX_PATH%"
REM 获取当前日期时间,并格式化为时间戳
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (
set year=%%a
set month=%%b
set day=%%c
)
for /f "tokens=1-3 delims=: " %%a in ('time /t') do (
set hour=0%%a
set minute=%%b
)
set timestamp=%year%-%month%-%day% %hour:~-2%:%minute%
cd bin
emqx_ctl status | findstr /C:"Node 'emqx@127.0.0.1'" | findstr /C:"is started" >NUL
IF "%ERRORLEVEL%"=="0" (
echo [%timestamp%] EMQX is running normally. >> %OUTPUT_FILE%
) ELSE (
echo [%timestamp%] EMQX is not running. Restarting... >> %OUTPUT_FILE%
REM 结束之前的 EMQX 进程,可以通过 taskkill 命令来实现
REM taskkill /f /im beam.smp.exe >NUL
start /b cmd /c "%EMQX_PATH%\bin\emqx start"
echo [%timestamp%] EMQX has started. >> %OUTPUT_FILE%
REM 如果 EMQX 不直接启动一个新窗口,可以将上面一行修改为以下内容
REM call %EMQX_PATH%\emqx start
)
timeout /t 60 > NUL
goto loop
创建快捷方式;WIN+R 打开机自启软件的根目录,输入 shell:startup (或者是C盘roamData 来着)
mongodb自动备份
https://www.jb51.net/article/66577.htm
@ECHO OFF
md D:\deployment\mongoDb\data\backup\%date:~0,4%-%date:~5,2%-%date:~8,2%\%time:~0,2%-%time:~3,2%
mongodump -h 192.168.0.198 -d rssapp -o D:\deployment\mongoDb\data\backup\%date:~0,4%-%date:~5,2%-%date:~8,2%\%time:~0,2%-%time:~3,2%
bat文件添加到windows的计划任务内
jar包开机自启
https://github.com/winsw/winsw
https://blog.csdn.net/qq_44959735/article/details/128611914
<service>
<!-- win服务名称-->
<id>testJar</id>
<name>testJar</name>
<!-- win服务名称描述 -->
<description>testJar...</description>
<startmode>Automatic</startmode>
<executable>java</executable>
<!-- 要启动的jar文件路径 -->
<arguments> -jar -Xmx256m -Xms256m "E:\testApp\test.jar"</arguments>
</service>