Soft Router Solution on Ubuntu Server 20.04

This solution is based on the built-in systemd-networkd, isc-dhcp-server and hostapd; conflicted with dnsmasq.

It is using the built-in IP forwarding feature against bridging. See also routing vs bridging

Prerequisites

  • Traffic and firewall management
1
2
sudo ufw enable
sudo ufw status
  • DHCP server
1
2
sudo service isc-dhcp-server start
sudo service isc-dhcp-server status
  • WiFi hotspot
1
2
3
sudo systemctl unmask hostapd
sudo systemctl enable hostapd
sudo systemctl status hostapd
Read more

10Gbps+ Ethernet Essentials

Prerequisites

MLNX_OFED_LINUX-5.1 no longer supports lowest-end Mellanox ConnectX3 series; using MLNX_OFED_LINUX-5.0 instead.

sudo mount [MLNX…_ubuntu20.04_x86_64.iso] /mnt/cdrom -o loop
./mlnxofedinstall

Start configuration

sudo mst start
sudo mst status

Details

ibv_devinfo

mlxconfig -d [device_identifier] query
mlxconfig -d [device_identifier] set LINK_TYPE_P1=2

sudo systemctl start opensmd

See also more.

Miscellanies about initializing an Ubuntu Server (II)

Error: Permission denied … when running Docker (perviously seen)

Better solution than before:

1
2
3
sudo groupadd docker
sudo usermod -aG docker $USER
sudo service docker restart

[UPDATE]
Looks like it is also required to logging out and back so that the group membership change takes effect (how?):

1
su -s ${USER}

And this is to check for group membership:

1
getent group groupname | awk -F: '{print $4}'

Potential issue when Docker for Ubuntu is installed and managed by Snap

Either systemd or systemctl won’t be able to locate or control Docker, which would occur when Docker is pre-installed with Ubuntu Server. Use snap commands instead:

1
2
sudo snap services docker
sudo snap restart docker

Local Build Preparation

This is likely to be a cure-all:

1
sudo apt install -y build-essential

Prepare for deep learning based on GPU with Python

  • OS: Ubuntu 16.04

  • Building prerequisities: make build-essential python3-dev

  • Parallel computing prerequisities: cuda8.0 cudnn6.0

export CUDA_HOME=/usr/local/cuda
export PATH=$PATH:/usr/include:/usr/local/cuda/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/lib/x86_64-linux-gpu/:usr/local/cuda/lib64

  • Python 3.5 packages: chainer tensorflow-gpu cupy

nvidia-cuda-dev is only required when building cupy locally.

If python package installation fails, try with sudo pip install --force-reinstall --ignore-installed --no-cache-dir -vvvv to debug.

Repair support for Ubuntu everyday usage

https://askubuntu.com/questions/218377/install-remove-language-show-only-english-no-other-choice

http://www.linuxdiyf.com/linux/20344.html

https://askubuntu.com/questions/455682/14-04-chinese-ibus-input-no-options

sudo apt-get –reinstall install language-selector-gnome

sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4

ibus restart

im-config -s ibus

sudo ibus-setup

【161114】服务器管理记录

Fatal Error: ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine

yum install php56w-mysql

restart Apache

Ubuntu升级gcc,g++

Install Linux on Surface 3 (Non Pro)

  • Prevent boot into Windows automatically when boot from SSD

    Rename or remove the /EFI/Microsoft in the EFI partition.

  • Why the bash replied “fdisk/mkfs command not found?”

    Because /sbin is not appended to the $PATH.

【160713】服务器管理记录

uname -a

【160610】服务器管理记录

  • Ubuntu查看运行中的进程及其id、监听端口

    sudo netstat -anp

  • 查询进程id

    pidof

  • 安全终止某个进程

    kill -15

  • 后台运行某个进程

    nohup&

内存空间不足的临时解决办法
How To Create A Swap File In Linux

linux下由于内存不足造成的 virtual memory exhausted: Cannot allocate memory, qt **.o文件 file not found

configure-apache-to-listen-on-port-other-than-80

http://askubuntu.com/questions/256013/could-not-reliably-determine-the-servers-fully-qualified-domain-name