Ubuntu uses Summary (mainly deployed K8s cluster is behind a foundation bedding)

Package Management

  dpkg -L libxml2 # libxml2 installed to view what files
  dpkg -s / usr / bin / ls # ls view is that the package provides
  dpkg -c abc.deb # View abc.deb package contains only those files that
  dpkg -i abc .deb # install abc.deb

  apt-cache madison docker-ce # apt to view the source cache database versions on all relevant information docker-ce
  apt list | grep libxml2 # list all deb packages apt source cache database, and filter which contain libxml2 packages

  apt update # update apt source cache database information

  apt-get install procps (top command) iputils-ping (ping command) iputils-arping iputils-tracepath iproute2 net-tools ( web tools) tcpdump openssh-server (contains ssh , scp, etc.)
        Telnet-Server the traceroute NFS NFS-Kernel Common lrzsz-Tree for libpcre3 OpenSSL for libpcre3 for libssl-dev-dev-dev zliblg the ntpdate

Review apt source:
  Vim /etc/apt/sources.list # Note: after editing must be performed apt update apt source cache to update the database.

snap: This is ubuntu on a new package management tool, its biggest advantage is in its software library, all software is an individual, that individual package contains all the file is run, need, You do not need to rely on to solve the problem, after which the software is installed and running, the same as the container.
  If you want to snap to see what packages are available, you can view https://uappexplorer.com/snaps
  snap snap List View # packages currently installed.
  snap stop lxd # lxd to stop running a regular service.
  snap remove lxd # lxd can uninstall the software
  error snap changes # to see the current installation, uninstallation, and other processes that occur.
  snap abort 6 # may be forced to terminate the sixth installation errors, but still retry the installation process.
  snap info core # view basic information core of the software.
  snap install lxd # lxd installation tool
  snap refresh lxd # lxd update tool, if it is to write lxd update all snap packages.
  snap revert lxd # fall back to the previous version of lxd.

  Method # Uninstall snap Package Manager:
    1. Uninstall all installed packages snap snap in.
      Snap the Remove lxd # default ubuntu 18.10 is lxd installed
    2. Uninstall direct snap
      apt remove snapd

Ubuntu How to modify global DNS:

# In general, people accustomed to using RHEL system, must be very familiar with the /etc/resolv.conf file, but after Ubuntu18.10, this file is no longer true to our understanding of the resole.conf.
/Etc/resolv.conf # LL ~
  lrwxrwxrwx 1 root root 39 Oct 18 2018 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
  this is the truth. Why is this so? Refer to man systemd-resolved.service because I see do not understand, so I will not say. Haha, hope to have a deeper understanding of his fellow lot of guidance ah.
  Want to make a global entry into force, man said manual methods:
    1. Remove the soft connection, rebuild resolv.conf
      then use the following command to verify
      resolvectl status

on ubuntu View message log:

  tail -f /var/log/syslog

Restart the network:

  vim /etc/netplan/50-cloud-init.yaml # detailed example on this profile: man netplan 
  netplan the Apply

#Ubuntu set the system time zone

# Zone list when you view
  timedatectl List-Timezones

# Set to use Asia / Shanghai time zone, use this command to change the time zone, will modify more comprehensive, it modifies the / etc / timezone and / etc / localtime, if you just use the / usr / share / zoneinfo / Asia / Shanghai to cover the / etc / localtime, use the date to see, really changed time zone, but timedatectl see the system default time zone is UTC, it is recommended to use timedatectl to modify the time zone.
  timedatectl set-timezone Asia / Shanghai

English Ubuntu installed in the system to support Chinese UTF-8

1. Installation Package Chinese:
  APT-GET the install-Language-Pack * ZH
2. Configuration relating environment variables
  Vim / etc / Environment
    # increase coding and language setting
    the LANG = ". 8-zh_CN.UTF"
    the LANGUAGE = "zh_CN: ZH: the en_US : EN "

  # sample configuration:
    the PATH =" / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / bin: / usr / games "
    the LANG =". 8-zh_CN.UTF "
    the UNZIP =" - the CP936 O "
    zipinfo =" - the CP936 O "
3. re-set the local configuration
  dpkg-reconfigure locales

Certificates issued ".rnd" problem

  Use the ubuntu openssl req x509 -new -nodes ..... when issuing certificates, appear .rnd file is not found, then, you can directly touch .rnd file.

Guess you like

Origin www.cnblogs.com/wn1m/p/11285345.html