virtual box network how to

Posted on Updated on

  1. 靜態配置 Host 機器上的 Virtual Box Host only 的網路介面ip : ex: 10.0.2.16
  2. 配置 Client (VM) 裏頭的兩張介面卡 IP
    1. NAT: (第一個介面, eth0) 10.0.2.15
    2. Virtual Host Only: (第二個介面, eth3) 10.0.2.17
  3. 將 Windows 上 的 LAN/Wifi 網路卡開放分享給 Virtual Box Host Only。
  4. Client 裏頭的 routing table

$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.2.16 255.255.255.0 UG 0 0 0 eth0
10.0.2.0 * 255.255.255.0 U 1 0 0 eth3
10.0.2.0 * 255.255.255.0 U 1 0 0 eth0

$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=58 time=7.33 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=58 time=7.48 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=58 time=10.7 ms
— 8.8.8.8 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 7.336/8.534/10.779/1.591 ms

廣告

rtnetlink always triger RTM_NEWLINK periodically on wifi interface

Posted on

enable wifi lan (wlan0) by wpa_supplicant, but rtnetlink triger NEW_LINK

wpa_supplicant.conf contains a network but cannot access nor connect, wifi would retry periodically, so RTM_NEWOINK with IFLAG =  IFF_UP | IFF_BROADCAST (0x1003) send to userspace periodically with each trial.

Solution:

  1. revmoe network from default wpa_supplicant.conf
  2. or set autoscan=period:5  (to set the retry time)
  3. or set sched_scan_plans=sec:trial sec:trial …

If sched_scan_plans are configured and supported by the driver, autoscan is ignored.

解決方式:

transfer iOS App distribution privilage.

Posted on

1. each distribution certificate binds with a private key which is used to generate the certificate from Keychain.
2. export the private key described with 1.
3. import the exported private key described with 2. in new developer’s Mac OS.
4. new developer should down load the distribution certificate from iOS Dev Center. (of course the developer should be invited as a member of team of development before all).

Mac OS X mavericks with Subversion + Apache

Posted on Updated on

  1. should rebuild subversion to x86_64 architecture
    • make link for Xcode, because subversion detect build tool chain with a specific rule but Mavericks as no such path for Xcode.

% sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/  /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain

    • download svn (v1.8.3) download svn 1.6.18 (1.8.3 cannot work)
 http://archive.apache.org/dist/subversion/subversion-1.6.18.tar.gz
    • make and make install
% cd ~/Downloads/subversion-1.6.18
% cd ./configure
% make
    • copy mod_authz_svn.so and mod_svn.so to /usr/libexec/apache2 or anywhere you want to locate the module binary files, this would be referenced in httpd_server_app.conf for Web Server.

% cp subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/libexec/apache2

% cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/libexec/apache2

  1. in /Library/Server/Web/Config/apache2/httpd_server_app.conf
    • add

LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so

    • notice the order, if mod_dav_svn.so loaded after mod_authz_svn.so, you got the error as launch web server.

httpd: Syntax error on line XXX of /Library/Server/Web/Config/apache2/httpd_server_app.conf: Cannot load /usr/libexec/apache2/mod_authz_svn.so into server: dlopen(/usr/libexec/apache2/mod_authz_svn.so, 10): Symbol not found: _dav_svn_split_uri\n  Referenced from: /usr/libexec/apache2/mod_authz_svn.so\n  Expected in: flat namespace\n in /usr/libexec/apache2/mod_authz_svn.so