diff --git a/frappe/docs/user/en/tutorial/setting-up-the-site.md b/frappe/docs/user/en/tutorial/setting-up-the-site.md index a74d98361a..30f4b86d1f 100755 --- a/frappe/docs/user/en/tutorial/setting-up-the-site.md +++ b/frappe/docs/user/en/tutorial/setting-up-the-site.md @@ -2,7 +2,21 @@ Let us create a new site and call it `library`. -You can install a new site, by the command `bench new-site library` +*Note: Before you create any new site, you need to activate the Barracuda storage engine on your MariaDB installation.* +*Copy the following default ERPNext database settings into your `my.cnf` file.* + + [mysqld] + innodb-file-format=barracuda + innodb-file-per-table=1 + innodb-large-prefix=1 + character-set-client-handshake = FALSE + character-set-server = utf8mb4 + collation-server = utf8mb4_unicode_ci + + [mysql] + default-character-set = utf8mb4 + +You can then install a new site, by the command `bench new-site library`. This will create a new database and site folder and install `frappe` (which is also an application!) in the new site. The `frappe` application has two built-in modules **Core** and **Website**. The Core module contains the basic models for the application. Frappe is a batteries included framework and comes with a lot of built-in models. These models are called **DocTypes**. More on that later. diff --git a/frappe/docs/user/fr/tutorial/setting-up-the-site.md b/frappe/docs/user/fr/tutorial/setting-up-the-site.md index 985e124e0a..11b7aad611 100644 --- a/frappe/docs/user/fr/tutorial/setting-up-the-site.md +++ b/frappe/docs/user/fr/tutorial/setting-up-the-site.md @@ -2,6 +2,21 @@ Créons un site et appelons le `library`. +*Remarque: Avant de créer un nouveau site, vous devez activer le moteur de stockage Barracuda sur votre installation MariaDB.* +*Copiez les paramètres de base de données ERPNext par défaut suivants dans votre fichier `my.cnf`.* + + [mysqld] + innodb-file-format=barracuda + innodb-file-per-table=1 + innodb-large-prefix=1 + character-set-client-handshake = FALSE + character-set-server = utf8mb4 + collation-server = utf8mb4_unicode_ci + + [mysql] + default-character-set = utf8mb4 + + Vous pouvez installer un nouveau site avec la commande `bench new-site library` Cette commande va créer une nouvelle base de données, un repertoire et installer `frappe` (qui est aussi une application!) diff --git a/frappe/docs/user/pt/tutorial/setting-up-the-site.md b/frappe/docs/user/pt/tutorial/setting-up-the-site.md index 5ab07fa01b..90f499c9c7 100755 --- a/frappe/docs/user/pt/tutorial/setting-up-the-site.md +++ b/frappe/docs/user/pt/tutorial/setting-up-the-site.md @@ -2,6 +2,21 @@ Vamos criar um novo site e chamá-lo de `library`. +*Nota: Antes de criar um novo site, é necessário ativar o mecanismo de armazenamento Barracuda na instalação do MariaDB.* +*Copie as seguintes configurações de banco de dados ERPNext padrão para o arquivo `my.cnf`.* + + [mysqld] + innodb-file-format=barracuda + innodb-file-per-table=1 + innodb-large-prefix=1 + character-set-client-handshake = FALSE + character-set-server = utf8mb4 + collation-server = utf8mb4_unicode_ci + + [mysql] + default-character-set = utf8mb4 + + Você pode instalar um novo site, pelo comando `bench new-site library` Isto irá criar uma nova pasta para o site e um banco de dados e instalar o `frappe` (que também é uma aplicação!) No novo site. A aplicação `frappe` tem dois módulos embutidos **Core** e **WebSite**. O módulo de Core contém os modelos básicos para a aplicação. Frappe é uma estrutura como as pilhas e vem com um monte de modelos internos. Estes modelos são chamados doctypes **Mais sobre isso mais tarde**. diff --git a/frappe/installer.py b/frappe/installer.py index 22e38d476b..3a14067156 100755 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -356,14 +356,25 @@ def check_if_ready_for_barracuda(): }.items(): if mariadb_variables.get(key) != value: - print "="*80 - print "Please add this to MariaDB's my.cnf and restart MariaDB before proceeding" - print - print expected_config_for_barracuda - print "="*80 + site = frappe.local.site + msg = ("Creation of your site - {x} failed because MariaDB is not properly {sep}" + "configured to use the Barracuda storage engine. {sep}" + "Please add the settings below to MariaDB's my.cnf, restart MariaDB then {sep}" + "run `bench new-site site17.local` again.{sep2}" + "").format(x=site, sep2="\n"*2, sep="\n") + + print_db_config(msg, expected_config_for_barracuda) sys.exit(1) # raise Exception, "MariaDB needs to be configured!" + +def print_db_config(explanation, config_text): + print ("="*80) + print (explanation) + print (config_text) + print ("="*80) + + def extract_sql_gzip(sql_gz_path): try: subprocess.check_call(['gzip', '-d', '-v', '-f', sql_gz_path])