introduce

This is my third article for getting started. It is about initializing and installing TeamViewer for Linux using command operations in Ubuntu Server LTS 18.04. The notes describe each step

1. Set SSH

Vim /etc/ssh/sshd_config PermitRootLogin yes AllowUsers root sudo passwd root // Change the root password systemctl restart SSH systemctl restart sshdCopy the code

Check the network configuration

# Check network and RUNNING network cards
ifconfig -a
You can check the network card
lshw  -C network

Ubuntu Server LTS 18.04 network management is different from previous versions
sudo vim /etc/netplan/50-cloud-init.yaml

network:
    ethernets:
        eno1:
            dhcp4: true
        eno2:
            dhcp4: trueEno3: dhcp4: no addresses: [192.168.3.151/24] Optional:trueGateway4:192.168.3.1 nameservers: addresses: [192.168.3.1] Eno4: dhcp4:true
    version: 2
Copy the code
  • Dhcp4 defaults to true, but is changed to false because it is a static IP
  • Addresses are IP addresses and the number after/is the subnet mask. The subnet mask can be calculated using any IP address calculator on Baidu.
  • Gateway4 is gateway
  • Is the DNS nameservers

After the network configuration takes effect, check the static IP address

sudo netplan apply
sudo ifconfig -a
Copy the code

4. Update system software

4.1 Backup Source Configuration

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo vim /etc/apt/sources.list
Copy the code

4.2 Comment out the original source and replace ali source

deb http://mirrors.aliyun.com/ubuntu trusty main restricted
deb-src http://mirrors.aliyun.com/ubuntu trusty main restricted
 
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu trusty-updates main restricted
 
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu trusty universe
deb-src http://mirrors.aliyun.com/ubuntu trusty universe
deb http://mirrors.aliyun.com/ubuntu trusty-updates universe
deb-src http://mirrors.aliyun.com/ubuntu trusty-updates universe
 
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu trusty multiverse
deb-src http://mirrors.aliyun.com/ubuntu trusty multiverse
deb http://mirrors.aliyun.com/ubuntu trusty-updates multiverse
deb-src http://mirrors.aliyun.com/ubuntu trusty-updates multiverse
 
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu trusty-backports main restricted universe multiverse
 
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
Copy the code

4.3 Update Operations

Delete all packages from the package cache
sudo apt-get clean

Update the software source
sudo apt-get update

# Update software
sudo apt-get upgrade
Copy the code

Five, hardware view

5.1 Nvidia Graphics Card Installation

Sudo apt install ubuntu-drivers-common sudo apt install Ubuntu -drivers-common Ubuntu -drivers Devices sudo apt-get install nvidia-driver-450 ubuntu-drivers autoinstall Check whether the installation is available nvidia - smi # check whether there is a graphics lspci | grep VGA # directly installed version sudo apt - get the install - nvidia driver - y - 440 - server sudo apt - a get -- Purge nvidia* #Copy the code

5.2 Viewing the number of cpus, threads, and cores

# to check the CPU
sudo lscpu
Copy the code

5.3 Viewing Memory Information

Memory support types
sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Type:"

# Per memory frequency
sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Speed:"

Size per memory
sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"
Copy the code

5.4 Viewing Disk Information

lsblk
Copy the code

7. Other operations

7.1 Process Operations

# Check the nDOE process
ps -ef |grep node

# Port occupiedLsof - I: port netstat tunlp | grep port# to kill
kill -9 pid

# Direct kill
killall -9 lotus
Copy the code

Install TeamViewer for Linux and write comments for each step

Check whether the Linux server is 32-bit or 64-bit
getconf LONG_BIT    

# 1. Create teamViewer folder
mkdir ~/downloads/
cd ~/downloads/  


# 2. Download the 32-bit or 64-bit installation package
# to check the installation package's official website https://www.teamviewer.cn/cn/download/linux/
wget https://download.teamviewer.com/download/linux/teamviewer_i386.deb
wget https://dl.teamviewer.com/download/linux/version_15x/teamviewer_15.1.3937_amd64.deb


# 3. Install TeamViewerSudo DPKG -i teamviewer_15. 1.3937 _amd64. Deb# 3.1 Setup error, resolve setup dependencies
sudo apt-get update
sudo apt-get install -f

# 3.2 Install againSudo DPKG -i teamviewer_15. 1.3937 _amd64. Deb# 4. Start
cd /opt/teamviewer/tv_bin
sudo teamviewer --daemon start   # start teamviewer
teamviewer --passwd 123456       # set password 123456
teamviewer --info                # check teamViewer info (ID)


# 5. Remote connectionStart TeamViewer on your computer and enter the server ID and password# other commands
teamviewer --setup console     Set the boot mode to console boot
teamviewer --daemon start      # Start teamView service
teamviewer --daemon stop       # Stop teamView service
teamviewer --daemon restart    # Restart teamView service
teamviewer --info              # View teamView information
teamviewer --passwd 123456     # set password 123456
teamviewer --help              # View help

Copy the code