20231019 备份
This commit is contained in:
parent
0e9b1cc5a5
commit
f7bb4ebe19
|
@ -1,3 +1,3 @@
|
|||
# 启动文件的选择
|
||||
|
||||
# 启动文件的选择
|
||||
|
||||
![RCU](../../.image/c08ec715-6e8a-45fc-86ff-187265b0e861.png)
|
|
@ -1,14 +1,14 @@
|
|||
# .net core 远程调试
|
||||
|
||||
|
||||
```
|
||||
mkdir /root/.vs-debugger
|
||||
|
||||
curl -sSL -k https://aka.ms/getvsdbgsh -o /root/.vs-debugger/GetVsDbg.sh
|
||||
|
||||
#没有下载包执行此命令
|
||||
bash /root/.vs-debugger/GetVsDbg.sh -v latest -l /vsdbg
|
||||
|
||||
#下载过安装包执行此命令
|
||||
bash /root/.vs-debugger/GetVsDbg.sh -v latest -l /vsdbg -e /root/.vs-debugger/vsdbg-linux-arm64.tar.gz -u
|
||||
# .net core 远程调试
|
||||
|
||||
|
||||
```
|
||||
mkdir /root/.vs-debugger
|
||||
|
||||
curl -sSL -k https://aka.ms/getvsdbgsh -o /root/.vs-debugger/GetVsDbg.sh
|
||||
|
||||
#没有下载包执行此命令
|
||||
bash /root/.vs-debugger/GetVsDbg.sh -v latest -l /vsdbg
|
||||
|
||||
#下载过安装包执行此命令
|
||||
bash /root/.vs-debugger/GetVsDbg.sh -v latest -l /vsdbg -e /root/.vs-debugger/vsdbg-linux-arm64.tar.gz -u
|
||||
```
|
|
@ -1,32 +1,32 @@
|
|||
# 安装 .NET 7
|
||||
|
||||
* 下载脚本
|
||||
|
||||
```
|
||||
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
||||
```
|
||||
|
||||
* 授予此脚本作为可执行文件运行的权限
|
||||
|
||||
```
|
||||
chmod +x ./dotnet-install.sh
|
||||
```
|
||||
|
||||
* 安装
|
||||
|
||||
```
|
||||
./dotnet-install.sh --channel 7.0 --runtime aspnetcore
|
||||
```
|
||||
|
||||
* 设置环境变量
|
||||
|
||||
```
|
||||
vim ~/.bashrc
|
||||
export DOTNET_ROOT=$HOME/.dotnet
|
||||
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
|
||||
```
|
||||
|
||||
* 使环境变量生效
|
||||
```
|
||||
source ~/.bashrc
|
||||
# 安装 .NET 7
|
||||
|
||||
* 下载脚本
|
||||
|
||||
```
|
||||
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
||||
```
|
||||
|
||||
* 授予此脚本作为可执行文件运行的权限
|
||||
|
||||
```
|
||||
chmod +x ./dotnet-install.sh
|
||||
```
|
||||
|
||||
* 安装
|
||||
|
||||
```
|
||||
./dotnet-install.sh --channel 7.0 --runtime aspnetcore
|
||||
```
|
||||
|
||||
* 设置环境变量
|
||||
|
||||
```
|
||||
vim ~/.bashrc
|
||||
export DOTNET_ROOT=$HOME/.dotnet
|
||||
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
|
||||
```
|
||||
|
||||
* 使环境变量生效
|
||||
```
|
||||
source ~/.bashrc
|
||||
```
|
|
@ -1,72 +1,72 @@
|
|||
# 开机启动
|
||||
|
||||
### 复制程序到 /opt 目录下
|
||||
|
||||
```
|
||||
cp /root/works/console_app/console_app /opt/app
|
||||
```
|
||||
|
||||
### 创建启动脚本
|
||||
|
||||
* 切换目录, 并创建文件
|
||||
|
||||
```
|
||||
cd /opt
|
||||
vim run.sh
|
||||
```
|
||||
|
||||
* run.sh 文件内容
|
||||
|
||||
```
|
||||
#! /bin/bash
|
||||
|
||||
cd /opt/
|
||||
./app
|
||||
```
|
||||
|
||||
### 创建服务
|
||||
|
||||
* 切换目录, 并创建文件
|
||||
|
||||
```
|
||||
cd /etc/systemd/system
|
||||
vim console_app.service
|
||||
```
|
||||
|
||||
* console_app.service 文件内容
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=console app server
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
#ExecStart=/home/rpdzkj/works/console_app/console_app
|
||||
ExecStart=/opt/run.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
# 30秒后在启动服务
|
||||
TimeoutStartSec=infinity
|
||||
ExecStartPre=/bin/sleep 30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
### 重新加载 Systemd
|
||||
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
### 启动服务
|
||||
|
||||
```
|
||||
sudo systemctl start console_app
|
||||
```
|
||||
|
||||
### 开机启动
|
||||
|
||||
```
|
||||
sudo systemctl enable console_app
|
||||
# 开机启动
|
||||
|
||||
### 复制程序到 /opt 目录下
|
||||
|
||||
```
|
||||
cp /root/works/console_app/console_app /opt/app
|
||||
```
|
||||
|
||||
### 创建启动脚本
|
||||
|
||||
* 切换目录, 并创建文件
|
||||
|
||||
```
|
||||
cd /opt
|
||||
vim run.sh
|
||||
```
|
||||
|
||||
* run.sh 文件内容
|
||||
|
||||
```
|
||||
#! /bin/bash
|
||||
|
||||
cd /opt/
|
||||
./app
|
||||
```
|
||||
|
||||
### 创建服务
|
||||
|
||||
* 切换目录, 并创建文件
|
||||
|
||||
```
|
||||
cd /etc/systemd/system
|
||||
vim console_app.service
|
||||
```
|
||||
|
||||
* console_app.service 文件内容
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=console app server
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
#ExecStart=/home/rpdzkj/works/console_app/console_app
|
||||
ExecStart=/opt/run.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
# 30秒后在启动服务
|
||||
TimeoutStartSec=infinity
|
||||
ExecStartPre=/bin/sleep 30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
### 重新加载 Systemd
|
||||
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
### 启动服务
|
||||
|
||||
```
|
||||
sudo systemctl start console_app
|
||||
```
|
||||
|
||||
### 开机启动
|
||||
|
||||
```
|
||||
sudo systemctl enable console_app
|
||||
```
|
5
Ubuntu/动态查看文件.md
Normal file
5
Ubuntu/动态查看文件.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# 动态查看文件
|
||||
|
||||
```
|
||||
tail -f 文件名
|
||||
```
|
56
香橙排打印机(orangepi)/打印脚本.md
Normal file
56
香橙排打印机(orangepi)/打印脚本.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# 打印脚本
|
||||
|
||||
* printer.sh
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "FALSE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#删除所有的打印任务
|
||||
lprm
|
||||
|
||||
#删除默认打印机
|
||||
lpadmin -x DS-RX1HS
|
||||
|
||||
#查找打印机
|
||||
result=`lpinfo -v | grep direct`
|
||||
if [ -n "$result" ]
|
||||
then
|
||||
directs=`echo $result | cut -d " " -f 2`
|
||||
|
||||
# 重启CUPS服务
|
||||
service cups restart
|
||||
|
||||
# 重新添加驱动
|
||||
lpadmin -p DS-RX1HS -E -v "$directs" -m gutenprint.5.2://dnp-dsrx1/expert
|
||||
|
||||
# 设置默认打印机
|
||||
lpoptions -d DS-RX1HS
|
||||
|
||||
# 激活
|
||||
cupsenable DS-RX1HS
|
||||
|
||||
# 设置为接受作业
|
||||
cupsaccept DS-RX1HS
|
||||
|
||||
# 查询默认打印机
|
||||
result=`lpstat -d | cut -d ":" -f 2`
|
||||
|
||||
if [ -n "$result" ]
|
||||
then
|
||||
# 打印机驱动重新加载成功
|
||||
PrintPhoto DS-RX1HS $1
|
||||
echo "TRUE"
|
||||
else
|
||||
# 打印机驱动重新加载失败
|
||||
echo "FALSE"
|
||||
fi
|
||||
else
|
||||
# 打印机不存在
|
||||
echo "FALSE"
|
||||
fi
|
||||
```
|
|
@ -1,48 +1,48 @@
|
|||
# 添加打印机驱动脚本
|
||||
|
||||
* 需要进行[环境搭建](./环境搭建.md), 脚本文件如下:
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
echo "删除所有的打印任务"
|
||||
lprm
|
||||
|
||||
echo "删除默认打印机"
|
||||
lpadmin -x DS-RX1HS
|
||||
|
||||
echo "查找打印机"
|
||||
result=`lpinfo -v | grep direct`
|
||||
if [ -n "$result" ]
|
||||
then
|
||||
directs=`echo $result | cut -d " " -f 2`
|
||||
echo "打印机=$directs"
|
||||
|
||||
echo "重启CUPS服务"
|
||||
service cups restart
|
||||
|
||||
echo "重新添加驱动"
|
||||
lpadmin -p DS-RX1HS -E -v "$directs" -m gutenprint.5.2://dnp-dsrx1/expert
|
||||
|
||||
echo "设置默认打印机"
|
||||
lpoptions -d DS-RX1HS
|
||||
|
||||
echo "激活"
|
||||
cupsenable DS-RX1HS
|
||||
|
||||
echo "设置为接受作业"
|
||||
cupsaccept DS-RX1HS
|
||||
|
||||
echo "查询默认打印机"
|
||||
result=`lpstat -d | cut -d ":" -f 2`
|
||||
|
||||
if [ -n "$result" ]
|
||||
then
|
||||
echo "打印机驱动重新加载成功"
|
||||
else
|
||||
echo "打印机驱动重新加载失败"
|
||||
fi
|
||||
else
|
||||
echo "打印机不存在"
|
||||
fiS
|
||||
# 添加打印机驱动脚本
|
||||
|
||||
* 需要进行[环境搭建](./环境搭建.md), 脚本文件如下:
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
echo "删除所有的打印任务"
|
||||
lprm
|
||||
|
||||
echo "删除默认打印机"
|
||||
lpadmin -x DS-RX1HS
|
||||
|
||||
echo "查找打印机"
|
||||
result=`lpinfo -v | grep direct`
|
||||
if [ -n "$result" ]
|
||||
then
|
||||
directs=`echo $result | cut -d " " -f 2`
|
||||
echo "打印机=$directs"
|
||||
|
||||
echo "重启CUPS服务"
|
||||
service cups restart
|
||||
|
||||
echo "重新添加驱动"
|
||||
lpadmin -p DS-RX1HS -E -v "$directs" -m gutenprint.5.2://dnp-dsrx1/expert
|
||||
|
||||
echo "设置默认打印机"
|
||||
lpoptions -d DS-RX1HS
|
||||
|
||||
echo "激活"
|
||||
cupsenable DS-RX1HS
|
||||
|
||||
echo "设置为接受作业"
|
||||
cupsaccept DS-RX1HS
|
||||
|
||||
echo "查询默认打印机"
|
||||
result=`lpstat -d | cut -d ":" -f 2`
|
||||
|
||||
if [ -n "$result" ]
|
||||
then
|
||||
echo "打印机驱动重新加载成功"
|
||||
else
|
||||
echo "打印机驱动重新加载失败"
|
||||
fi
|
||||
else
|
||||
echo "打印机不存在"
|
||||
fiS
|
||||
```
|
Loading…
Reference in New Issue
Block a user