开启root远程
设置密码sudo passwd root
启用root用户sudo passwd --unlock root
设置ssh允许登录sudo sed -i "s/^#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
重启ssh服务sudo systemctl restart ssh
安装远程桌面
apt-get install xrdp
安装nginx及php
apt-get -y install nginx php php-fpm php-cli php-cgi php-mcrypt php-curl php-mbstring php-gd
配置nginx文件vim /etc/nginx/sites-available/default
重启服务killall php-fpm7.3 && sudo /usr/sbin/php-fpm7.3
安装mysql
sudo apt-get install mysql-server
或apt-get install mariadb-server
sudo mysql -u root
回车登录数据库,初始的没有密码
配置密码
use mysql; update user set plugin='mysql_native_password' where user='root'; UPDATE user SET password=PASSWORD('root的密码') WHERE user='root'; flush privileges; exit;
开启远程
sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf # 将bind-address这行注释掉 # 或者将127.0.0.1 这个值改为 0.0.0.0
然后重启sudo /etc/init.d/mysql restart
mysql -u root -p
输入密码
use mysql; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root的密码' WITH GRANT OPTION; flush privileges;
打开chrome浏览器
chromium-browser -no-sandbox
暂无评论,还不快来坐沙发...