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

ubuntu远程服务部署,Docker,蓝牙无线局域网,SSH,VNC,xfce4,NextTerminal,宝塔,NPS/NPC,gost,openwrt

SSH服务

apt update
apt upgrade -y
apt install -y openssh-server

/etc/ssh/sshd_config

PermitRootLogin yes

Docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
apt install -y docker-compose

宝塔

wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh ed8484bec

Next-Terminal

docekr-compose up -d

docker-compose.yaml

version: '3.3'
services:guacd:image: registry.cn-beijing.aliyuncs.com/dushixiang/guacd:latestrestart:alwaysnext-terminal:image: registry.cn-beijing.aliyuncs.com/dushixiang/next-terminal-pro:latestenvironment:DB: sqliteGUACD_HOSTNAME: guacdGUACD_PORT: 4822ports:- "8088:8088"volumes:- /etc/localtime:/etc/localtime- ./data:/usr/local/next-terminal/datarestart:always

xfce4

apt install -y xfce4 xfce4-terminal language-pack-zh-hans

/root/.vnc/xstartup

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4

或者

#!/bin/sh
# Start up the standard system desktop
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS/usr/bin/gnome-session[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
x-window-manager 

VNC

apt install -y tigervnc-standalone-servervncpasswd
vncserver -list
vncserver -localhost no :1
vncserver -kill :1

vim /etc/init.d/vncserver_start

#!/bin/sh
### BEGIN INIT INFO
# Provides:          $vncserver_start
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop vncserver_start
### END INIT INFO# More details see:
# http://www.penguintutor.com/linux/tightvnc### Customize this entry
# Set the USER variable to the name of the user to start tightvncserver under
export USER='root'
### End customization requiredeval cd ~$USERcase "$1" instart)su $USER -c '/usr/bin/vncserver -localhost no'echo "Starting VNC server for $USER ";;stop)su $USER -c '/usr/bin/vncserver -kill :1'echo "vncserver stopped";;*)echo "Usage: /etc/init.d/vncserver {start|stop}"exit 1;;
esac
exit 0
chmod 777 /etc/init.d/vncserver_start
update-rc.d vncserver_start defaults
systemctl daemon-reload
systemctl status vncserver_start.service 
systemctl enable vncserver_start.service
systemctl start vncserver_start.service

蓝牙无线局域网

apt install bluetooth
apt install blueman
/etc/init.d/bluetooth start

配网指令

mntui

gost

docker-compose.yaml

version: '3.3'
services:gost_t:restart: alwayscontainer_name: gost_timage: gogost/gostnetwork_mode: hostvolumes:- ./gost.yml:/etc/gost.ymlcommand: -C /etc/gost.yml

gost.yml

services:
- name: s5_http_https_proxyaddr: :7080handler:type: autolistener:type: tcp

NPS&NPC

conf/nps.conf

appname = nps
#Boot mode(dev|pro)
runmode = dev#HTTP(S) proxy port, no startup if empty
http_proxy_ip=0.0.0.0
http_proxy_port=480
https_proxy_port=4443
https_just_proxy=true
#default https certificate setting
https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key##bridge
bridge_type=tcp
bridge_port=8024
bridge_ip=0.0.0.0# Public password, which clients can use to connect to the server
# After the connection, the server will be able to open relevant ports and parse related domain names according to its own configuration file.
public_vkey=123#Traffic data persistence interval(minute)
#Ignorance means no persistence
#flow_store_interval=1# log level LevelEmergency->0  LevelAlert->1 LevelCritical->2 LevelError->3 LevelWarning->4 LevelNotice->5 LevelInformational->6 LevelDebug->7
log_level=7
#log_path=nps.log#Whether to restrict IP access, true or false or ignore
#ip_limit=true#p2p
#p2p_ip=127.0.0.1
#p2p_port=6000#web
web_host=tong.cmclound.com
web_username=admin
web_password=cw
web_port = 4080
web_ip=0.0.0.0
web_base_url=
web_open_ssl=false
web_cert_file=conf/server.pem
web_key_file=conf/server.key
# if web under proxy use sub path. like http://host/nps need this.
#web_base_url=/nps#Web API unauthenticated IP address(the len of auth_crypt_key must be 16)
#Remove comments if needed
#auth_key=test
auth_crypt_key =1234567812345678#allow_ports=9001-9009,10001,11000-12000#Web management multi-user login
allow_user_login=false
allow_user_register=false
allow_user_change_username=false#extension
allow_flow_limit=false
allow_rate_limit=false
allow_tunnel_num_limit=false
allow_local_proxy=false
allow_connection_num_limit=false
allow_multi_ip=false
system_info_display=false#cache
http_cache=false
http_cache_length=100#get origin ip
http_add_origin_header=false#pprof debug options
#pprof_ip=0.0.0.0
#pprof_port=9999#client disconnect timeout
disconnect_timeout=60

nps

version: "3.0"
services:nps_t:image: ffdfgdfg/npshostname: ppycontainer_name: nps_tnetwork_mode: hostvolumes:- ./conf:/confrestart: alwaysprivileged: true

npc

version: '3.3'
services:npc_t:restart: alwayscontainer_name: npc_timage: ffdfgdfg/npcnetwork_mode: hostcommand: -server=tong.cmclound.com:8024 -vkey=flzjzkbn2frjwy6s -type=tcp

docker openwrt

#!/bin/bashnic="enp1s0"
subnet="192.168.31.0/24"
gateway="192.168.31.1"
networkname="onething_wxynet"
containername="openwrt"ip link set ${nic} promisc on
docker network create -d macvlan --subnet=${subnet} --gateway=${gateway} -o parent=${nic} ${networkname}
docker run --restart always --name ${containername} -d --network ${networkname} --privileged sulinggg/openwrt:x86_64  /sbin/init
docker cp ./network ${containername}:/etc/config/network
docker restart ${containername}

network,容器内部的/etc/config/network

config interface 'loopback'option ifname 'lo'option proto 'static'option ipaddr '127.0.0.1'option netmask '255.0.0.0'config interface 'lan'option type 'bridge'option ifname 'eth0'option proto 'static'option netmask '255.255.255.0'option ip6assign '60'option ipaddr '192.168.31.111'option gateway '192.168.31.1'option dns '192.168.31.1'

docker_ubuntu_vnc_ssh_xfce4

Dockerfile

FROM ubuntu
ENV LANG C.UTF-8WORKDIR /homeRUN echo 'root:cw' | chpasswd
RUN printf '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d#COPY ./sources.list /etc/apt/sources.listRUN apt update
RUN apt upgrade -yRUN apt install -y openssh-client openssh-server
RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
RUN echo "Port 8422" >> /etc/ssh/sshd_config
EXPOSE 8422
RUN apt install -y wget telnet vim make iproute2 net-tools gccRUN apt update
RUN apt upgrade -y
RUN apt install -y xfce4
RUN apt install -y tigervnc-standalone-serverCMD ["/usr/sbin/sshd", "-D"]

docker-compose.yaml

version: '3.1'services:ubuntu_ssh_vnc_t:build: .image: ubuntu_ssh_vnc:v1volumes:  - ./workspace:/workspacecontainer_name: ubuntu_ssh_vnc_tports:- "7922:8422"- "7901:5901"working_dir: /workspacerestart: alwaysprivileged: truetty: truecap_add: - ALL

sources.list

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universedeb http://mirrors.aliyun.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security universe
deb http://security.ubuntu.com/ubuntu/ focal-security multiverse

workspace/xstartup

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4

NasCab

docker-compose.yaml

version: '3'
services:nascab:image: ypptec/nascabcontainer_name: nascabrestart: alwaysports:- "8760:80"- "5620:90"volumes:- ./data:/root/.local/share/nascab- ./myData:/myData

相关文章:

ubuntu远程服务部署,Docker,蓝牙无线局域网,SSH,VNC,xfce4,NextTerminal,宝塔,NPS/NPC,gost,openwrt

SSH服务 apt update apt upgrade -y apt install -y openssh-server/etc/ssh/sshd_config PermitRootLogin yesDocker curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun apt install -y docker-compose宝塔 wget -O install.sh https://download.bt.cn…...

kettle安装与部署使用教程

kettle 官网下载与部署使用 文章目录 kettle 官网下载与部署使用1. 前言:2. 访问官方网站:3. Download Pentaho3.1 官网首页**滑动到最底**,寻找下载链接:3.2 跳转到下载界面后,选择 Pentaho Community Edition (CE)3.…...

【C语言】编译和链接

1. 翻译环境和运行环境 在ANSI C的任何⼀种实现中,存在两个不同的环境。 第1种是翻译环境,在这个环境中源代码被转换为可执⾏的机器指令(⼆进制指令)。 第2种是执⾏环境,它⽤于实际执⾏代码。 2. 编译环境 那翻译环境…...

Python学习: 错误和异常

Python 语法错误 解析错误(Parsing Error)通常指的是程序无法正确地解析(识别、分析)所给定的代码,通常是由于代码中存在语法错误或者其他无法理解的结构导致的。这可能是由于缺少括号、缩进错误、未关闭的引号或其他括号等问题造成的。 语法错误(Syntax Error)是指程序…...

WebGIS 之 vue3+vite+ceisum

1.项目搭建node版本在16以上 1.1创建项目 npm create vite 项目名 1.2选择框架 vuejavaScript 1.3进入项目安装依赖 cd 项目名 npm install 1.4安装cesium依赖 pnpm i cesium vite-plugin-cesium 1.5修改vite.config.js文件 import { defineConfig } from vite import vue fr…...

## CSDN创作活动:AI技术创业有哪些机会?

AI技术创业有哪些机会? 人工智能(AI)技术作为当今科技创新的前沿领域,为创业者提供了广阔的机会和挑战。随着AI技术的快速发展和应用领域的不断拓展,未来AI技术方面会有哪些创业机会呢? 方向一&#xff1…...

中医肝胆笔记

目录 肝胆的经络足厥阴肝经足少阳胆经 疏肝健脾的药舒肝益脾颗粒:逍遥丸:疏肝颗粒 -> 疏肝理气的力度大-> 肝郁的程度深,逍遥丸没用的是时候用这个加味逍遥丸 -> 清热的力度最大->适用 肝郁火大,舌苔黄丹栀逍遥丸->…...

理解Go语言中break语句是如何工作的

break语句常用来中断循环。当循环与switch或select一起使用时,开发者经常执行了错误的break语句。 让我们来看下面的示例。我们在for循环里使用了switch,如果循环索引值是2,那么我们想中断循环: package mainimport ("fmt" )func …...

11. 瀑布流布局

<!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8" /><meta name"viewport" content"widthdevice-width, initial-scale1.0" /><title>11.瀑布流布局</title><style>#cont…...

Flutter-发布插件到pub上传不上问题

问题1&#xff1a; 尝试指令&#xff1a; flutter packages pub publish --serverhttps://pub.dartlang.org问题2&#xff1a; 问题1解决后&#xff0c;进入验证身份&#xff0c;点击终端显示的链接&#xff0c;跳转到google验证&#xff0c;记得这里要科*学上网&#xff0c;点…...

Windows 2008虚拟机安装、安装VM Tools、快照和链接克隆、添加硬盘修改格式为GPT

一、安装vmware workstation软件 VMware workstation的安装介质&#xff0c;获取路径&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1AUAw_--yjZAUPbsR7StOJQ 提取码&#xff1a;umz1 所在目录&#xff1a;\vmware\VMware workstation 15.1.0 1.找到百度网盘中vmwa…...

c++的学习之路:12、vector(1)

这章主要是根据cplusplus中的文档进行使用Vector&#xff0c;文章末附上测试代码。 目录 一、什么是vector 二、vector的简单使用 三、代码 一、什么是vector 下图是cplusplus的简介&#xff0c;上面一共有六点&#xff0c;如下&#xff1a; 1、vector是表示可变大小数组…...

2024.2.17力扣每日一题——N叉树的层序遍历

2024.2.17 题目来源我的题解方法一 广度优先搜索&#xff08;队列实现&#xff09; 题目来源 力扣每日一题&#xff1b;题序&#xff1a;429 我的题解 方法一 广度优先搜索&#xff08;队列实现&#xff09; 和二叉树的层序遍历相同&#xff0c;只是在添加子节点的细节有所不…...

滑动窗口(尺取法/Python)

滑动窗口&#xff08;尺取法&#xff09; 算法含义&#xff1a; 在解决关于区间特性的题目时保存搜索区间左右端点&#xff0c;然后根据实际要求不断更新左右端点位置的算法 时间复杂度&#xff1a; O ( n ) O(n) O(n) 空间复杂度&#xff1a; O ( 1 ) O(1) O(1) 在历年真题…...

【打印SQL执行日志】⭐️Mybatis-Plus通过配置在控制台打印执行日志

目录 前言 一、Mybatis-Plus 开启日志的方式 二、测试 三、日志分析 章末 前言 小伙伴们大家好&#xff0c;相信大家平时在处理问题时都有各自的方式&#xff0c;最常用以及最好用的感觉还是断点调试&#xff0c;但是涉及到操作数据库的执行时&#xff0c;默认的话在控制台…...

Vue后台管理系统常用组件的优缺点分析

以下是Vue后台管理系统常用组件的优缺点分析&#xff1a; Element UI 优点&#xff1a; 丰富的组件库&#xff1a;Element UI 提供了大量的组件&#xff0c;包括表单、表格、弹窗、导航等&#xff0c;可以满足各种后台管理系统的需求。易于使用&#xff1a;Element UI 的组件…...

栈的应用——用栈实现算数混合运算表达式的计算

1、单目运算符双目运算符 算数运算符分为单目运算符和双目运算符等 单目运算符只需要一个操作数,双目运算符需要两个操作数 双目运算符最常见:常见的算术运算符:*/,比较运算符:<>=等等以下是一些单目运算符:正号 (+): 用于表示正数或给数值一个正号。例如:+5 仍然…...

动态规划—机器人移动问题(Java)

&#x1f600;前言 机器人移动问题是一个经典的动态规划应用场景&#xff0c;它涉及到在给定范围内的位置上进行移动&#xff0c;并计算到达目标位置的方法数。本文将介绍三种解决这一问题的方法&#xff1a;暴力递归、缓存法和动态规划。通过比较不同方法的优缺点&#xff0c;…...

第十一届蓝桥杯物联网试题(省赛)

对于通信方面&#xff0c;还是终端A、B都保持接收状态&#xff0c;当要发送的数组不为空再发送数据&#xff0c;发送完后立即清除&#xff0c;接收数据的数组不为空则处理&#xff0c;处理完后立即清除&#xff0c;分工明确 继电器不亮一般可能是电压不够 将数据加空格再加\r…...

【Python基础教程】5. 数

&#x1f388;个人主页&#xff1a;豌豆射手^ &#x1f389;欢迎 &#x1f44d;点赞✍评论⭐收藏 &#x1f917;收录专栏&#xff1a;python基础教程 &#x1f91d;希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出指正&#xff0c;让我们共同学习、…...

UE5 学习系列(二)用户操作界面及介绍

这篇博客是 UE5 学习系列博客的第二篇&#xff0c;在第一篇的基础上展开这篇内容。博客参考的 B 站视频资料和第一篇的链接如下&#xff1a; 【Note】&#xff1a;如果你已经完成安装等操作&#xff0c;可以只执行第一篇博客中 2. 新建一个空白游戏项目 章节操作&#xff0c;重…...

ES6从入门到精通:前言

ES6简介 ES6&#xff08;ECMAScript 2015&#xff09;是JavaScript语言的重大更新&#xff0c;引入了许多新特性&#xff0c;包括语法糖、新数据类型、模块化支持等&#xff0c;显著提升了开发效率和代码可维护性。 核心知识点概览 变量声明 let 和 const 取代 var&#xf…...

Spark 之 入门讲解详细版(1)

1、简介 1.1 Spark简介 Spark是加州大学伯克利分校AMP实验室&#xff08;Algorithms, Machines, and People Lab&#xff09;开发通用内存并行计算框架。Spark在2013年6月进入Apache成为孵化项目&#xff0c;8个月后成为Apache顶级项目&#xff0c;速度之快足见过人之处&…...

在鸿蒙HarmonyOS 5中实现抖音风格的点赞功能

下面我将详细介绍如何使用HarmonyOS SDK在HarmonyOS 5中实现类似抖音的点赞功能&#xff0c;包括动画效果、数据同步和交互优化。 1. 基础点赞功能实现 1.1 创建数据模型 // VideoModel.ets export class VideoModel {id: string "";title: string ""…...

React Native在HarmonyOS 5.0阅读类应用开发中的实践

一、技术选型背景 随着HarmonyOS 5.0对Web兼容层的增强&#xff0c;React Native作为跨平台框架可通过重新编译ArkTS组件实现85%以上的代码复用率。阅读类应用具有UI复杂度低、数据流清晰的特点。 二、核心实现方案 1. 环境配置 &#xff08;1&#xff09;使用React Native…...

学校招生小程序源码介绍

基于ThinkPHPFastAdminUniApp开发的学校招生小程序源码&#xff0c;专为学校招生场景量身打造&#xff0c;功能实用且操作便捷。 从技术架构来看&#xff0c;ThinkPHP提供稳定可靠的后台服务&#xff0c;FastAdmin加速开发流程&#xff0c;UniApp则保障小程序在多端有良好的兼…...

Java多线程实现之Callable接口深度解析

Java多线程实现之Callable接口深度解析 一、Callable接口概述1.1 接口定义1.2 与Runnable接口的对比1.3 Future接口与FutureTask类 二、Callable接口的基本使用方法2.1 传统方式实现Callable接口2.2 使用Lambda表达式简化Callable实现2.3 使用FutureTask类执行Callable任务 三、…...

vue3 定时器-定义全局方法 vue+ts

1.创建ts文件 路径&#xff1a;src/utils/timer.ts 完整代码&#xff1a; import { onUnmounted } from vuetype TimerCallback (...args: any[]) > voidexport function useGlobalTimer() {const timers: Map<number, NodeJS.Timeout> new Map()// 创建定时器con…...

基于TurtleBot3在Gazebo地图实现机器人远程控制

1. TurtleBot3环境配置 # 下载TurtleBot3核心包 mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git git clone -b noetic https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git git clone -b noetic-dev…...

初探Service服务发现机制

1.Service简介 Service是将运行在一组Pod上的应用程序发布为网络服务的抽象方法。 主要功能&#xff1a;服务发现和负载均衡。 Service类型的包括ClusterIP类型、NodePort类型、LoadBalancer类型、ExternalName类型 2.Endpoints简介 Endpoints是一种Kubernetes资源&#xf…...