Category: Linux/Unix

  • 吐槽一下MacOS权限管理中的本地网络

    一早想访问个本地网络的KVM guest,发现怎么都ping不通,但是反向通。traceroute两边都通。奇奇怪怪的问题,翻找了半天路由配置,无果。 想到用其他设备测试,都是OK的。百思不得其解,找不同,区别: 第一个想到的是网络设备的更新,翻找了一些设备系统更新日志,没找到什么相关更新。 找了另一台MBP,一直没更新系统。iTerm没有问题,忽然是不是MacOS的权限问题,bingo 就这……这表现也太无语了。

  • Resize QEMU image for Openwrt

    While using ext4 combine image from Openwrt website directly, you will find the openwrt system only about 100MB disk. The disk has to be resized before resize the partition and filesystem. Here is the steps you can follow. First, resize the qemu image. Reference. After Openwrt system booted up. Reference. Resize ext4 filesystem after partition…

  • SSH connection keepalive

    Add these lines into you ~/.ssh/config file. It can help you send keepalive message 6 times every 30 seconds.

  • Enable backspace in VIOS command line

    Log in as padmin $ oem_setup_env # echo “export ENV=/home/padmin/.kshrc” >> /home/padmin/.profile # echo “export HOST=\”\$(/usr/bin/uname -n)\”\nif [ \”\`whoami\`\” = \”root\” ]; then\n  PS1=\”\`whoami\`@\$HOST:\\\$PWD # \”\nelse\n  PS1=\”\`whoami\`@\$HOST:\\\$PWD $ \”\nfi\n\nset -o emacs;alias -x __A=\”\$(echo ‘\\\\020’)\”; alias -x __B=\”\$(echo ‘\\\\016’)\”; alias -x __C=\”\$(echo ‘\\\\006’)\”; alias -x __D=\”\$(echo ‘\\\\002’)\”; alias -x __H=\”\$(echo ‘\\\\001’)\”; alias -x __Y=\”\$(echo ‘\\\\005’)\”\n” >>…

  • OS X Terminal: -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

    Uncheck the box “Set locale variables automatically” in iTerm2 under Preferences -> Profiles -> Terminal

  • X11 forwarding box font…

    Try to install X11 font yum install xorg-x11-fonts-Type1  

  • fatal error: Python.h: No such file or directory

    root@raspberrypi ~/tools/RPi.GPIO-0.5.2a # python setup.py install running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -E -c pass TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files running bdist_egg running egg_info writing RPi.GPIO.egg-info/PKG-INFO writing top-level names to RPi.GPIO.egg-info/top_level.txt writing dependency_links to RPi.GPIO.egg-info/dependency_links.txt reading manifest file ‘RPi.GPIO.egg-info/SOURCES.txt’ reading manifest template ‘MANIFEST.in’ writing manifest file ‘RPi.GPIO.egg-info/SOURCES.txt’ installing library…

  • CentOS/RHEL 5 中 Samba 服务无法访问

    新安装的 CentOS 6.3 的服务器使用原始 Samba 配置文件却无法正常工作,症状是:能够访问,但是进入目录提示没有权限。 尝试方法: 关闭 SELinux vim /etc/sysconfig/selinux 改为如下: # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing – SELinux security policy is enforced. # permissive – SELinux prints warnings instead of enforcing. # disabled – SELinux is fully…

  • Device Mapper Multipath Configuration

    1. Setup Steps 1.1 install and load device mapper (not necessary in RHEL58) a) install Device Mapper Multipath/DMMP yum install device-mapper device-mapper-multipath b) load and check device mapper and multipath modules modprobe dm-multipath modprobe dm-round-robin lsmod | grep md c) start the multipathd service

  • 编译 64bit Linux Kernel 时报 genksyms 找不到

    可以使用 $ make mrproper $ make cloneconfig $ make prepare-all 来解决。 不过如果报错:“/bin/sh: scripts/genksyms/genksyms: No such file or directory”,可以将 “make prepare-all” 改为 “make prepare scripts”。如下: $ make mrproper $ make cloneconfig $ make prepare scripts