在Suma(中科可控)安装OpenEuler和Ukui及驱动

  1. 登入管理后台(ip可以在开机时左上角看到)
  2. 进入KVM界面
image-20241218162135545
  1. 右上角挂在镜像后开机
  2. 文本化安装即可

修改网卡自启动

阅读全文 »

Ubuntu下使用CUPS配置FUJI Xerox 3065驱动

  1. http://localhost:631 登入CUPS管理界面,
  2. 选择机型为Generic,驱动为Generic PCL 6/PCL Printer Foomatic/pxlcolor即可
e7f98c494fceca092424abb356029c1

LVM分区扩容

  1. 查看分区、挂载状况sudo lsblk
image-20241121091858907
  1. 查看LVM信息

sudo pvscan

阅读全文 »

Oracle上Ubuntu镜像安装Bt面板无法访问问题解决

1
2
3
4
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F

原因为镜像原始路由规则和宝塔面板冲突,清空所有路由规则

参考

https://www.bt.cn/bbs/thread-73159-1-1.html

阅读全文 »

Ubuntu下安装YouCompleteMe

安装Vundle

1
2
3
# 没有bundle文件夹的话创建即可
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vi ~/.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
set nocompatible              " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
  • Launchvimand run:PluginInstall
阅读全文 »

Python利用SSH隧道访问容器资源

1
2
3
4
5
6
7
8
9
10
11
12
13
from sshtunnel import SSHTunnelForwarder

def get_ssh_tunnel():
server = SSHTunnelForwarder(
ssh_address_or_host=('192.168.1.2', 22),
ssh_username='username',
ssh_password='ssh-password',
remote_bind_address=('10.16.3.3', 3306),
local_bind_address=('0.0.0.0', 3306)
)
server.start()

return server

参数含义:

ssh_address_or_host : 跳板机的 IP 和 Port ssh_username : 登录跳板机时使用的账户名称 ssh_password : 登录跳板机时使用的密码 remote_bind_address : 本地机器要访问的目标机器的IP(如果目标机器就是跳板机自己,则是 127.0.0.1)和 Port local_bind_address : SSH 隧道监听的本地机器的 IP(可以是 0.0.0.0 监听所有IP,也可以选择指定的网口) 和 Port

修改ssh设置允许端口转发

阅读全文 »

IPTV相关文档

自建IPTV +plex收看录制直播电视

  1. https://pixman.io/topics/17
  2. https://blog.csdn.net/u010567698/article/details/129341065
  3. https://blog.csdn.net/u010567698/article/details/129374077
  4. 使用Kodi播放
  5. 参考阅读,部分

https://livednow.com/migu/list?id=1400152068&token=nlps54A1CD5F5FA8BC42A833

Ubuntu使用Bolt连接MX Keys和MX Master

1
2
3
4
sudo pip3 install solaar --break-system-packages
git clone https://github.com/pwr-Solaar/Solaar.git /tmp/solaar
sudo cp /tmp/solaar/rules.d/42-logitech-unify-permissions.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

说明

  • 安装后重新插拔Bolt接收器
  • 可以不完全下载,只下载42-logitech-unify-permissions.rules文件即可

参考

阅读全文 »

基于Frp-XTCP的P2P连接配置

  • 被连接方
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
serverAddr = "frps公网服务器域名或ip"
serverPort = frps 服务端口

auth.token = "token 令牌"

loginFailExit = false

# 这里表示如果 xtcp 打洞失败时,使用 stcp 远程链接公司电脑
[[proxies]]
# stcp的服务名称要和家用电脑配置的serverName一致
name = "company_stcp_remote_desktop"
type = "stcp"
# 这个secretKey要和家用电脑一致
secretKey = "abcdefg"
localIP = "127.0.0.1"
# 公司电脑远程桌面端口(一般情况下会改成其它端口)
localPort = 3389
# 压缩传输内容
transport.useCompression = true

[[proxies]]
# xtcp的服务名称要和家用电脑配置的serverName一致
name = "company_xtcp_remote_desktop"
type = "xtcp"
secretKey = "abcdefg"
localIP = "127.0.0.1"
# 公司电脑远程桌面端口(一般情况下会改成其它端口)
localPort = 3389
# 压缩传输内容
transport.useCompression = true
  • 连接方
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
serverAddr = "frps公网服务器域名或ip"
serverPort = frps 服务端口

auth.token = "token 令牌"

loginFailExit = false

[[visitors]]
# 家用电脑 stcp visitors 名称(随意)
name = "company_stcp_remote_desktop_visitor"
type = "stcp"
# 公司电脑 stcp name
serverName = "company_stcp_remote_desktop"
secretKey = "abcdefg"
# stcp-visitor 的 bindPort 设置为 -1 表示不需要监听物理端口,只接受 fallback 的连接即可。
bindPort = -1
# 压缩传输内容
transport.useCompression = true

[[visitors]]
# 家用电脑 xtcp visitors 名称(随意)
name = "company_xtcp_remote_desktop_visitor"
type = "xtcp"
# 公司电脑 xtcp name
serverName = "company_xtcp_remote_desktop"
secretKey = "abcdefg"
bindAddr = "127.0.0.1"
# 使用家用电脑的23389端口远程桌面链接到公司电脑3389端口电脑(注意:Windows必须是专业版的,并且要启用远程桌面和设置密码)
bindPort = 23389
# 压缩传输内容
transport.useCompression = true
# 配置了 keepTunnelOpen = true 时,frpc 会定期检测隧道是否打开,如果没有,则会尝试打洞建立隧道,这样可以始终保持隧道打开,在需要连接对端服务时,可以避免延迟。
keepTunnelOpen = true
# 如果 xtcp 打洞失败,则使用 stcp 进行链接,fallbackTo = 上面的 stcp name
fallbackTo = "company_stcp_remote_desktop_visitor"
# 当连接 127.0.0.1:23389 超过 200ms p2p 打洞还未成功的话,会回退到使用 company_stcp_remote_desktop_visitor 建立连接。
fallbackTimeoutMs = 200
阅读全文 »

Docker配置代理

背景

  • 使用加速镜像依旧拉取失败

配置

1
2
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf
阅读全文 »
0%