Hello Spring Cloud Alibaba(二)之项目独立服务部署
虚拟机及Linux安装
本项目使用Vmware安装linux,请先自行安装。虚拟机配置最低双核,最低4G内存。建议安装Ubuntu 18.04,并选择Live Server版本(只有命令行模式),当然也可以选择桌面版。国内可选择阿里云镜像下载:http://mirrors.aliyun.com/ubuntu-releases/18.04/
Linux初始化设置
开启root并远程登录
ubuntu18.04 Live Server 默认不开启root账户登录,而我们在平时使用中,一般都需要root权限,因此需要进行设置。
- 设置Root账户密码
sudo passwd root
# 以下输入您的密码
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
- 切换到root
su
- 设置允许远程登录
vi /etc/ssh/sshd_config
# 第 29 行
# Authentication:
LoginGraceTime 120
# 注释下面这句
# PermitRootLogin without-password
# 加入下面这句
PermitRootLogin yes
StrictModes yes
- 重启ssh服务