Difference between revisions of "Ubuntu"

7,412 bytes added ,  3 months ago
no edit summary
Line 562: Line 562:


<small>[1]-  Killed                  sudo mysqld_safe --skip-grant-tables --skip-networking</small></blockquote>'''Termina il processo MySQL in modalità sicura:'''
<small>[1]-  Killed                  sudo mysqld_safe --skip-grant-tables --skip-networking</small></blockquote>'''Termina il processo MySQL in modalità sicura:'''




Line 585: Line 586:


==== '''Riavvia MySQL in modalità normale''' ====
==== '''Riavvia MySQL in modalità normale''' ====




Line 854: Line 856:
<small>[Sun Jan 05 11:48:56.032352 2025] [core:notice] '''[pid 184298]''' AH00094: Command line: '/usr/sbin/apache2'</small></blockquote>
<small>[Sun Jan 05 11:48:56.032352 2025] [core:notice] '''[pid 184298]''' AH00094: Command line: '/usr/sbin/apache2'</small></blockquote>


= Installazione e configurazione MadiaWiki =
== Scarica la versione 1.43: ==
Usa il comando <code>wget</code> per scaricare la versione indicata:<blockquote><small>parallels@ubuntu-linux-22-04-02-desktop:'''~$ wget <nowiki>https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz</nowiki>'''</small>
<small>--2025-01-05 15:51:19--  <nowiki>https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz</nowiki></small>
<small>Resolving releases.wikimedia.org (releases.wikimedia.org)... 185.15.58.224</small>
<small>Connecting to releases.wikimedia.org (releases.wikimedia.org)|185.15.58.224|:443... connected.</small>
<small>HTTP request sent, awaiting response... 200 OK</small>
<small>Length: 91947888 (88M) [application/x-gzip]</small>
<small>Saving to: ‘mediawiki-1.43.0.tar.gz’</small>
<small>mediawiki-1.43.0.tar.gz                      100%[==============================================================================================>]  87.69M  5.41MB/s    in 18s     </small>
<small>2025-01-05 15:51:37 (4.89 MB/s) - ‘mediawiki-1.43.0.tar.gz’ saved [91947888/91947888]</small></blockquote>'''Estrai l'archivio scaricato''': Questo creerà una directory chiamata <code>'''mediawiki-1.43.0'''</code>.
llels@ubuntu-linux-22-04-02-desktop:'''~$ tar -xvzf mediawiki-1.43.0.tar.gz'''
Sostituisci la directory esistente:<blockquote><small>parallels@ubuntu-linux-22-04-02-desktop:'''~$ sudo mv /var/www/html/mediawiki /var/www/html/mediawiki_old'''</small>
<small>sudo mv mediawiki-1.43.0 /var/www/html/mediawiki</small>
<small>[sudo] password for parallels:</small> </blockquote>'''Verifica i permessi''': Assicurati che Apache possa accedere ai file:
== 2. Configurazione del database ==
'''Verifica la connessione al database''': MediaWiki 1.43 dovrebbe essere compatibile con il database esistente. Accedi al database per verificare:<blockquote><small>parallels@ubuntu-linux-22-04-02-desktop:'''~$ mysql -u root -p'''</small>
<small>Enter password:</small> {{Rosso inizio}}Errore {{Rosso Fine}}
<small>ERROR 1698 (28000): Access denied for user 'root'@'localhost'</small></blockquote>Desccrizione errore e risoluzione {{Tooltip|2={{Tooltip|Errore "Access denied for user 'root'@'localhost"|L'errore si verifica quando MySQL nega l'accesso all'utente <code>root</code>. Cause comuni includono: 1) Autenticazione tramite <code>auth_socket</code>, 2) Password errata, 3) Privilegi insufficienti. Soluzione: Accedi con <code>sudo mysql</code>, cambia il metodo di autenticazione con <code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'nuova_password';</code>, oppure resetta la password avviando MySQL in modalità sicura (<code>mysqld_safe --skip-grant-tables</code>). Verifica sempre i privilegi e riavvia il servizio MySQL.}}}}
Passaggi fondamentali:
parallels@ubuntu-linux-22-04-02-desktop:'''~$ mysql -u root -p'''
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
parallels@ubuntu-linux-22-04-02-desktop:~$ sudo mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.40-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
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.
mysql>
mysql>
mysql> q
    -> ^C
mysql>
mysql> q
    -> parallels@ubuntu-linux-22-04-02-desktop:
    ->
    ->
    ->
    ->
    ->
    ->
    -> q
    -> ^C
mysql>
mysql> ^C
mysql>
mysql> Exit
Bye
parallels@ubuntu-linux-22-04-02-desktop:~$ sudo mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.40-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
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.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Rosa!01011925';
Query OK, 0 rows affected (0.27 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.04 sec)
mysql> EXIT;
Bye
parallels@ubuntu-linux-22-04-02-desktop:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.40-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
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.
mysql> Exit
Bye
parallels@ubuntu-linux-22-04-02-desktop:~$ cd /var/www/html/mediawiki
parallels@ubuntu-linux-22-04-02-desktop:/var/www/html/mediawiki$ ls -l
total 2184
-rwxr-xr-x  1 www-data www-data    1511 Dec  5 16:41 api.php
-rwxr-xr-x  1 www-data www-data  352410 Dec  5 16:42 autoload.php
drwxr-xr-x  2 www-data www-data    4096 Jan  5 15:58 cache
-rwxr-xr-x  1 www-data www-data     168 Dec  5 16:41 CODE_OF_CONDUCT.md
-rwxr-xr-x  1 www-data www-data    8358 Dec  5 16:42 composer.json
-rwxr-xr-x  1 www-data www-data     125 Dec  5 16:41 composer.local.json-sample
-rwxr-xr-x  1 www-data www-data   19421 Dec  5 16:41 COPYING
-rwxr-xr-x  1 www-data www-data   15957 Dec  5 16:42 CREDITS
-rwxr-xr-x  1 www-data www-data    1762 Dec 20 19:45 docker-compose.yml
drwxr-xr-x  5 www-data www-data    4096 Jan  5 15:58 docs
drwxr-xr-x 35 www-data www-data    4096 Jan  5 15:58 extensions
-rwxr-xr-x  1 www-data www-data      95 Dec  5 16:41 FAQ
-rwxr-xr-x  1 www-data www-data 1639880 Dec  5 16:42 HISTORY
drwxr-xr-x  2 www-data www-data    4096 Jan  5 15:58 images
-rwxr-xr-x  1 www-data www-data    2221 Dec  5 16:41 img_auth.php
drwxr-xr-x 96 www-data www-data    4096 Jan  5 15:58 includes
-rwxr-xr-x  1 www-data www-data    2213 Dec  5 16:41 index.php
-rwxr-xr-x  1 www-data www-data    3685 Dec  5 16:42 INSTALL
-rwxr-xr-x  1 www-data www-data    1302 Dec  5 16:41 jsdoc.json
drwxr-xr-x  5 www-data www-data    4096 Jan  5 15:58 languages
-rwxr-xr-x  1 www-data www-data    1464 Dec  5 16:41 load.php
drwxr-xr-x 11 www-data www-data   12288 Jan  5 15:58 maintenance
drwxr-xr-x  4 www-data www-data    4096 Jan  5 15:58 mw-config
-rwxr-xr-x  1 www-data www-data    1761 Dec  5 16:41 opensearch_desc.php
-rwxr-xr-x  1 www-data www-data    1643 Dec  5 16:41 README.md
-rwxr-xr-x  1 www-data www-data   54673 Dec 20 19:45 RELEASE-NOTES-1.43
drwxr-xr-x  5 www-data www-data    4096 Jan  5 15:58 resources
-rwxr-xr-x  1 www-data www-data    1239 Dec  5 16:41 rest.php
-rwxr-xr-x  1 www-data www-data     199 Dec  5 16:41 SECURITY
drwxr-xr-x  6 www-data www-data    4096 Jan  5 15:58 skins
drwxr-xr-x 11 www-data www-data    4096 Jan  5 15:58 tests
-rwxr-xr-x  1 www-data www-data    1659 Dec  5 16:41 thumb_handler.php
-rwxr-xr-x  1 www-data www-data    1357 Dec  5 16:41 thumb.php
-rwxr-xr-x  1 www-data www-data    4394 Dec  5 16:41 UPGRADE
drwxr-xr-x 21 www-data www-data    4096 Jan  5 15:58 vendor


== Controlla la configurazione API di MediaWiki. ==
parallels@ubuntu-linux-22-04-02-desktop:/var/www/html/mediawiki$
'''Configura correttamente le chiavi API nel file <code>LocalSettings.php</code>.'''
Editor, Editors, USER, admin, Bureaucrats, Check users, dev, editor, founder, Interface administrators, member, oversight, Suppressors, Administrators, translator
11,485

edits