Use MAC Address for DHCP on Ubuntu 18.04
Ubuntu 18.04 server will not use the MAC address for DHCP connections. To enable this, you need to edit your netplan file localted at /etc/netplan/xxx.yaml and add the dhcp-identifier: mac setting.
network:
ethernets:
eth0:
dhcp4: true
dhcp-identifier: mac
version: 2
Then run sudo netplan apply to apply the new settings.
Reference:
1. https://www.starryhope.com/notes/ubuntu-18.04-server-use-mac-for-dhcp/
2. https://superuser.com/questions/1338510/wrong-ip-address-from-dhcp-client-on-ubuntu-18-04
Ubuntu18.04 開機卡"A start job is running for wait for network to be Configured"的解決方法
問題:卡在“A start job is running for wait for network to be Configured”兩分多鐘。
解決辦法:
cd /etc/systemd/system/network-online.target.wants/
查看該目錄下文件
在[Service]下添加TimeoutStartSec=2sec
Refenrence:https://blog.csdn.net/qq_43743124/article/details/103804211
How to install only security updates in Ubuntu – Command line
- sudo apt-get install unattended-upgrades
- sudo unattended-upgrades -v
- sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i security
- sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i security | awk -F " " {'print $2'} | sudo xargs apt-get --yes install
All available Options:
-h, –help show this help message and exit
-d, –debug print debug messages
–apt-debug make apt/libapt print verbose debug messages
-v, –verbose print info messages
–dry-run Simulation, download but do not install
–download-only Only download, do not even try to install.
–minimal-upgrade-steps
Upgrade in minimal steps (and allow interrupting with
SIGTERM
aws linux server, ubuntu, remote connection mysql, ERROR 2003 (HY000): Can not connect to mysql server on
Reference : http://www.voidcn.com/article/p-pnqmggwm-bqy.html
1. If you use the aws server, enter the aws console, find the security group that runs the instance, edit the inbound security group, and add the rules. Select the rule MYSQL / Aurora, the port is set to 3306, save
Unbind the address to allow access from the extranet. Edit /etc/mysql/mysql.conf.d/mysqld.cnf Find bind-address = 127.0.0.1, add # in front of it, comment the line.
3. Log in to the database, execute the following code
GRANT ALL PRIVILEGES ON *. * TO 'username' @ '%' IDENTIFIED BY 'password' WITH GRANT OPTION ; FLUSH PRIVILEGES ;
The first line of code to create user username, password is set to password, and allow access from all domain names, the second line of code for the update permissions.
If you change existing users to allow remote access You can modify the mysql database user table, the default field Host content 'localhost' changed to '%'.
Set root to use external network access;
USE mysql;
UPDATE user SET Host = '%' where User = 'root' ; FLUSH PRIVILEGES ;




