其实我两个月前就重新挂vagex了……之前旧版非常省资源的,官方强制升级插件,旧版不能用了。
开了三个号,两个月的收益还不错o(╯□╰)o,够买独服了 (便宜vps需要自己挖掘)
vagex不允许多个账号用一个Paypal收款,这时候可以申请paypal企业账号,按几下鼠标即可
装firefox最新版的话,很多vps(尤其像burstnet这样的超瘦货)会卡死
(如图,其实已经卡死了,点哪里都没反应,ip也没上。512M openvz)
后来在用了这方法,发现128M的vps都能挂起……(虽然安装过程非常慢)
一键包下载(若用此一键包,执行完后请跳到第六步手工操作):
cd ~;wget soft.jybb.me/vagex-debian.sh;sh vagex-debian.sh
1
cd ~;wget soft.jybb.me/vagex-debian.sh;sh vagex-debian.sh
1、更新源以及安装相关依赖
apt-get update;apt-get -q -y –force-yes install vnc4server xterm jwm
mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev
libiw-dev mesa-common-dev autoconf2.13 yasm bzip2 libidl-dev zip
1
apt-get update;apt-get -q -y –force-yes install vnc4server xterm jwm
mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev
libiw-dev mesa-common-dev autoconf2.13 yasm bzip2 libidl-dev zip
2.下载firefox
3.6.28源码包,并编译安装(编译过程非常缓存,建议screen里执行)
wget
ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.6.28-candidates/build1/source/firefox-3.6.28.source.tar.bz2
bzip2 -d firefox-3.6.28.source.tar.bz2 tar -xvf firefox-3.6.28.source.tar
cd mozilla-* ./configure –enable-application=browser && make
&& make install
wget
ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.6.28-candidates/build1/source/firefox-3.6.28.source.tar.bz2
bzip2 -d firefox-3.6.28.source.tar.bz2
tar -xvf firefox-3.6.28.source.tar
cd mozilla-*
./configure –enable-application=browser && make && make
install
3.下载flash和vagex插件并安装
wget soft.jybb.me/install_flash_player_11_linux.i386.tar.gz tar
zxvf install_flash_player_11_linux.i386.tar.gz mkdir ~/.mozilla/plugins -p
mv *.so ~/.mozilla/plugins wget vagex.com/vagex_add_on-1.5.6.xpi
wget soft.jybb.me/install_flash_player_11_linux.i386.tar.gz
tar zxvf install_flash_player_11_linux.i386.tar.gz
mkdir ~/.mozilla/plugins -p
mv *.so ~/.mozilla/plugins
wget vagex.com/vagex_add_on-1.5.6.xpi
4.启动vnc并设置
vncserver #输入两次密码 chmod +x ~/.vnc/xstartup vi ~/.vnc/xstartup
1
2
3
vncserver #输入两次密码
chmod +x ~/.vnc/xstartup
vi ~/.vnc/xstartup
将下面两行加到最后
(startjwm后面的是 &号,被自动转换了)
startjwm & firefox –display=:1
startjwm &
firefox –display=:1
5.设置VNC开机启动
vi /etc/init.d/vncserver
1
vi /etc/init.d/vncserver
#加入以下内容 ### BEGIN INIT INFO # Provides: vncserver # Required-Start:
$remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2
3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon. ### END INIT INFO
PATH=”$PATH:/usr/X11R6/bin/” # The Username:Group that will run VNC export
USER=”root” #${RUNAS} # The display that VNC will use DISPLAY=”1″ # Color
depth (between 8 and 32) DEPTH=”16″ # The Desktop geometry to use.
#GEOMETRY=”x” GEOMETRY=”800×600″ #You Can Choice GEOMETRY=”1024×768″
&& GEOMETRY=”1280×1024″ # The name that the VNC Desktop will have.
NAME=”Vncserver” OPTIONS=”-name ${NAME} -depth ${DEPTH} -geometry
${GEOMETRY} :${DISPLAY}” . /lib/lsb/init-functions case “$1” in start) su
${USER} -c “/usr/bin/vncserver ${OPTIONS}” ;; stop) su ${USER} -c
“/usr/bin/vncserver -kill :${DISPLAY}” ;; restart) $0 stop $0 start ;;
esac exit 0
1
#加入以下内容
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
PATH=”$PATH:/usr/X11R6/bin/”
# The Username:Group that will run VNC
export USER=”root”
#${RUNAS}
# The display that VNC will use
DISPLAY=”1″
# Color depth (between 8 and 32)
DEPTH=”16″
# The Desktop geometry to use.
#GEOMETRY=”x”
GEOMETRY=”800×600″
#You Can Choice GEOMETRY=”1024×768″ && GEOMETRY=”1280×1024″
# The name that the VNC Desktop will have.
NAME=”Vncserver”
OPTIONS=”-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}”
. /lib/lsb/init-functions
case “$1” in
start)
su ${USER} -c “/usr/bin/vncserver ${OPTIONS}”
;;
stop)
su ${USER} -c “/usr/bin/vncserver -kill :${DISPLAY}”
;;
restart)
$0 stop
$0 start
;;
esac
exit 0
添加权限使配置生效
chmod +x /etc/init.d/vncserver update-rc.d vncserver defaults
1
chmod +x /etc/init.d/vncserver
update-rc.d vncserver defaults
6.添加计划任务
crontab -e 0 */3 * * * /sbin/reboot
1
crontab -e
0 */3 * * * /sbin/reboot
7.重启
reboot
1
reboot
8.用vncviewer连接你的vps,端口号为1。连接后如果看到firefox打开,离成功就不远了!
转载请注明:VPS驿站 » Debian6 32位下最省资源挂vagex方法