apt-get update
apt-get install docker.io
systemctl start docker
docker run -it --name <容器名称> <镜像名称>
systemctl start sshd
ip addr
ssh <用户名>@<节点IP地址>
apt-get update
apt-get install mysql-server
systemctl start mysql
apt-get install mysql-client
mysql -u root -p
CREATE USER '<用户名>'@'<IP地址>' IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES ON *.* TO '<用户名>'@'<IP地址>';
FLUSH PRIVILEGES;
quit;
apt-get update
apt-get install tightvncserver
vncserver :1
apt-get update
apt-get install apache2
systemctl start apache2
nano /etc/apache2/apache2.conf
nano /etc/apache2/sites-available/000-default.conf
systemctl restart apache2
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
nano app.js
const http = require('http');
const hostname = '0.0.0.0';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello, World!\n');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
node app.js
apt-get update
apt-get install openvpn
systemctl start openvpn
nano /etc/openvpn/server.conf
htpasswd -c /etc/openvpn/credentials <用户名>
systemctl restart openvpn