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

本文主要是介绍ubuntu远程服务部署,Docker,蓝牙无线局域网,SSH,VNC,xfce4,NextTerminal,宝塔,NPS/NPC,gost,openwrt,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

开机启动

/lib/systemd/system/rc-local.service 添加

[Install]
WantedBy=multi-user.target  
Alias=rc-local.service

/etc/rc.local

#!/bin/sh
添加开机启动需要执行的脚本
sudo chmod 777 /lib/systemd/system/rc-local.service
sudo chmod +x /etc/rc.local
#systemctl disable rc-local.service
systemctl enable rc-local.service
systemctl start rc-local.service
systemctl status rc-local.service

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的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/879205

相关文章

UnrealScriptIDE调试环境部署

先安装vs2010   再安装VSIsoShell.exe, 下载地址 https://pan.baidu.com/s/10kPNUuDGTbWXbz7Nos-1WA       fd3t   最后安装unside,下载地址 https://archive.codeplex.com/?p=uside  安装中间有一步选择Binary文件夹要选对路径。   安装好以后,启动 UDKDe

通过SSH隧道实现通过远程服务器上外网

搭建隧道 autossh -M 0 -f -D 1080 -C -N user1@remotehost##验证隧道是否生效,查看1080端口是否启动netstat -tuln | grep 1080## 测试ssh 隧道是否生效curl -x socks5h://127.0.0.1:1080 -I http://www.github.com 将autossh 设置为服务,隧道开机启动

IDEA配置Tomcat远程调试

因为不想把本地的Tomcat配置改乱或者多人开发项目想测试,本文主要是记录一下,IDEA使用Tomcat远程调试的配置过程,免得一段时间不去配置到时候忘记(毕竟这次是因为忘了,所以才打算记录的…) 首先在catalina.sh添加以下内容 JAVA_OPTS="-Dcom.sun.management.jmxremote=-Dcom.sun.management.jmxremote.port

Ubuntu20.04离线安装Docker

1.下载3个docker离线安装包,下载网址: https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/ 2.把3个离线安装包拷贝到ubuntu本地执行以下命令 sudo dpkg -i containerd.io_1.4.6-1_amd64.deb sudo dpkg -i docker-ce-c

springboot家政服务管理平台 LW +PPT+源码+讲解

3系统的可行性研究及需求分析 3.1可行性研究 3.1.1技术可行性分析 经过大学四年的学习,已经掌握了JAVA、Mysql数据库等方面的编程技巧和方法,对于这些技术该有的软硬件配置也是齐全的,能够满足开发的需要。 本家政服务管理平台采用的是Mysql作为数据库,可以绝对地保证用户数据的安全;可以与Mysql数据库进行无缝连接。 所以,家政服务管理平台在技术上是可以实施的。 3.1

探索蓝牙协议的奥秘:用ESP32实现高质量蓝牙音频传输

蓝牙(Bluetooth)是一种短距离无线通信技术,广泛应用于各种电子设备之间的数据传输。自1994年由爱立信公司首次提出以来,蓝牙技术已经经历了多个版本的更新和改进。本文将详细介绍蓝牙协议,并通过一个具体的项目——使用ESP32实现蓝牙音频传输,来展示蓝牙协议的实际应用及其优点。 蓝牙协议概述 蓝牙协议栈 蓝牙协议栈是蓝牙技术的核心,定义了蓝牙设备之间如何进行通信。蓝牙协议

利用Frp实现内网穿透(docker实现)

文章目录 1、WSL子系统配置2、腾讯云服务器安装frps2.1、创建配置文件2.2 、创建frps容器 3、WSL2子系统Centos服务器安装frpc服务3.1、安装docker3.2、创建配置文件3.3 、创建frpc容器 4、WSL2子系统Centos服务器安装nginx服务 环境配置:一台公网服务器(腾讯云)、一台笔记本电脑、WSL子系统涉及知识:docker、Frp

Docker启动异常

报错信息: failed to start daemon: Error initializing network controller: error creating default "bridge" network: cannot create network b8fd8c684f0ba865d4a13d36e5282fd694bbd37b243c7ec6c9cd29416db98d4b (d

打造坚固的SSH防护网:端口敲门入门指南

欢迎来到我的博客,代码的世界里,每一行都是一个故事 🎏:你只管努力,剩下的交给时间 🏠 :小破站 打造坚固的SSH防护网:端口敲门入门指南 前言什么是端口敲门端口敲门的优点1. 增强安全性2. 动态防火墙规则3. 隐匿服务4. 改善日志管理5. 灵活性和兼容性6. 低资源消耗7. 防御暴力破解和扫描8. 便于合法用户访问9. 适用于不同类型的服务 端口敲

蓝牙ble数传芯片推荐,TD5327A芯片蓝牙5.1—拓达半导体

蓝牙数传芯片TD5327A芯片是一款支持蓝牙BLE的纯数传芯片,蓝牙5.1版本。芯片的亮点在于性能强,除了支持APP端直接对芯片做设置与查询操作,包括直接操作蓝牙芯片自身的IO与PWM口以外,还支持RTC日历功能,可以做各类定时类操作,极大丰富了蓝牙在IOT产品中的应用。此外,在数传应用方面,此芯片支持串口流控功能,提大提高了数据传输的稳定与可靠性。 拓达蓝牙芯片特点: 支持RTC日历功能,超