How to install SSH server on ubantu
SUSE repos
suse stable
http://download.opensuse.org/distribution/openSUSE-stable/repo/non-oss/
http://download.opensuse.org/distribution/openSUSE-stable/repo/oss/
suse leap
http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/
http://download.opensuse.org/distribution/leap/15.3/repo/oss/
M17N
http://download.opensuse.org/repositories/M17N/ (multi language)
http://download.opensuse.org/repositories/M17N/openSUSE_Leap_15.3/ (tools for 15.3)
???
https://opensuse-guide.ustclug.org/repositories.php
Chrome
http://dl.google.com/linux/chrome/rpm/stable/x86_64 chrome
https://dl.google.com/linux/chrome/rpm/stable/x86_64
User guide
1. https://opensuse-guide.ustclug.org/index.php
2. https://doc.opensuse.org/
3. https://www.cnblogs.com/xiangzi888/archive/2012/03/08/2385993.html
4. https://documentation.suse.com/zh-cn/sles/15-SP3/html/SLES-all/cha-gui-desktop.html 中文版 Display 設(shè)置
sudo zypper ar http://download.opensuse.org/distribution/openSUSE-stable/repo/non-oss/ non-oss
sudo zypper ar http://download.opensuse.org/distribution/openSUSE-stable/repo/oss/ oss
sudo zypper ar http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/ non-oss-15.3
sudo zypper ar http://download.opensuse.org/distribution/leap/15.3/repo/oss/ oss-15.3
sudo zypper ar http://download.opensuse.org/repositories/M17N/openSUSE_Leap_15.3/ M17N
sudo zypper ar https://dl.google.com/linux/chrome/rpm/stable/x86_64 Chrome
wget https://dl.google.com/linux/linux_signing_key.pub
sudo rpm --import linux_signing_key.pub
sudo zypper addrepo http://http.download.nvidia.com/opensuse/leap/15.3/x86_64/ NVIDIA
GNOME add in https://extensions.gnome.org/`
Install different OS components
1. Open Yast -> software management
2. At tab Configuration -> Repositories -> select the repo
3. Then select Patterns / Packages, all supported features will be selected.
-
安裝Dash to DOCK /.Dash to Panel
5. Install flameshot, tool to capture screen, like snipaste # zypper in flameshot
6. set short cut for flameshot
WIN + S, Set Keyboard shortcuts
name: flameshot
command: flameshot gui
Shortcut: press a button
8. Dash to Panel https://extensions.gnome.org/extension/1160/dash-to-panel/
修改計算機名字
臨時設(shè)置hostname主機名:
hostname <SERVER_NAME>
這里的'-v'主要是顯示版本的.如果使用了'-v'的話摆碉,輸出的結(jié)果大概是這樣:
server1~# hostname -v computer2
Setting hostname to `computer2'
server1~#
退出終端,重新登陸終端,你就能看到主機名更改了
不過有的發(fā)行系統(tǒng)中這種方法是不能永久生效的.
**永久設(shè)置hostname主機名: **
編輯/etc/HOSTNAME
*# vi /etc/HOSTNAME *
或
# echo server2.mycompany > /etc/HOSTNAME
這樣就可以永久設(shè)置了,重啟電腦
使用YAST工具修改hostname主機名
打開YAST控制中心 control center.
*#yast *然后點到網(wǎng)絡(luò)設(shè)置 --> DNS和Hostname.
然后主機名和網(wǎng)速設(shè)置窗口就會打開.
在hostname一欄,根據(jù)自己的需要修改主機名即可聘惦,然后重啟電腦
查看服務(wù)器詳細信息:
hostname - 會顯示主機名
domainname - 顯示/設(shè)置電腦的 NIS/YP域名
dnsdomainname - 顯示電腦的DNS域名
設(shè)置IP
說明:ip:172.18.4.107 子網(wǎng)掩碼:255.255.255.0 網(wǎng)關(guān):172.18.4.254 dns:172.18.0.6
1、設(shè)置ip地址
vi /etc/sysconfig/network/ifcfg-eth0 #編輯配置文件
BOOTPROTO='static' #靜態(tài)IP:
BROADCAST='172.18.4.255' #廣播地址
IPADDR='172.18.4.107' #IP地址
NETMASK='255.255.255.0' #子網(wǎng)掩碼
NETWORK='172.18.4.0' #網(wǎng)絡(luò)地址
STARTMODE='auto' #開機啟動網(wǎng)絡(luò)
2、設(shè)置網(wǎng)關(guān)
vi /etc/sysconfig/network/routes #編輯文件
default 172.18.4.254
3牺弹、設(shè)置dns
vi /etc/resolv.conf #編輯文件
nameserver 172.18.0.6
rcnetwork restart #重啟網(wǎng)絡(luò)
service network restart #重啟網(wǎng)絡(luò)
/etc/init.d/network restart #重啟網(wǎng)絡(luò)
查看gate 選項: ip route
IP 分配
T5820 on top -1
IP: 10.189.131.35 / 255.255.255.0 / 10.189.131.1
User: sdc
Passwd: geMRint@adw2
T5820 on top -2 (ethernet port fail)
IP: 10.189.131.xx / 255.255.255.0 / 10.189.131.1
User: sdc
Passwd: geMRint@adw2
T5820 on top -3 (for Bali)
IP: 10.189.131.36 / 255.255.255.0 / 10.189.131.1
User: sdc
Passwd: geMRint@adw2
Dell Box -1 (P3240 SLE 15.3)
IP: 10.189.131.38 / 255.255.255.0 / 10.189.131.1
User: tester
Passwd: 1
FTP Server setup
$zypper in vsftpd #Install svftp
edit /etc/vsftpd.conf
$systemctl start vsftpd #start ftp service
$systemctl stop vsftpd #stop ftp
$ systemctl status vsftpd #get status of ftp
ftp命令 測試FTP 是否可用
$ftp 192.168.1.14
使用格式:ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [computer]
-v:禁止顯示遠程服務(wù)器響應(yīng)信息
PS C:\Users\212597558> sftp tester@192.168.1.4
Password:
Connected to 192.168.1.4.
sftp> ls
Desktop Documents Downloads Music Pictures Public Templates Videos bin
public_html
sftp> help
-n:禁止自動登錄
-i:多文件傳輸過程中關(guān)閉交互提示
-d:啟用調(diào)試,顯示所有客戶端與服務(wù)器端傳遞的命令
-g:禁用文件名通配符时呀,允許在本地文件和路徑名中使用
實例:ftp 122.122.122.122 2222
輸入用戶名张漂、密碼,即可完成登錄谨娜。
2.目錄操作
FTP命令可以列出航攒、移動、創(chuàng)建文件夾趴梢。
ls -- 打印目錄列表
!ls -- 查看本地目錄
cd -- 改變目錄
mkdir -- 創(chuàng)建文件夾
3.使用FTP下載文件
在下載一個文件之前漠畜,首先需要使用lcd命令設(shè)定本地接收目錄位置。
lcd -- 指定下載目錄
get file.txt [file_new.txt] -- 下載文件 支持更改名字
mget *.txt -- 使用mget + 通配符下載多個文件
4.使用FTP上傳文件
put file.txt [file_new.txt] -- 上傳文件 支持更改名字
put /home/data/cwh/file.txt -- 絕對路徑
mput *.txt -- 上傳多個文件
5.關(guān)閉FTP連接
完成FTP工作后坞靶,為了安全起見需要關(guān)閉連接憔狞。有3個命令可以關(guān)閉連接:
bye -- 關(guān)閉連接
exit -- 關(guān)閉連接
quit -- 關(guān)閉連接
close -- 關(guān)閉連接
6.其他命令
? -- 查詢ftp命令
help -- 查詢ftp命令
open [ftp server name] -- 和指定的遠程Linux FTP服務(wù)器連接
user [user name] [password] -- 使用指定遠程Linux FTP服務(wù)器的用戶登錄
pwd -- 顯示當(dāng)前路徑
ls -- 列出目錄和文件
dir -- 列出目錄和文件(同上)
mkdir [foldname] -- 創(chuàng)建指定目錄
rmdir [foldname] -- 刪除指定目錄
cd -- 切換目錄
delete [filename] -- 刪除文件
rename [filename] [newfilename] -- 重命名
close -- 關(guān)閉連接 但保留FTP命令參數(shù)提示
disconnect -- 關(guān)閉連接 但保留FTP命令參數(shù)提示(同上)
bye -- 結(jié)束連接
quit -- 結(jié)束連接
! -- 直接從遠程Linux FTP進入到本地Shell中
exit -- (接上步)從本地Shell環(huán)境返回遠程Linux FTP中
!ls -- 列出本地機器目錄和文件
lcd [foldname] -- 更改本地工作目錄
binary -- 使用二進制傳輸文件
prompt -- 切換提示(使用mput或mget上傳下載多個文件時避免提示)
case -- 在使用mget時,將遠程主機文件名的大寫轉(zhuǎn)換為小寫字母
cdup -- 進入遠程主機目錄的父目錄
system -- 顯示遠程主機的操作系統(tǒng)類型
hash -- 每傳輸1024字節(jié)彰阴,顯示一個hash符號(#)
status -- 顯示當(dāng)前ftp狀態(tài)
修改HOST name
$vi /etc/hostname
or $vi /etc/hosts
SUSE zypper install vsftp service
$ sudo zypper in vsftpd #install very secure FTP
$ sytemctl start vsftpd
$ systemctrl enable vsftpd
$ systemctl status vsftpd
Or $ sudo service vsftpd status
NTFS 格式硬盤無法掛載
Windows 硬盤連到 Linux 系統(tǒng)后瘾敢,默認是無法識別的,可以通過 ntfs-3g 進行識別尿这。
執(zhí)行如下命令安裝 ntfs-3g:
zypper in ntfs-3g
安裝成功后通過如下命令進行掛載簇抵,結(jié)果如下:
mount -t ntfs-3g /dev/xvdb5 /mnt # 重新拔插Usb線后,可以自動識別射众。
鏈接:https://www.imooc.com/article/48394
VNC server setup
@ubantu How to Install and Configure VNC on Ubuntu 20.04
1. install vnc server
$ sudo apt update
$ sudo apt install tigervnc-standalone-server
$ sudo apt install tigervnc-standalone-server
$ vncpasswd #create password, not need sudo
$ sudo nano /etc/systemd/system/vncserver@.service # create vnc service
$ sudo systemctl daemon-reload #Reload systemd
$ sudo systemctl start vncserver@1.service
Start VNCSERVER
$vncserver
check vncmanager.service status
Normally there should be a config file:
List servers: vncserver -list
vncmanager operation
1. Start vncmanager
$systemctl enable vncmager.service
$systemctl start vncmanager.service
$ systemctl status vncmager.service #check status
2. Stop vncmager
$ systemctl stop vncmanager.service # stop service
$ systemctl disable vncmanager.service
$ systemctl status vncmanager.service
USE YAST2 to config vnc manager
How to Use the VNC to Remotely Log In to SUSE Linux
執(zhí)行YAST2 里的Remote Administration 后會彈出下面的窗口碟摆,點擊ok后,就沒有動靜了叨橱。
還需要執(zhí)行如下命令:
網(wǎng)絡(luò)設(shè)置
Yast2
需要選擇Network Manager焦履,否則無法選擇DNS router 拓劝。。嘉裤。
還能在右上角顯示圖標
命令行:在suse下networksetting
一郑临、網(wǎng)絡(luò)設(shè)置
設(shè)置IP、網(wǎng)關(guān)屑宠、DNS
- 設(shè)置IP
每個網(wǎng)卡都有一個配置文件厢洞,在/etc/sysconfig/network/目錄下。用root登錄,編輯ifcfg-eth0,就是你的網(wǎng)卡的物理地址的那個文件典奉,不一定是eth0躺翻。
vim /etc/sysconfig/network/ifcfg-eth0
配置文件如下:
DEVICE=物理設(shè)備名
IPADDR=IP地址
NETMASK=掩碼值
NETWORK=網(wǎng)絡(luò)地址
BROADCAST=廣播地址
GATEWAY=網(wǎng)關(guān)地址
ONBOOT=[yes|no](引導(dǎo)時是否激活設(shè)備)
USERCTL=[yes|no](非root用戶是否可以控制該設(shè)備)
BOOTPROTO=[none|static|bootp|dhcp](引導(dǎo)時不使用協(xié)議|靜態(tài)分配|BOOTP協(xié)議|DHCP協(xié)議)
HWADDR = 你的MAC地址
例如:
DEVICE=’eth0’
BOOTPROTO=’static’
IPADDR=’10.10.37.234’
NETMASTK=’255.255.255.0’
NETWORK=’10.10.37.0’
BROADCAST=’10.10.37.255’
ONBOOT=’yes’
- 設(shè)置網(wǎng)關(guān)
網(wǎng)關(guān):實質(zhì)上是一個網(wǎng)絡(luò)通向其他網(wǎng)絡(luò)的IP地址
設(shè)置默認網(wǎng)關(guān)命令:
vim /etc/sysconfig/network/,修改routes
GATEWAY =10.10.37.100
- 設(shè)置DNS
DNS域名解析系統(tǒng)(domain name system)
DNS服務(wù)器:由于IP地址不便于記憶卫玖,將域名解析成IP地址的服務(wù)器公你。
修改DNS的配置文件
vim /etc/resolv.conf
添加內(nèi)容:nameserver10.10.1.2
也可繼續(xù)添加:nameserver8.8.8.8
- 配置完成后,重啟網(wǎng)絡(luò)服務(wù)使之生效
service network restart
或者#/etc/init.d/network restart
二假瞬、解決出現(xiàn)的其他問題和補充
配置物理機時陕靠,一般一臺物理機會有幾塊網(wǎng)卡,首先查看哪塊網(wǎng)卡connected脱茉,然后在/etc/sysconfig/network/目錄下剪芥,修改相應(yīng)的網(wǎng)卡配置文件,比如ifcfg-eth0琴许,eth2也可能税肪,如果沒有配置文件,新建配置文件榜田,并添加內(nèi)容益兄。
配置網(wǎng)關(guān)時總是出問題,后來用yast解決了沒有配置網(wǎng)關(guān)的問題箭券,網(wǎng)關(guān)一定要設(shè)置對應(yīng)網(wǎng)段的網(wǎng)關(guān)净捅,一直是心中的痛。
集線器邦鲫、交換機灸叼、路由器、網(wǎng)橋庆捺、網(wǎng)關(guān)的知識
參考了
http://www.cnblogs.com/imapla/archive/2013/03/12/2955931.html
集線器:
1)是放大信號古今,擴大網(wǎng)絡(luò)的傳輸距離,是中繼器的一種形式滔以,區(qū)別在于集線器能夠提供多端口服務(wù)捉腥,也稱為多口中繼器;
2)工作在物理層你画,分享帶寬
交換機:
1) 有自己的CPU和RAM抵碟,可以實現(xiàn)存儲轉(zhuǎn)發(fā)
2) 工作在數(shù)據(jù)鏈路層桃漾,不共享帶寬
網(wǎng)橋:
1) 將兩個局域網(wǎng)連接起來,網(wǎng)橋在幀的轉(zhuǎn)發(fā)過程中查看的地址是mac地址拟逮。
2) 工作在數(shù)據(jù)鏈路層
路由器:
1) 作為不同網(wǎng)絡(luò)之間互相連接的樞紐撬统,路由器系統(tǒng)構(gòu)成了基于 TCP/IP 的國際互連網(wǎng)絡(luò) Internet
2) 工作在網(wǎng)絡(luò)層
網(wǎng)關(guān):網(wǎng)關(guān)(協(xié)議轉(zhuǎn)換器)是互連網(wǎng)絡(luò)中操作在OSI網(wǎng)絡(luò)層之上的具有協(xié)議轉(zhuǎn)換功能設(shè)施
傳統(tǒng)的交換機只能分割沖突域,不能分割廣播域敦迄;而路由器可以分割廣播域
————————————————
版權(quán)聲明:本文為CSDN博主「willinux」的原創(chuàng)文章恋追,遵循CC 4.0 BY-SA版權(quán)協(xié)議,轉(zhuǎn)載請附上原文出處鏈接及本聲明罚屋。
原文鏈接:https://blog.csdn.net/willinux20130812/article/details/24476251
1. Disk partition
You should be sure there is a partition (< 1G) mounted at /root/elf for boot up
And a partition mounted at / for data and OS
2. Question or warning
How Do You Install SUSE when You Encounter “The System cannot be installed because … There is no device mounted at ‘/'”?
Problem scenario
You are trying to install Linux SUSE. You get an error "The System cannot be installed because the following errors were found: There is no device mounted at '/'. How do you get passed this problem?
Solution
Use the "Expert Partitioner". Verify you have one device (e.g., /dev/sda1) that has the Type "BIOS Boot Partition." Verify you have one device (e.g., /dev/sda2) that has the Mount Point "/". You theoretically might be able to have one device have both traits.
If there is a device that is mounted to "/mnt", highlight it, go to Modify -> Edit Partition then go to the "Mount Point" and change it to "/". You may be prompted "Really skip formatting the partition?" Choose "Yes". Now try to resume the installation.
You may be prompted to abort the install or continue anyway to a variety of errors/questions. You may be able to just keep clicking "continue" through this series of prompts.
3. Set repository
1. Open yast via MobaXterm ssh
2. List of repositories
http://download.opensuse.org/tumbleweed/repo/non-oss/
http://download.opensuse.org/tumbleweed/repo/oss/
http://mirrors.ustc.edu.cn/opensuse/tumbleweed/repo/oss
opensuse | 鏡像站使用幫助 | 清華大學(xué)開源軟件鏡像站 | Tsinghua Open Source Mirror
https://mirrors.tuna.tsinghua.edu.cn/help/opensuse/
sudo zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/$releasever/repo/oss/'tuna-osssudo
zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/$releasever/repo/non-oss/'tuna-non-osssudo
zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/oss/'tuna-updatesudo
zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/non-oss/'tuna-update-non-oss
3. reference from suse
How to set Tftp server in Windows: https://www.lifewire.com/definition-of-tftp-817576
4 Config SSH
$ssh-keygen #generate key
$ssh-copy-id -p 22 tester@192.167.1.14
Set config at local/.ssh
$touch config
Host aioc121
HostName 192.168.1.14
Port 22
User tester
IP config
Gateway 10.189.130.1
查看gateway:route -n
1. Disk partition
You should be sure there is a partition (< 1G) mounted at /root/elf for boot up
And a partition mounted at / for data and OS
2. Question or warning
How Do You Install SUSE when You Encounter “The System cannot be installed because … There is no device mounted at ‘/'”?
Problem scenario
You are trying to install Linux SUSE. You get an error "The System cannot be installed because the following errors were found: There is no device mounted at '/'. How do you get passed this problem?
Solution
Use the "Expert Partitioner". Verify you have one device (e.g., /dev/sda1) that has the Type "BIOS Boot Partition." Verify you have one device (e.g., /dev/sda2) that has the Mount Point "/". You theoretically might be able to have one device have both traits.
If there is a device that is mounted to "/mnt", highlight it, go to Modify -> Edit Partition then go to the "Mount Point" and change it to "/". You may be prompted "Really skip formatting the partition?" Choose "Yes". Now try to resume the installation.
You may be prompted to abort the install or continue anyway to a variety of errors/questions. You may be able to just keep clicking "continue" through this series of prompts.
3. Set repository
1. Open yast via MobaXterm ssh
2. List of repositories
http://download.opensuse.org/tumbleweed/repo/non-oss/
http://download.opensuse.org/tumbleweed/repo/oss/
http://mirrors.ustc.edu.cn/opensuse/tumbleweed/repo/oss
opensuse | 鏡像站使用幫助 | 清華大學(xué)開源軟件鏡像站 | Tsinghua Open Source Mirror
https://mirrors.tuna.tsinghua.edu.cn/help/opensuse/
sudo zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/$releasever/repo/oss/'tuna-osssudo
zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/$releasever/repo/non-oss/'tuna-non-osssudo
zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/oss/'tuna-updatesudo
zypper ar-cfg'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/non-oss/'tuna-update-non-oss
3. reference from suse
How to set Tftp server in Windows: https://www.lifewire.com/definition-of-tftp-817576
4 Config SSH
$ssh-keygen #generate key
$ssh-copy-id -p 22 tester@192.167.1.14
Set config at local/.ssh
$touch config
Host aioc121
HostName 192.168.1.14
Port 22
User tester
IP config
Gateway 10.189.130.1
查看gateway:route -n