Outils pour utilisateurs

Outils du site


bocal:webdev

Le wiki du bocal

  • Depuis le bocal

http://www.bocal.cs.univ-paris8.fr/dokuwiki/doku.php?id=bocal:webdev

  • Depuis l'extérieur

http://www.cs.univ-paris8.fr/dokuwiki/doku.php?id=bocal:webdev

Recherche google : paris8 bocal dokuwiki

APACHE

sudo apt-get install apache2 apache2-utils
dpkg -l '*apache2*'|grep ii
ii  apache2                            2.4.7-1ubuntu1                   amd64
     Apache HTTP Server
ii  apache2-bin                        2.4.7-1ubuntu1                   amd64
     Apache HTTP Server (binary files and modules)
ii  apache2-data                       2.4.7-1ubuntu1                   all
     Apache HTTP Server (common files)
ii  apache2-utils                      2.4.7-1ubuntu1                   amd64
     Apache HTTP Server (utility programs for web servers)

PHP5

sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysqlnd php5-mcrypt
sudo apt-get install php5-gd
dpkg -l '*php5*'|grep ii

ii  libapache2-mod-php5                5.5.8+dfsg-2ubuntu1              amd64
     server-side, HTML-embedded scripting language (Apache 2 module)
ii  php5-cli                           5.5.8+dfsg-2ubuntu1              amd64
     command-line interpreter for the php5 scripting language
ii  php5-common                        5.5.8+dfsg-2ubuntu1              amd64
     Common files for packages built from the php5 source
ii  php5-gd                            5.5.8+dfsg-2ubuntu1              amd64
     GD module for php5
ii  php5-json                          1.3.2-2                          amd64
     JSON module for php5
ii  php5-mcrypt                        5.4.6-0ubuntu3                   amd64
     MCrypt module for php5
ii  php5-mysqlnd                       5.5.8+dfsg-2ubuntu1              amd64
     MySQL module for php5 (Native Driver)
ii  php5-readline                      5.5.8+dfsg-2ubuntu1              amd64
     Readline module for php5
  • Activation du module userdir
sudo a2enmod userdir
  • /etc/apache2/mods-enabled/php5.conf
     18 # Running PHP scripts in user directories is disabled by default
     19 #
     20 # To re-enable PHP in user directories comment the following lines
     21 # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
     22 # prevents .htaccess files from disabling it.
     23 <IfModule mod_userdir.c>
     24     <Directory /home/*/public_html>
     25         php_admin_value engine Off
     26     </Directory>
     27 </IfModule>
  • Commenter le bloc IfModule
     18 # Running PHP scripts in user directories is disabled by default
     19 #
     20 # To re-enable PHP in user directories comment the following lines
     21 # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
     22 # prevents .htaccess files from disabling it.
     23 #<IfModule mod_userdir.c>
     24 #    <Directory /home/*/public_html>
     25 #        php_admin_value engine Off
     26 #    </Directory>
     27 #</IfModule>
  • Redémarrer apache
sudo service apache2 restart
  • Pour supprimer le message d'erreur : ajouter à la fin de /etc/apache2/apache2.conf
ServerName localhost

MYSQL

sudo apt-get install mysql-server-5.5
dpkg -l '*mysql*'|grep ii

ii  libdbd-mysql-perl                  4.025-1                          amd64
     Perl5 database interface to the MySQL database
ii  libmysqlclient18:amd64             5.5.35-0ubuntu1                  amd64
     MySQL database client library
ii  mysql-client-5.5                   5.5.35-0ubuntu1                  amd64
     MySQL database client binaries
ii  mysql-client-core-5.5              5.5.35-0ubuntu1                  amd64
     MySQL database core client binaries
ii  mysql-common                       5.5.35-0ubuntu1                  all
     MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server-5.5                   5.5.35-0ubuntu1                  amd64
     MySQL database server binaries and system database setup
ii  mysql-server-core-5.5              5.5.35-0ubuntu1                  amd64
     MySQL database server binaries
ii  php5-mysqlnd                       5.5.8+dfsg-2ubuntu1              amd64
     MySQL module for php5 (Native Driver)
  • Se connecter avec le compte root
mysql -u root -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.35-0ubuntu1 (Ubuntu)

Copyright (c) 2000, 2013, 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.
  • Création d'un compte administrateur de base Mysql
mysql> grant all privileges on *.* to '????'@'localhost' identified by 'xxxxx'
with grant option;
Query OK, 0 rows affected (0.00 sec)
  • Création d'une base Mysql
mysql> create database nom_de_la_base;
Query OK, 1 row affected (0.00 sec)
  • Mettre les permissions sur cette base uniquement
mysql> grant all privileges on nom_de_la_base.* to 'nouvel_utilisateur'@'localhost' identified by 'nouveaumotdepasse';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

PHPMYADMIN

sudo apt-get install phpmyadmin

Ajouter dans le fichier /etc/apache2/apache2.conf la ligne ci-dessous :

 Include /etc/phpmyadmin/apache.conf

Relancer le service apache2 avec cette commande

 sudo service apache2 restart 
http://localhost/phpmyadmin
bocal/webdev.txt · Dernière modification: 2015/01/16 14:06 par admin