Advertisement
JuanDavid2010

Configurar VPS Debian, Ubuntu

Oct 30th, 2015
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. # Actualizar Debian (UBUNTU)
  2.  
  3. apt-get -y dist-upgrade
  4. apt-get -y upgrade
  5. apt-get -y update
  6.  
  7. # Detener y Desactivar Servicios que no se Usaran (Apache, DNS Server y Samba)
  8.  
  9. service apache2 stop
  10. update-rc.d apache2 disable
  11. service bind9 stop
  12. update-rc.d bind9 disable
  13. service samba stop
  14. update-rc.d samba disable
  15. apt-get purge apache2* bind9* samba*
  16.  
  17. # Instalar X, LXDE, VNC, NANO (Instalar entorno grafico LXDE en debian)
  18. # Cuando pida Teclado: Other -> OK -> Spanish -> OK -> Spanish -> OK
  19.  
  20. apt-get -y install xorg lxde-core tightvncserver nano htop [seleccionar Other --> Spanish OK ]
  21.  
  22. ***********************************************************************************
  23.  
  24. # Remover Flash. Para Remover flash:
  25.  
  26. apt-get remove --purge libswfdec0
  27. apt-get remove --purge libswfdec0-gtk2_0
  28. apt-get remove --purge swfdec-browser-plugin
  29. apt-get remove --purge swftools
  30. apt-get remove --purge flashplugin-nonfree
  31. apt-get autoremove
  32. ********************************************************************
  33.  
  34. # INSTALAR GDEBI: (Para poder ejecutar archivos . deb )
  35.  
  36. apt-get install gdebi responder [Y]es
  37.  
  38. *******************************************************************
  39.  
  40. # Actualizar info del Repositorio
  41.  
  42. apt-get -y dist-upgrade
  43. apt-get -y upgrade
  44. apt-get -y update
  45.  
  46. # Instalar Firefox
  47.  
  48. apt-get remove --purge iceweasel
  49. apt-get remove --purge firefox
  50. apt-get remove firefox
  51. apt-get autoremove
  52.  
  53. Probar con cualquiera de las siguientes lineas:
  54.  
  55. apt-get install firefox
  56. o esta: apt-get -y install firefox firefox-l10n-es
  57.  
  58.  
  59. *************************************************************************************
  60.  
  61. # Abrir VNC para que se creen las configs - Te pedira la clave 2 veces
  62. # Tambien puedes programar una clave para solo ver, pero no hace falta así que 'N'
  63.  
  64. tightvncserver :1 -geometry 1024x768 -depth 16
  65.  
  66. # Cerrar el VNC para editar la config
  67.  
  68. tightvncserver -kill :1
  69.  
  70. # Editar la config del VNC para que inicie el escritorio:
  71.  
  72. nano ~/.vnc/xstartup
  73.  
  74. Y agregar al final las dos lineas siguientes:
  75.  
  76. lxterminal &
  77. /usr/bin/lxsession -s LXDE &
  78.  
  79. # Para Grabar: CRTL-X, Y[es], ENTER CRTL X Y[es] Enter
  80.  
  81. # Pasar al Castellano:
  82.  
  83. export LANG=es_ES.UTF-8
  84.  
  85. ******************************************************************************************
  86.  
  87. # INSTALAR LIBRERIAS NECESARIAS:
  88.  
  89. apt-get install libc6 lib32z1 libc6-i386 libxtst6:i386 && apt-get -f install Digitar [Y]es
  90.  
  91. # Instalar el Repositorio de Linux Mint que usaremos para Firefox. (Copia TODO y lo pegas como si
  92.  
  93. fuera una sola linea.).
  94.  
  95. cp /etc/apt/sources.list /etc/apt/sources.list.bak
  96. echo deb http://packages.linuxmint.com debian import >> /etc/apt/sources.list
  97. wget http://packages.linuxmint.com/pool/main/l/linuxmint-keyring/linuxmint-keyring_2009.04.29_all.deb
  98. dpkg -i linuxmint-keyring_2009.04.29_all.deb
  99. rm linuxmint-keyring_2009.04.29_all.deb
  100.  
  101. # Instalar Librerias adicionales en UBUnTU:
  102.  
  103. sudo apt-get install libc6 lib32z1 libc6-i386 libxtst6:i386 && sudo apt-get -f install
  104. ***********************************
  105. # Reiniciar VPS
  106.  
  107. reboot
  108. ---------------------------------------------------------------------------------------------
  109. # Herramientas - # Geany - Editor de Texto
  110.  
  111. apt-get -y update
  112. apt-get -y install geany Digitar [S]i o, [Y]es
  113.  
  114. ***************************************************************
  115.  
  116. # Si el teclado no funciona:
  117.  
  118. dpkg-reconfigure console-data
  119.  
  120. o bien: dpkg-reconfigure locales
  121.  
  122. **************************************************************
  123.  
  124. # Instalar Bleach Bit ( Ccleaner para LINUX) - Similar a Ccleaner en Windows
  125.  
  126. apt-get install bleachbit
  127.  
  128. # Retirar temporales
  129.  
  130. apt-get autoclean
  131.  
  132. *************************************************************
  133. Crear varios perfiles en Firefox:
  134.  
  135. firefox -p
  136.  
  137. *************************************************************************************
  138. Para acceder al VPS necesitamos el VNC. Que se baja de:
  139.  
  140. http://www.realvnc.com/download/viewer/
  141.  
  142. Nota: cuando vayan a entrar con el viewer digitar el número de puerto ":5901"después de la ip.
  143.  
  144. # *****************************************************************************************
  145. # que distribucion y versión de Linux esta instalada
  146.  
  147. cat /etc/issue
  148.  
  149. uname -m [ 32 Bits o 64 Bits x86_64 = Arquitectura de 64 bits. i686 = Para arquitecturas de 32
  150.  
  151. bits.
  152.  
  153. # ***********************
  154. # Corregir: vnc server crashed
  155. # Cerrar " tightvncserver " - vnc server crashed - You'll have to kill the Xtightvnc # process manually
  156.  
  157. tightvncserver -kill :1
  158. su -c "vncserver -geometry 1250x950 :1" [ su -c "vncserver -geometry 1024x768 :1"
  159. tightvncserver -kill :1
  160. tightvncserver :1
  161.  
  162. ************************************************
  163.  
  164. # Cerrar Firefox desde la consola Putty
  165.  
  166. killall -KILL firefox
  167.  
  168. ************************************************
  169.  
  170. VNC requiere la IP del equipo al cual nos vamos a conectar.
  171.  
  172. Si por ej: es: 52.6.223.169 ese valor se debe digitar en la casilla VNC Server.
  173. Si en éste hemos cambiado el puerto 5900 por otro, debemos añadir a la IP el símbolo de dos puntos
  174.  
  175. (:) y el puerto nuevo. Ejemplo: 100.90.100.90:5901 para conectarse al servidor de IP 100.90.100.90
  176.  
  177. cuyo RealVNC escucha por el puerto 5901
  178.  
  179. Al final agregamos un numero de puerto como por ej; 5901. Luego la IP finalmente queda:
  180. VNC Server: 52.6.223.169:5901 Seleccionar "Conectarse"
  181.  
  182. ************************************************
  183. Error al tratar de abrir VNC, desde Putyyy:
  184.  
  185. El mensaje es similar a este: Can't find file /home/user/.vnc/ubuntu-pc:1.pid
  186. o bien: Can't find file /root/.vnc/ss7123:1.pid
  187.  
  188. Para esto: Borre los archivos en: /tmp ex:
  189.  
  190. $sudo rm -rf /tmp/*
  191. $sudo rm -rf /tmp/.*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement