Record a process from system installation to copying large data files.
说在前: 1.系统U盘启动安装软件Rufus,自行百度下载
2.下载Ubuntu Server镜像,官方地址即可
1. Installation
1. Select Ubuntu Server
2. Language selection, default English
3. If there is a network, select the first item to upgrade the system, if there is no network, select the second item to skip the upgrade.
4. The keyboard layout does not need to be modified.
5. Select the second item to minimize the installation.
6. Network configuration, use DHCP or static IP.
DHCP settings
Static IP settings
7. No need to fill in, next step.
8. Set the source, the Ali source used here.
9. Disk partition, select the disk to install the system.
Remember to use the system automatically, and then set the main directory to fully set the entire drive letter memory, saving the expansion of memory later
10. I am used to using the xfs partition format, first unmount the / and /boot partitions.
11. Re-edit the /boot partition, the format is xfs, and the space is 1G.
12. Delete the original LV partition, then create a new LV partition with the format of xfs, and mount all of them to the root (/) partition.
13. Your name Write the user name casually, your server's name set the computer name, pick a username log in the user name, choose a passwork set the password confirm your password confirm your password
14. Install ssh remote tool
15. Go directly to the next step
16. The system is being installed
17. The system installation is complete, Reboot Now restart
Second, set the super user password
sudo passwd
3. Open ssh
直接上汤~
解决方法:
1、首先需要分析是否是远程主机没有设置ssh权限访问,假如没有添加,进行如下添加
登录 远程主机,
将 /etc/ssh/sshd_config 文件中的 PasswordAuthentication no 修改为 PasswordAuthentication yes
修改root的ssh权限,即修改 /etc/ssh/sshd_config文件中 PermitRootLogin no / without-password 改为 PermitRootLogin yes
2、然后重启sshd服务
systemctl restart sshd
Fourth, use scp to copy large files
scp -r /mnt [email protected]:/home
复制文件:
(1)将本地文件拷贝到远程
scp 文件名 用户名@计算机IP: 远程路径目录
scp /root/.jenkins/workspace/superid-webapi-2-0-200/superid-web-app/target/superid-web-app-1.0-SNAPSHOT.war [email protected]:/home/simu/tomcat/webapps/mk.war
(2)从远程将文件拷回本地
scp 用户名@计算机IP: 文件名 本地路径目录
复制目录:
(1)将本地目录拷贝到远程
scp -r 目录名 --用户名@计算机IP: 远程路径
(2)从远程将目录拷回本地
scp -r 用户名@计算机IP: 目录名 本地路径目录
5. Mount the mobile hard disk
查看盘符 fdisk -l
创建新目录 Mkdir /media/userDisk
挂载 Mount /dev/sda1(自己名称) /media/userDisk