西维蜀黍

【MySQL】MySQL Exporter

Download

$ curl -LO https://github.com/prometheus/mysqld_exporter/releases/download/v0.14.0/mysqld_exporter-0.14.0.linux-amd64.tar.gz

$ tar xf mysqld_exporter-0.14.0.linux-amd64.tar.gz
  ...


【Linux】snap

Service Management

List

# Display basic information about installed snap software
$ snap list

# Check for recent snap changes in the system
$ snap changes

Install

# Search for a package
$ snap find package_name

# Install a package
$ snap install package_name

Update

# Update a package
$ snap refresh package_name

# Update a package to another channel (track, risk, or branch)
$ snap refresh package_name --channel=channel

# Update all packages
$ snap refresh

Uninstall

# Uninstall a package
$ snap remove package_name
  ...


【Network】V2Ray

Install

Server

Refer to https://www.v2fly.org/guide/install.html#macos-%E5%AE%89%E8%A3%85%E6%96%B9%E5%BC%8F

Linux

安装和更新 V2Ray

// 安装可执行文件和 .dat 数据文件
# sudo bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

$ sudo systemctl enable v2ray; sudo systemctl start v2ray

Refer to https://github.com/v2fly/fhs-install-v2ray/blob/master/README.zh-Hans-CN.md

  ...


【Linux】获取 CPU 温度

Procedure for monitoring CPU temperatures on Ubuntu

$ sudo apt install lm-sensors

Install lm-sensors

sudo apt-get install lm-sensors 
  ...


【Linux】设置时区

View Timezone

$ timedatectl
                      Local time: Wed 2019-01-23 22:45:47 UTC
                  Universal time: Wed 2019-01-23 22:45:47 UTC
                        RTC time: Wed 2019-01-23 22:45:48
                       Time zone: Etc/UTC (UTC, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

The system timezone is configured by symlinking /etc/localtime to a binary timezone identifier in the /usr/share/zoneinfo directory.

ls -l /etc/localtimeCopy
lrwxrwxrwx 1 root root 27 Dec 10 12:59 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC
  ...