分类:
2010-06-17 16:51:25
1)下载:
在solaris 10上面需要如下软件包:
gcc-3.4.6-sol10-sparc-local.tar.gz
openssl-0.9.7g-sol10-sparc-local.gz
make-3.81-sol10-sparc-local.gz
2)安装:gzip -d stunnel-4.26.tar.gz ;tar -xvf stunnel-4.26.tar
cd stunnel-4.26
./configure --preifx=/usr/local/stunnel --with-ssl=/usr/local/ssl
注意(在configure之前,前面的gcc,openssl,make包要先安装)
make
如果在make的时候出现下面的报错
In file included from /usr/include/sys/procset.h:24,
from /usr/include/sys/wait.h:25,
from /usr/include/stdlib.h:22,
from app.c:26:
/usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
In file included from /usr/include/stdlib.h:22,
from app.c:26:
/usr/include/sys/wait.h:86: error: parse error before "siginfo_t"
In file included from app.c:29:
/usr/include/signal.h:111: error: parse error before "siginfo_t"
/usr/include/signal.h:113: error: parse error before "siginfo_t"
make[3]: *** [app.o] Error 1
make[3]: Leaving directory `/usr/local/src/bind-9.3.2/lib/isc/unix'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr/local/src/bind-9.3.2/lib/isc'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr/local/src/bind-9.3.2/lib'
make: *** [subdirs] Error 1
则执行:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/mkheaders
然后在make就可以了。
make install 就可以了。
mkdir -p =/usr/local/stunnel/var/run/stunnel
然后配置配置文件:
cd /user/local/stunnel
vi etc/stunnel/stunnel.conf
增加以下内容:
cert = /usr/local/stunnel/etc/stunnel/stunnel.pem
pid =/usr/local/stunnel/var/run/stunnel/stunnel.pid
setuid = root
setgid = root
debug = 1
output = stunnel.log
[pop3s]
accept = 995
connect = 127.0.0.1:110
[ssmtp]
accept = 465
connect = 127.0.0.1:25
启动/var/local/stunnel/bin/stunnel 回车 即可。
注(stunnel.pem密钥文件可以自行生成,我用的是默认生成的密钥文件)