2017年3月24日 星期五

ipmi on ubuntu

step1) 安裝OpenIPMI與ipmitool
# sudo apt-get install openipmi
# sudo apt-get install ipmitool

step2) 載入IPMI
# modprobe ipmi_msghandler
# modprobe ipmi_devintf
# modprobe ipmi_si

step3) 看自己local端的BMC資訊
# ipmitool lan print

2017年3月23日 星期四

ubuntu server 16.04.02 install ubuntu-desktop

Add cdrom as a package source (ubuntu-desktop is not included, just add a note)
(Insert the cdrom into system)
# sudo -i
# mount /dev/cdrom /media/cdrom
# apt-cdrom -m -d=/media/cdrom add

Set the LAN setting
# ifconfig -a
Remember the interface name you want to config (enp24s0 for example)
Edit the file /etc/network/interfaces
Add following two line
auto enp24s0
iface enp24s0 inet dhcp

restart the networking service
# systemctl restart networking.service

Add Proxy setting to apt
Add a line in /etc/apt/apt.conf (if the file not exist, create a new one)
Acquire::http::Proxy "http://username:password@proxy.hinet.net:80";

# apt-get update
# apt install --no-install-recommends ubuntu-desktop
# apt-get install gnome-terminal

Allow root login through remote ssh
Edit the file /etc/ssh/sshd_config
PermitRootLogin prohibit-password
to
PermitRootLogin yes

Then restart the sshd service
# systemctl restart sshd.service

Enable sshd
# sysv-rc-conf sshd on

2017年3月17日 星期五

tmux try out

#tmux
#tmux attach

Split window vertically: ctrl+b %
Split window horizontal: ctrl+b "
Switch between pane: ctrl+b q (then press the number key)

Help mode: ctrl+b ?

Copy mode: ctrl+b [
and then use array key to point the start position and ctrl+[space]
and use array key to point the end position and alt+w
Paste the copied content: ctrl+b ]

Create a new window: ctrl+b c
switch to next window: ctrl+b n
switch to previous windows: ctrl+b p
show the window number and switch to it: ctrl+b w
switch to window #: ctrl+b (the window number)
Rename window: ctrl+b ,

Detach tmux: ctrl+b D

http://blog.chh.tw/posts/tmux-terminal-multiplexer/
https://awhan.wordpress.com/2010/06/20/copy-paste-in-tmux/

2017年3月16日 星期四

Bitcoin mining

https://github.com/luke-jr/bfgminer
https://github.com/pooler/cpuminer
http://p2pool.in/
https://github.com/p2pool/p2pool
https://blockchain.info/address/1LYoqQuLuZNzHeZab95jMkwimskVCeh9d

get the MAC address of Network Adapter using ethtool

# ethtool -P enp24s0
# ethtool -P eth0

or
# cat /sys/class/net/enp24s0/address

http://stackoverflow.com/questions/14955504/finding-original-mac-address-from-hardware-itself