Ubuntu APT Cache apt-cacher-ng

有時候常常要更新 package 但是網路太慢, 或是網路內的機器太多台要節省頻寬
或是只是懶的改設定從 .us 指回 .tw
都可以用 APT CACHE 的服務,

最近碰到的問題是, 因為要跑 cloud VM, VM 跑起來之後都會要裝程式, 預設都是從 .us 裝.
公司網路也沒多快, 每次都要下載也要花一點時間, 就裝了 APT CACHE 的服務.
Read more »

Ubuntu Sudo Nopasswd

目前用到比較好 sudo nopasswd 的方法
Ubuntu 16.04 適用

改寫一下, 這是講 ubuntu clouding image , 不過一般 Desktop 應該也適用

At the end of /etc/sudoers there is what I thought was just a comment:
#includedir /etc/sudoers.d

You should edit this file using visudo. The following command will let you edit the correct file with visudo.

$ sudo visudo -f /etc/sudoers.d/90-cloudimg-ubuntu 

And add a line like:

[username] ALL=(ALL) NOPASSWD:ALL 

At the end.

http://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password

Cavium ThunderX Install Ubuntu CD

choice 3 shell

GPIO(0)-NODE(0): Vector:100 address :801000000050 irq:33
GPIO(0)-NODE(0): Vector:101 address :801000000058 irq:33
Using TWSI func = 0x48
UEFI Interactive Shell v2.1
choice 3 shell

ThunderX Cavium UEFI install ubuntu CD

enter shell mode and put usb cd-rom .

GPIO(0)-NODE(0): Vector:100 address :801000000050 irq:33
GPIO(0)-NODE(0): Vector:101 address :801000000058 irq:33
Using TWSI func = 0x48
UEFI Interactive Shell v2.1
EDK II
UEFI v2.40 (Cavium Thunder cn88xx EFI ThunderX-Firmware-Release-1.22.11-0-g06c3f37 Sep)
Mapping table
FS0: Alias(s):CD36a0b0a:;BLK1:
PciRoot(0x0)/Pci(0x11,0x0)/USB(0x0,0x0)/USB(0x1,0x0)/CDROM(0x0)
BLK2: Alias(s):      
VenHw(25E45362-4074-46DC-88A0-79D6A23F3C9D)
BLK0: Alias(s):                     
PciRoot(0x0)/Pci(0x11,0x0)/USB(0x0,0x0)/USB(0x1,0x0)
 
Press ESC in 3 seconds to skip startup.nsh or any other key to continue.
Shell> fs0:                                   
FS0:\> ls

run
/boot/grub/arm64-efi

Ubuntu 16.04 VMWARE Guest Dual Monitor 問題

Ubuntu 16.04 當 VMWARE Guest OS 時, 如果 Host 有兩個螢幕, Guest 是沒有辦法切二個螢幕的.

看起來是 Ubuntu 16.04 用的 4.4.0 Kernel 有問題, 個人測試是升級到 4.8.11 就可以了.

4.8.11 Mainline Kernel 下載你要的 Kernel 版本
我是用這三個

linux-headers-4.8.11-040811_4.8.11-040811.201611260431_all.deb
linux-headers-4.8.11-040811-generic_4.8.11-040811.201611260431_amd64.deb
linux-image-4.8.11-040811-generic_4.8.11-040811.201611260431_amd64.deb

安裝 Kernel

$ sudo dpkg -i *.deb

安裝完畢之後 reboot

如果第二個螢幕有滑鼠對不齊的問題(mouse alignment problem), 要到 VMware Preferences 內的 Input , Optimize mouse for games 選 Always .
這時候要切出 VMware 時就要用 Ctrl + Alt 鍵.
vmware-ubuntu-mouse

Ref:
Linux – Cycle Multiple Monitors doesn’t complete correctly. #74
Mouse Pointer Alignment Problem with Ubuntu on VMWare

Ubuntu 16.04 error: undefined reference to `create_module’

Ubuntu 16.04 error: undefined reference to `create_module’

Building module-init-tools-3.2 in Ubuntu16.04 failed:
lsmod.o: In function `try_old_version':
./module-init-tools-3.2/backwards_compat.c:56: undefined reference to `create_module'

這一篇Ubuntu 16.04 error: undefined reference to `create_module’對我沒有用, 但是解法是對的, 這時就要用粗暴的方式, 直接改 backwards_compat.c
加上

#define CONFIG_NO_BACKWARDS_COMPAT

暫時解決問題

Unfortunately you do not qualify for today’s study.

Blizzard (暴雪) 講的真好, 做問卷給這個答案

Thank you for your participation. Unfortunately you do not qualify for today’s study.

暴雪這樣嘲諷玩家的哦! 做你的問卷還這樣被吐槽
一早起來就只有
OK 好!OK 好!OK 好!OK 好!OK 好!OK 好!OK 好!OK 好!

fuck_bl

這時候再看郵件不是很好笑嗎?

fuck_bl2

搞技術不如搞騙術

我的今日名言

並沒有特別指誰

[CentOS] install iperf

$ yum install epel-release
$ yum provides iperf
$ yum install iperf

yum provides iperf 不是這麼必要, 可以不用執行

ref.
Extra Packages for Enterprise Linux (EPEL)
Installing iperf on CentOS

[Gentoo] 替 Apache 加上 http2 支援

沒有很難, 因為之前弄了 Letsencrypt 就想加一下 HTTP2, 這應該也很成熟了
Read more »

Linux Kernel 4.7 PPTP pass through issue

升級到 Linux kernel 4.7 之後, 突然 PPTP pass through 有問題.
有人提供了解決方案

在 /etc/sysctl.conf 加上

net.netfilter.nf_conntrack_helper=1

這樣就可以了, 不知道為什麼預設值改了.
ref.
Bug 152101 – Updating from 4.6.4 to 4.7 breaks “pptp pass through"