issue64:tutowebdev
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue64:tutowebdev [2012/09/13 23:00] – créée fredphil91 | issue64:tutowebdev [2012/10/07 21:41] (Version actuelle) – fredphil91 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ** | ||
Last month, we installed Apache2 and did a little bit of configuration. This month we will be installing and configuring MySQL, PHP, and CouchDB. MySQL is a relational database, and CouchDB is a non-relational database. We will get familiar with both types of databases over the life of this article. PHP is a server-side language that allows us to do all sorts of amazing things. | Last month, we installed Apache2 and did a little bit of configuration. This month we will be installing and configuring MySQL, PHP, and CouchDB. MySQL is a relational database, and CouchDB is a non-relational database. We will get familiar with both types of databases over the life of this article. PHP is a server-side language that allows us to do all sorts of amazing things. | ||
Ligne 8: | Ligne 9: | ||
sudo apt-get install couchdb | sudo apt-get install couchdb | ||
+ | ** | ||
+ | Le mois dernier, nous avons installé Apache2 et fait un peu de configuration. Ce mois-ci, nous allons installer et configurer MySQL, PHP et CouchDB. MySQL est une base de données relationnelle et CouchDB est une base de données non relationnelle. Nous allons nous familiariser avec les deux types de bases de données tout au long de cet article. PHP est un langage côté serveur qui nous permet de faire toutes sortes de choses étonnantes. | ||
+ | |||
+ | CouchDB est le point de départ de cet article. Même s'il ne fait pas traditionnellement partie du groupe LAMP, l' | ||
+ | |||
+ | sudo apt-get update | ||
+ | |||
+ | sudo apt-get upgrade | ||
+ | |||
+ | sudo apt-get install couchdb | ||
+ | |||
+ | ** | ||
Yes, it really is that simple to install a lot of things. The next installation is just as easy, and it prompts you only to set a “root” password. Please note, that just because it says root password, this is not referring to the server’s root password. Make a note of this password, as this will identify the user with the ultimate power in the databases. Ok, let’s get to the installing: | Yes, it really is that simple to install a lot of things. The next installation is just as easy, and it prompts you only to set a “root” password. Please note, that just because it says root password, this is not referring to the server’s root password. Make a note of this password, as this will identify the user with the ultimate power in the databases. Ok, let’s get to the installing: | ||
Ligne 14: | Ligne 27: | ||
The next part asks you a few questions regarding the security of your database. I suggest answering with “Y” to all of them. The question specifically asks about remote access with the root user. This disallows any access to MySQL unless you are on the same server (SSH to the server, and then logging in is still allowed in this scenario). | The next part asks you a few questions regarding the security of your database. I suggest answering with “Y” to all of them. The question specifically asks about remote access with the root user. This disallows any access to MySQL unless you are on the same server (SSH to the server, and then logging in is still allowed in this scenario). | ||
+ | ** | ||
+ | |||
+ | Oui, c'est vraiment aussi simple d' | ||
+ | |||
+ | sudo apt-get install mysql-server | ||
+ | |||
+ | La partie suivante vous pose quelques questions sur la sécurité de votre base de données. Je suggère de répondre « Y » (yes) pour chacune d' | ||
+ | ** | ||
mysql_secure_installation | mysql_secure_installation | ||
Ligne 34: | Ligne 55: | ||
mysql> | mysql> | ||
+ | ** | ||
+ | mysql_secure_installation | ||
+ | |||
+ | Maintenant que l' | ||
+ | |||
+ | aliendev@server: | ||
+ | Enter password: | ||
+ | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
+ | Your MySQL connection id is 310 | ||
+ | Server version: 5.1.61-0ubuntu0.10.10.1 (Ubuntu) | ||
+ | |||
+ | Copyright (c) 2000, 2011, 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 ' | ||
+ | |||
+ | mysql> | ||
+ | |||
+ | ** | ||
We are almost done, with just one last thing to get set-up. PHP5 is a widely used server-side language that will help you in the long run (even if you don’t use it). To install it is very simple: | We are almost done, with just one last thing to get set-up. PHP5 is a widely used server-side language that will help you in the long run (even if you don’t use it). To install it is very simple: | ||
Ligne 54: | Ligne 97: | ||
register_globals = Off | register_globals = Off | ||
+ | ** | ||
+ | Nous avons presque terminé, avec juste une dernière chose à mettre en place. PHP5 est un langage largement utilisé côté serveur qui vous aidera dans le long terme (même si vous ne l' | ||
+ | |||
+ | sudo apt-get install php5 php-pear | ||
+ | |||
+ | Pour aller plus loin, vous vous assurerez que les valeurs suivantes sont définies dans le php.ini (fichier de configuration de PHP) et que les lignes concernées ne sont pas commentées (les lignes commentées commencent par un point-virgule et, pour les dé-commenter, | ||
+ | |||
+ | max_execution_time = 30 | ||
+ | |||
+ | memory_limit = 64M | ||
+ | |||
+ | error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR | ||
+ | |||
+ | display_errors = Off | ||
+ | |||
+ | log_errors = On | ||
+ | |||
+ | error_log = / | ||
+ | |||
+ | register_globals = Off | ||
+ | |||
+ | ** | ||
Any time you make changes to the php.ini file, you will need to restart Apache. You can do this simply by using one of the following commands: | Any time you make changes to the php.ini file, you will need to restart Apache. You can do this simply by using one of the following commands: | ||
Ligne 64: | Ligne 129: | ||
sudo apt-get install php5-mysql php5-suhosin | sudo apt-get install php5-mysql php5-suhosin | ||
- | |||
sudo service apache2 restart | sudo service apache2 restart | ||
Congratulations, | Congratulations, | ||
+ | ** | ||
+ | |||
+ | À chaque fois que vous apporterez des modifications au fichier php.ini, vous devrez redémarrer Apache. C'est très simple, il suffit d' | ||
+ | |||
+ | sudo / | ||
+ | |||
+ | sudo service apache2 restart | ||
+ | |||
+ | La dernière chose que nous allons faire est d' | ||
+ | |||
+ | sudo apt-get install php5-mysql php5-suhosin | ||
+ | |||
+ | sudo service apache2 restart | ||
+ | |||
+ | Félicitations, | ||
issue64/tutowebdev.1347570036.txt.gz · Dernière modification : 2012/09/13 23:00 de fredphil91