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

相关文章

闲置电脑也能活出第二春?鲁大师AiNAS让你动动手指就能轻松部署

对于大多数人而言,在这个“数据爆炸”的时代或多或少都遇到过存储告急的情况,这使得“存储焦虑”不再是个别现象,而将会是随着软件的不断臃肿而越来越普遍的情况。从不少手机厂商都开始将存储上限提升至1TB可以见得,我们似乎正处在互联网信息飞速增长的阶段,对于存储的需求也将会不断扩大。对于苹果用户而言,这一问题愈发严峻,毕竟512GB和1TB版本的iPhone可不是人人都消费得起的,因此成熟的外置存储方案开

如何用Docker运行Django项目

本章教程,介绍如何用Docker创建一个Django,并运行能够访问。 一、拉取镜像 这里我们使用python3.11版本的docker镜像 docker pull python:3.11 二、运行容器 这里我们将容器内部的8080端口,映射到宿主机的80端口上。 docker run -itd --name python311 -p

阿里开源语音识别SenseVoiceWindows环境部署

SenseVoice介绍 SenseVoice 专注于高精度多语言语音识别、情感辨识和音频事件检测多语言识别: 采用超过 40 万小时数据训练,支持超过 50 种语言,识别效果上优于 Whisper 模型。富文本识别:具备优秀的情感识别,能够在测试数据上达到和超过目前最佳情感识别模型的效果。支持声音事件检测能力,支持音乐、掌声、笑声、哭声、咳嗽、喷嚏等多种常见人机交互事件进行检测。高效推

【区块链 + 人才服务】可信教育区块链治理系统 | FISCO BCOS应用案例

伴随着区块链技术的不断完善,其在教育信息化中的应用也在持续发展。利用区块链数据共识、不可篡改的特性, 将与教育相关的数据要素在区块链上进行存证确权,在确保数据可信的前提下,促进教育的公平、透明、开放,为教育教学质量提升赋能,实现教育数据的安全共享、高等教育体系的智慧治理。 可信教育区块链治理系统的顶层治理架构由教育部、高校、企业、学生等多方角色共同参与建设、维护,支撑教育资源共享、教学质量评估、

无线领夹麦克风什么牌子好用?揭秘领夹麦克风哪个牌子音质好!

随着短视频行业的星期,围绕着直播和视频拍摄的电子数码类产品也迎来了热销不减的高增长,其中除了数码相机外,最为重要的麦克风也得到了日益增长的高需求,尤其是无线领夹麦克风,近几年可谓是异常火爆。别看小小的一对无线麦克风,它对于视频拍摄的音质起到了极为关键的作用。 不过目前市面上的麦克风品牌种类多到让人眼花缭乱,盲目挑选的话容易踩雷,那么无线领夹麦克风什么牌子好用?今天就给大家推荐几款音质好的

【区块链 + 人才服务】区块链集成开发平台 | FISCO BCOS应用案例

随着区块链技术的快速发展,越来越多的企业开始将其应用于实际业务中。然而,区块链技术的专业性使得其集成开发成为一项挑战。针对此,广东中创智慧科技有限公司基于国产开源联盟链 FISCO BCOS 推出了区块链集成开发平台。该平台基于区块链技术,提供一套全面的区块链开发工具和开发环境,支持开发者快速开发和部署区块链应用。此外,该平台还可以提供一套全面的区块链开发教程和文档,帮助开发者快速上手区块链开发。

pico2 开发环境搭建-基于ubuntu

pico2 开发环境搭建-基于ubuntu 安装编译工具链下载sdk 和example编译example 安装编译工具链 sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib 注意cmake的版本,需要在3.17 以上 下载sdk 和ex

如何选择SDR无线图传方案

在开源软件定义无线电(SDR)领域,有几个项目提供了无线图传的解决方案。以下是一些开源SDR无线图传方案: 1. **OpenHD**:这是一个远程高清数字图像传输的开源解决方案,它使用SDR技术来实现高清视频的无线传输。OpenHD项目提供了一个完整的工具链,包括发射器和接收器的硬件设计以及相应的软件。 2. **USRP(Universal Software Radio Periphera

git ssh key相关

step1、进入.ssh文件夹   (windows下 下载git客户端)   cd ~/.ssh(windows mkdir ~/.ssh) step2、配置name和email git config --global user.name "你的名称"git config --global user.email "你的邮箱" step3、生成key ssh-keygen

在 Windows 上部署 gitblit

在 Windows 上部署 gitblit 在 Windows 上部署 gitblit 缘起gitblit 是什么安装JDK部署 gitblit 下载 gitblit 并解压配置登录注册为 windows 服务 修改 installService.cmd 文件运行 installService.cmd运行 gitblitw.exe查看 services.msc 缘起