安裝Linux桌面
使用最簡易工具,無須root
./start-debian.sh
apt-get install gnupg bash-completion dialog locales sudo iproute2 nano net-tools python3-pip rsync
安裝ssh server
passwd root
apt install ssh
nano /etc/ssh/sshd_config
------------------------
Port 2222
..........
PermitRootLogin yes
------------------------
service ssh restart
連線ssh server
ssh termuxIP -p 2222 -l root
安裝mongodb
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
apt-get update
apt install mongodb-org
啟動mongodb
mongod -f /etc/mongod.conf &
修改啟動程式
nano start-debian.sh
command+=" -b /data/data/com.termux/files/home:/root"
## uncomment the following line to mount /sdcard directly to /
#command+=" -b /sdcard"
command+=" -b /storage/emulated/0/:/storage"
apt update && apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
安裝桌面環境
./start-debian.sh
bash xfce4_de.sh
Configuring keyboard-configuration
----------------------------------
Please select the layout matching the keyboard for this machine.
1. English (US)
Running vncserver-start
To Kill VNC Server just run vncserver-stop
You will require a password to access your desktops.
Password:
Warning: password truncated to the length of 8.
Verify:
Would you like to enter a view-only password (y/n)? n
netstat -ltn | grep 5901
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
VNC 連線桌面
修改顯示
nano /usr/local/bin/vncserver-start
export USER=root
export HOME=/root
vncserver -geometry 1366x768 -depth 24 -name remote-desktop :1
Last updated