当前位置: 首页 > linux, OpenSource > 正文

openvpn vnc java firefox on centos5

1. yum install openvpn
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
yum install epel-release-5-4.noarch.rpm
yum intall openvpn

vnp configs: 2hei.net.ovpn
add:
–script-security 2
up “/etc/openvpn/update-resolv-conf up”
down “/etc/openvpn/update-resolv-conf down”

script: update-resolv-conf
#!/bin/bash
case “$1” in
    up)
        mv /etc/resolv.conf /etc/resolv.conf.openvpn
        echo “# Generated by OpenVPN Client UP Script” > /etc/resolv.conf
        echo “search 2hei.net” > /etc/resolv.conf
        for opt in ${!foreign_option_*};
        do
            #echo ${!opt} | sed -e ‘s/dhcp-option DOMAIN/domain/g’ -e ‘s/dhcp-option DNS/nameserver/g’ >> /etc/resolv.conf
            echo ${!opt} | sed -e ‘s/dhcp-option DNS/nameserver/g’ >> /etc/resolv.conf
        done
        #add orig nameserver
        grep nameserver /etc/resolv.conf.openvpn >> /etc/resolv.conf
        ;;
    down)
        mv /etc/resolv.conf.openvpn /etc/resolv.conf
        ;;
    *)
        echo “Pass either UP or DOWN”
        ;;
esac

cat start_client_dc1.sh
#!/bin/sh
/usr/sbin/openvpn /etc/openvpn/2hei.net.ovpn

2. update firefox on centos
down load new version of firfox
ln -s /usr/local/firefox/firefox /usr/bin

3. use java web start on firefox
download new version of jre
sh ./jre-6u25-linux-x64-rpm.bin
alternatives –install /usr/bin/java java /usr/java/jre1.6.0_25/bin/java 2
alternatives –config java     # pick 1 or 2 or 3
java -version
cd /usr/lib/mozilla/plugins
ln -s /usr/java/jre1.6.0_25/lib/amd64/libnpjp2.so

4. vnc
[2hei.net# .vnc]$ cat xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &

start vncserver
vncserver

本文固定链接: https://www.2hei.net/2011/06/10/openvpn_vnc_java_firefox_on_centos/ | 2hei.net

该日志由 u2 于2011年06月10日发表在 linux, OpenSource 分类下,
原创文章转载请注明: openvpn vnc java firefox on centos5 | 2hei.net
关键字: , , ,

报歉!评论已关闭.