title: 1.2.安装Xshell7和使用Xshell远程连接ubuntu
order: 2
icon: lightbulb
一、环境
主机名 | IP地址 | 系统 | 说明 |
windows10专业版 | 安装Xshell7 家庭、教育版 | ||
vmware workstation pro 16.0 | |||
192.168.11.128 | Ubuntu20.04 | IP修改为192.168.11.100 |
二、安装Xshell 7
1、下载
2、安装
双击安装,勾线协议,一直下一步,直到安装完成。
三、Ubuntu系统配置
1、修改ip地址
sudo vi /etc/netplan/00-installer-config.yaml
```
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
dhcp4: true
version: 2
把上面的内容删除后,按 i粘贴以下内容。设置为静态IP,以及IP地址,dns,网关
network:
ethernets:
ens33:
addresses:
- 192.168.11.100/24
gateway4: 192.168.11.2
nameservers:
addresses:
- 192.168.11.2
search: []
version: 2
应用配置
sudo netplan apply
2、修改时区
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
date -R
3、系统优化
#修改文件描述符和进程数
sudo sed -i '/^# End of file/,$d' /etc/security/limits.conf
sudo sh -c "cat >> /etc/security/limits.conf <<EOF
# End of file
root - nproc 512000
* - nproc 512000
root - nofile 512000
* - nofile 512000
EOF"
#软件源替换成阿里云
sudo sed -i.bak 's/http:\/\/.*.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
#更新
sudo apt update && sudo apt upgrade -y
#重启
sudo reboot
四、克隆虚拟机
为后面的安装zabbix集群做准备
1、停止虚拟机
注意:要把克隆的虚拟机停止后才能克隆
2、克隆虚拟机
选择需要克隆的虚拟机,点鼠标右键–管理–克隆
点下一步
默认选择“虚拟机中的当前状态”,点下一步。
选择创建链接克隆,点下一步
输入虚拟机名称,位置默认存放在文档中,如果存别的地方,点浏览修改。
3、修改ip地址
启动后修改ip即可
4、克隆多台
如果要模拟多台服务器,按上面同样的方法,多克隆几台虚拟机,更改为不同的ip即可。
评论区