Advertisement
crystallfoxx

Instalar VPS Debian 8 + Hitleap

Feb 4th, 2016
828
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.61 KB | None | 0 0
  1. Para acceder necesitas:
  2.  
  3. Putty: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
  4.  
  5. Para luego de instalar todo:
  6.  
  7. VNC Viewer (o uno de tu preferencia): https://www.realvnc.com/download/viewer/
  8.  
  9. Nota: cuando vayas a entrar con el viewer ponen el siguiente puerto ":5901"después de la ip del VPS.
  10.  
  11. Luego de entrar con Putty:
  12.  
  13. #!/bin/sh
  14. # * Sino estas ejecutando este script copia comando por comando. Excepto los comentarios, como este. * #
  15.  
  16. # Usar httpredir... Porque es mas rapido xD
  17. sed -i.backup 's/ftp.debian.org/httpredir.debian.org/g' /etc/apt/sources.list
  18.  
  19. # Actualizar Debian y Asegurarse Que Las Keys Esten Instaladas Para Que No Falle
  20. apt-get -y update
  21. apt-get -y --force-yes install debian-archive-keyring
  22. apt-get -y update
  23. apt-get -y upgrade
  24.  
  25. # Detener y Desactivar Servicios que no se Usaran (Apache, DNS Server y Samba)
  26. service apache2 stop
  27. update-rc.d apache2 disable
  28. service bind9 stop
  29. update-rc.d bind9 disable
  30. service samba stop
  31. update-rc.d samba disable
  32.  
  33. # [Interactivo] Instalar Config del Teclado y Eso.
  34. apt-get install -y keyboard-configuration
  35.  
  36. # Instalar X, LXDE, VNC, nano y htop - Cuando pida Teclado: Other -> OK -> Spanish -> OK -> Spanish -> OK
  37. apt-get -y install xorg lxde-core tightvncserver nano htop gvfs-fuse- fuse-
  38.  
  39. # Instalar el Repo de Linux Mint que usaremos para Firefox
  40. echo deb http://packages.linuxmint.com debian import > /etc/apt/sources.list.d/linuxmint.list
  41. wget http://packages.linuxmint.com/pool/main/l/linuxmint-keyring/linuxmint-keyring_2009.04.29_all.deb
  42. dpkg -i linuxmint-keyring_2009.04.29_all.deb
  43. rm linuxmint-keyring_2009.04.29_all.deb
  44.  
  45. # Actualizar info del Repo
  46. apt-get -y update
  47.  
  48. # Instalar Firefox
  49. apt-get -y install firefox firefox-l10n-es
  50.  
  51. # Instalar Hitleap
  52. apt-get update -y
  53. apt-get install libc6 -y
  54.  
  55. hlvFile='/opt/hitleapviewer.tar.xz'
  56. if [ -d /opt/hitleapviewer ]; then rm -r /opt/hitleapviewer; fi
  57. if (($(uname -m) != 'x86_64')); then echo 'El HitLeap Viewer solo aguanta Linux de 64-bit (x86_64)';
  58. elif wget --no-check-certificate 'https://hitleap.com/viewer/latest?platform=Linux' -O "$hlvFile"; then
  59.     mkdir -p /opt/hitleapviewer;
  60.     tar xpvf "$hlvFile" -C /opt/hitleapviewer;
  61.     echo rm "$hlvFile";
  62. else echo 'No Se Pudo Descargar el HitLeap Viewer'; fi
  63.  
  64. if [ -d /opt/hitleapviewer ]; then
  65.  
  66. # Crear icono en escritorio del Hitleap
  67. hlvIcon='/usr/share/applications/hitleapviewer.desktop'
  68. echo '[Desktop Entry]' > "$hlvIcon"
  69. {
  70. echo 'Version=1.0';
  71. echo 'Name=HitLeap Viewer';
  72. echo 'Name[es]=Visor HitLeap';
  73. echo 'Comment=HitLeap is a Traffic Exchange service, which automatically delivers free traffic to your website.';
  74. echo 'Comment[es]=HitLeap es un servicio de Intercambio de Trafico, el cual entrega automaticamente trafico gratis a tu sitio.';
  75. echo 'GenericName=Traffic Exchange Application';
  76. echo 'GenericName[es]=Aplicacion de Intercambio de Trafico';
  77. echo "Exec=sh -c '/opt/hitleapviewer/app/HitLeap-Viewer' dummy %k";
  78. echo 'Type=Application';
  79. echo 'Icon=applications-internet';
  80. echo 'Categories=Network;WebBrowser;Viewer;';
  81. echo;
  82. } >> "$hlvIcon"
  83. cp "$hlvIcon" ~/Desktop
  84. fi
  85.  
  86. # Crear la config del VNC para que inicie el escritorio y lo haga en español:
  87. mkdir -p ~/.vnc/
  88. {
  89. echo '#!/bin/sh';
  90. echo;
  91. echo '[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources';
  92. echo 'xsetroot -solid grey';
  93. echo 'export XKL_XMODMAP_DISABLE=1';
  94. echo 'export LANG=es_ES.UTF-8';
  95. echo 'export LANGUAGE=es_ES.UTF-8';
  96. echo '/usr/bin/startlxde &';
  97. } > ~/.vnc/xstartup
  98. chmod +x ~/.vnc/xstartup
  99.  
  100. # Auto Iniciar VNC al Prender el VPS con rc.local
  101. sed -e '$i sudo \/usr/bin/tightvncserver :1 -geometry 1024x768 -depth 16\n' -i /etc/rc.local
  102.  
  103. # Abrir VNC para que crear la clave - Te pedirá la clave 2 veces
  104. # - También puedes programar una clave para solo ver, pero no hace falta así que 'N'
  105. tightvncserver :1 -geometry 1024x768 -depth 16
  106.  
  107. ----------------------------------------------------------------------------------------------
  108. Fin!!!
  109. ----------------------------------------------------------------------------------------------
  110.  
  111. # Otros
  112. ----------------------------------------------------------------------------------------------
  113. # Reiniciar VNC para cuando reinicien el VPS o no les funcione
  114.  
  115. tightvncserver -kill :1
  116. export LANG=es_ES.UTF-8
  117. tightvncserver :1 -geometry 1024x768 -depth 16
  118.  
  119. ----------------------------------------------------------------------------------------------
  120. # Cambiar clave del VNC, se ejecutas desde el PuTTy
  121.  
  122. vncpasswd
  123. ----------------------------------------------------------------------------------------------
  124. # 7-Zip
  125. apt-get install p7zip-full
  126.  
  127. Para Extraer:
  128.  
  129. 7za x Mi-Archivo.7z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement