# Passage en root
sudo su -
# définition du nouveau mot de passe root
passwd
# lancement auto du serveur ssh au démarrage du Linutop
services-blacklist del ssh
# Lancer “Paramètres Linutop”
gksudo -k lconfeditor
# Passage en mode sécurité minimale Dans l'onglet “Sécurité”, cocher “Persistant”
# Install de mysql-server, phpmyadmin, joe
aptitude update aptitude install mysql-server phpmyadmin joe htop
# Configurer le mot de passe root du serveur MySQL
# Modif de la config de phpmyadmin
joe /etc/phpmyadmin/config.inc.php
modif de mysqli → mysql
Si on veut autoriser une connexion a phpmyadmin sans sans passwd, décommenter la ligne 64…
/* Uncomment the following to enable logging in to passwordless accounts, * after taking note of the associated security risks. */ // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
# relancer serveur apache2
/etc/init.d/apache2 restart
# install gestion de l'heure automatique
# https://help.ubuntu.com/8.04/serverguide/C/NTP.html
aptitude install ntp
# install de vncserver
aptitude install vnc4server
# Lancer vncserver une fois en ligne de commande
vncserver
# vncserver demander de définir le mot de passe de connexion
# Modifier /root/.vnc/xstartup pour le transforme comme cela
#!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession
# lancement automatique de vnc server au demarrage
Copy the following into /etc/init.d/vncserver. The easiest way to do it is to copy it to your clipboard, run sudo -i && cat > /etc/init.d/vncserver && exit in a terminal, paste it in, and type CTRL-D. Be sure to change the USER variable to whatever user you want the VNC server to run under.
#!/bin/sh -e ### BEGIN INIT INFO # Provides: vncserver # Required-Start: networking # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### 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="<WIDTH>x<HEIGHT>" #GEOMETRY="800x600" GEOMETRY="1024x768" #GEOMETRY="1280x1024" # The name that the VNC Desktop will have. NAME="SIDExBOX-vnc-server" OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" . /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 "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}" su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}" ;; restart) $0 stop $0 start ;; esac exit 0
# Make the script executable with
chmod +x /etc/init.d/vncserver
# Then, run
update-rc.d vncserver defaults
This adds the appropriate symlinks to the vncserver script so that it is sent the start and stop commands at the appropriate time.
Update: jpb writes that you may need to use sudo update-rc.d vncserver 99 instead if the job is running too early in the boot process.
To start the server without rebooting, run sudo /etc/init.d/vncserver start
# L'adresse de connexion depis le viewer VNC est : adresse_ip_serveur:1
# Modifier les droits d'accès sous phpmyadmin
INSERT INTO `mysql`.`user` ( `Host` , `User` , `Password` , `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Reload_priv` , `Shutdown_priv` , `Process_priv` , `File_priv` , `Grant_priv` , `References_priv` , `Index_priv` , `Alter_priv` , `Show_db_priv` , `Super_priv` , `Create_tmp_table_priv` , `Lock_tables_priv` , `Execute_priv` , `Repl_slave_priv` , `Repl_client_priv` , `Create_view_priv` , `Show_view_priv` , `Create_routine_priv` , `Alter_routine_priv` , `Create_user_priv` , `Event_priv` , `Trigger_priv` , `ssl_type` , `max_questions` , `max_updates` , `max_connections` , `max_user_connections` ) VALUES ( '147.99.106.%', 'root', 'le_passwd', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', '', '0', '0', '0', '0' ); INSERT INTO `mysql`.`host` ( `Host` , `Db` , `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Grant_priv` , `References_priv` , `Index_priv` , `Alter_priv` , `Create_tmp_table_priv` , `Lock_tables_priv` , `Create_view_priv` , `Show_view_priv` , `Create_routine_priv` , `Alter_routine_priv` , `Execute_priv` , `Trigger_priv` ) VALUES ( '147.99.99.%', '%', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y' ); INSERT INTO `mysql`.`db` ( `Host` , `Db` , `User` , `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Grant_priv` , `References_priv` , `Index_priv` , `Alter_priv` , `Create_tmp_table_priv` , `Lock_tables_priv` , `Create_view_priv` , `Show_view_priv` , `Create_routine_priv` , `Alter_routine_priv` , `Execute_priv` , `Event_priv` , `Trigger_priv` ) VALUES ( '147.99.99.%', '%', 'root', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y' );
# Modification du fichier /etc/mysql/my.cnf
# # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. # bind-address = 127.0.0.1 # Ecoute sur toutes les interfaces de la machine bind-address = 0.0.0.0 # Pas de tentative de résolution de noms skip-name-resolve #
# Relancer le serveur mysql
/etc/init.d/mysql restart
# Installation de l'interface PHP en ligne de commande pour la supervision du Linutop
wget http://ftp.toulouse.inra.fr/pub/saga/Linutop3/php5-cli_5.3.2-1ubuntu4.7_i386.deb dpkg -i php5-cli_5.3.2-1ubuntu4.7_i386.deb
ou alors
aptitude install php5-cli
# Supprimer les fichiers cache générés par aptitude
aptitude autoclean aptitude clean