Per gestire il web server, occorre attivare php, installare un server apache e mysql, tutti elementi non disponibili nell’istallazione standard di Raspbian. Per fortuna, ormai abbiamo visto e capito come fare per installare software. Apriamo il terminale e digitiamo
sudo apt-get install php5
Per installare il supporto a php5 e
sudo apt-get install apache2
per il server Apache.Per installare invece mysql occorre digitare nel terminale la stringa
sudo apt-get install mysql-server
Vero richiesta una password, che sarà bene rammentare, quindi appuntatela.
Ora controlliamo che mysql funzioni.
Digitiamo
sudo mysql -u root -p
Verrà richiesta la password. E’ il caso di ricordarsela.
Se tutto è andato bene, comparirà il seguente testo:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 42
Server version: 5.5.28-1 (Debian)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
Ora chiudiamo mysql, digitando
quit
E questo è tutto.
Miglioriamo la sicurezza del nostro database rimuovendo la possibilità di accesso agli utenti anonimi e ricaricando la tabella dei privilegi del database mysql.
pi@raspberrypi ~ $ sudo /usr/bin/mysql_secure_installation
Enter current password for root (enter for none):
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
Thanks for using MySQL!
Ecco, ora è tutto pronto per il nostro blog.
Ora però dobbiamo montare la struttura del blog stesso. Nella prossima puntata vedremo come installare sul nostro server un cms (Content Management System) come WordPress.
A presto