mercoledì 19 marzo 2014

Creazione server Wordpress UBUNTU 14.04 su SL

1) Immagine Ubuntu 14.04 minimal
2) collegarsi con PUTTY all'indirizzo pubblico

tratto da 
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

3) collegarsi all'indirizzo pubblico
 
ssh root@server_ip_address

4) cambiare password di root

passwd
 
 
5) aggiungere nuovo utente

adduser demo

6) aggiungere nuovo utente ai sudoers

visudo
 
modificare file come questo  
 
# User privilege specification
root    ALL=(ALL:ALL) ALL
demo    ALL=(ALL:ALL) ALL 


7) Modificare SSH

nano /etc/ssh/sshd_config
 
cercare la riga Port 22 e cambiarla con un altro valore es. 4444 

cercare la riga  
PermitRootLogin yes

modificare in

PermitRootLogin no

Salvare file e fare ripartire il servizio SSH

service ssh restart
Testare la connessione da un altro terminale e assicurarsi che il collegamento funzioni prima di uscire
 
ssh -p 4444 demo@server_ip_address

8) installazione client no-ip.com

wget http://launchpadlibrarian.net/26258014/noip2_2.1.9-3_amd64.deb
sudo dpkg -i noip2_2.1.9-3_amd64.deb
reboot


9) installazione VNC
 tratto da

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-14-04

sudo apt-get update
sudo apt-get install xfce4 xfce4-goodies tightvncserver
 
vncserver 
 
 
vncserver -kill :1 

mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
 
nano ~/.vnc/xstartup
 
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
 
sudo chmod +x ~/.vnc/xstartup
 
 
sudo nano /etc/init.d/vncserver
 
 
#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="user"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1024x768"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY} -localhost"
. /lib/lsb/init-functions
case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;
stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;
restart)
$0 stop
$0 start
;;
esac
exit 0
 
 
sudo chmod +x /etc/init.d/vncserver
 
 
sudo service vncserver start
 
sudo update-rc.d vncserver defaults           

Nessun commento: