Readme change
This commit is contained in:
15
README.md
15
README.md
@@ -29,7 +29,7 @@ sudo apt install -y composer php-cli curl php-mysql php-curl php-mbstring php-xm
|
|||||||
3. **Installa le dipendenze del pannello d'amministrazione**
|
3. **Installa le dipendenze del pannello d'amministrazione**
|
||||||
- Debian:
|
- Debian:
|
||||||
```bash
|
```bash
|
||||||
cd /var/www/orario/admin
|
cd /var/www/html/admin
|
||||||
composer install
|
composer install
|
||||||
```
|
```
|
||||||
- Windows (con XAMPP):
|
- Windows (con XAMPP):
|
||||||
@@ -40,26 +40,31 @@ composer install
|
|||||||
4. **(opzionale) Genera una password hashata**
|
4. **(opzionale) Genera una password hashata**
|
||||||
- Debian
|
- Debian
|
||||||
```bash
|
```bash
|
||||||
cd /var/www/orario/utils
|
cd orario/utils
|
||||||
php generate_hash.php <password>
|
php generate_hash.php <password>
|
||||||
```
|
```
|
||||||
- Windows:
|
- Windows:
|
||||||
```batch
|
```batch
|
||||||
cd C:\xampp\htdocs\utils
|
cd orario\utils
|
||||||
C:\xampp\php\php.exe generate_hash.php <password>
|
C:\xampp\php\php.exe generate_hash.php <password>
|
||||||
```
|
```
|
||||||
- Modifica quindi questa linea nel file ``schema.sql``, sostituendo l'hash predefinito con quello generato prima:
|
- Modifica quindi questa linea nel file ``schema.sql``, sostituendo l'hash predefinito con quello generato prima:
|
||||||
```sql
|
```sql
|
||||||
VALUES ('admin', '$2y$10$IS9v8CJNJnRXslV1NWDSquAjJ0GgU1sm6spBmGp6mjTLiNApfGcQi');
|
VALUES ('admin', '$2y$10$IS9v8CJNJnRXslV1NWDSquAjJ0GgU1sm6spBmGp6mjTLiNApfGcQi');
|
||||||
```
|
```
|
||||||
5. **Importa il file ``schema.sql`` nel tuo database MySQL**
|
5. **Importa il file ``schema.sql`` nel tuo database MySQL**
|
||||||
|
- Esempio Debian:
|
||||||
|
```bash
|
||||||
|
mysql -u root -p < orario/schema.sql
|
||||||
|
```
|
||||||
|
|
||||||
6. **Modifica il file ``config/config.php`` inserendo i valori richiesti**
|
6. **Modifica il file ``config/config.php`` inserendo i valori richiesti**
|
||||||
- Esempio file ``config/config.php``:
|
- Esempio file ``config/config.php``:
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
// Impostazioni Database
|
// Impostazioni Database
|
||||||
if (!defined('DB_HOST')) {
|
if (!defined('DB_HOST')) {
|
||||||
define('DB_HOST', 'db'); // Host del database (ad esempio localhost)
|
define('DB_HOST', 'localhost'); // Host del database (ad esempio localhost)
|
||||||
}
|
}
|
||||||
if (!defined('DB_USER')) {
|
if (!defined('DB_USER')) {
|
||||||
define('DB_USER', 'orario'); // Utente del database (ad esempio orario)
|
define('DB_USER', 'orario'); // Utente del database (ad esempio orario)
|
||||||
|
|||||||
Reference in New Issue
Block a user