More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  /tmpProfileFriendsFilesMore Tools Explore the Spaces community

/tmp

September 14

HOWTO: Compiling and Installing PHP 5 and GD on Leopard

PHP 5.2.6 that bundled with Mac OS 10.5.4 is broken and has no GD supporting so I have to compile it myself to enable the GD library. I love to maintain the lib packages by Macports instead of building from source codes, but I prefer to install the application such as MySQL from the official img file. The article "Enabling, Compiling and Installing PHP 5 on Mac OS X Leopard" pretty meet my requirement. But when I executed "make" command the compiler reported two errors: Undefined symbols: "_iconv_close" blahblahblah... and another error is about OpenSSL lib. Just modify the configure command like this to fix:

./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-apxs2=/usr/sbin/apxs \
--with-ldap=/usr \
--with-kerberos=/usr \
--enable-cli \
--with-zlib-dir=/usr \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-sockets \
--with-iodbc=/usr \
--with-curl=/usr \
--with-config-file-path=/etc \
--sysconfdir=/private/etc \
--with-mysql-sock=/var/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-mysql=/usr/local/mysql \
--with-xmlrpc \
--with-xsl=/usr \
--without-pear \
--with-libxml-dir=/usr \
--with-iconv=shared,/opt/local \
--with-openssl=shared,/opt/local \
--with-pdo-mysql=/usr/local/mysql/bin/mysql_config \
--with-gd \
--with-jpeg-dir=/opt/local \
--with-png-dir=/opt/local \
--with-freetype-dir=/opt/local

Then 'make clean' and 'make' again and it will be compiled smoothly.


August 03

HOWTO: 通过SSH Tunnel反向连接控制局域网内Window电脑

主控端:一台有公网IP,开放了SSH服务的Linux/Windows主机(Windows安装OpenSSH可参见http://pigtail.net/LRP/printsrv/cygwin-sshd.html)。
被控端:局域网内一台开放了远程桌面管理(3389端口)的Windows主机。
 
被控端的局域网不能在防火墙上开放端口映射,装上Hamachi之类的免费VPN也不能穿墙,只好用反向连接的方法:
1. 被控端Windows下载Tunnelier(http://dl.bitvise.com/Tunnelier-Inst.exe)并安装运行。Putty也可以,但是没有断线重连功能,参见http://www.megasecurity.org/papers/How to Bypass Your Corporate Firewall Using SSH Tunneling.pdf
2. 在Login标签栏中,Host填写主控端的公网IP或域名如xxx.3322.org,Username、Initial method(登录授权方式)根据具体情况填写。

3. 在S2C Fwding标签栏中,Add一个记录,Listen Interface填写0.0.0.0,即本机IP。List. Port填写3389。Destination Host是要将对监听IP的访问转发到的目标主机IP,因为我只想控制本台Windows主机,所以填写localhost。Dest. Port填写3389,即转发到目标Windows主机的3389端口。
勾选上Accept server-side port forwading。


4. 点击Save Profile As,保存配置。
5. 点击Login,输入密码。连接成功的话SSH Tunnel就建立起来了。
6. 在主控端上,用Linux的Terminal Server Client或Windows的远程桌面连接localhost,就可以控制远程的Windows主机了。

** Tunnelier可以设置如果断线自动重连,不过还是不太保险。研究研究Putty的代码,加上用MSN机器人或IRC bot来远程控制的功能,会更靠谱。

July 17

HOWTO: 在Linux下查看glibc的版本

安装了GCC的话,执行:
strings /lib/libc.so.6 | grep 'release version'
否则
strings /lib/libc.so.6 | grep '[0-9]\.[0-9]'
June 05

11111 && 111

hoho,纯属巧合。

June 01

承德坝上/避暑山庄

5.29-6.1公司组织去承德坝上避暑山庄玩,本哈手持老土的Nokia 3230,用自带的可怜的16MB存储卡,拍下了103张照片。一路上左手PDA,右手手机,拍几张就用蓝牙传到Dell X51v里去,着实辛苦。选了几张还算得意的照片传到了Google Picasa上。本哈的flickr相册已经空了好久,现在终于想败个单反了。

View more entries
 

Public folders

Folders shared with the world