{"id":18475,"date":"2026-07-14T23:33:00","date_gmt":"2026-07-14T21:33:00","guid":{"rendered":"https:\/\/www.beseit.net\/?p=18475"},"modified":"2026-09-04T20:25:41","modified_gmt":"2026-09-04T18:25:41","slug":"aplicacions-installades-no-disponibles-a-servidor-de-deepin","status":"publish","type":"post","link":"https:\/\/www.beseit.net\/?p=18475","title":{"rendered":"\u2b50 Aplicacions instal\u00b7lades no disponibles en servidor de Deepin"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f11515\" class=\"has-inline-color\">Firefox<\/mark><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Aqu\u00ed tens el <strong>resum dels 5 passos<\/strong> que vam seguir per instal\u00b7lar Firefox 152.0.5 des de <code>~\/Downloads\/firefox-152.0.5.tar.xz<\/code>:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Extreure el fitxer<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd ~\/Downloads\ntar -xf firefox-152.0.5.tar.xz<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Moure la carpeta a <code>\/opt<\/code><\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo mv firefox \/opt\/firefox-152<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Crear enlla\u00e7 simb\u00f2lic al terminal<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ln -sf \/opt\/firefox-152\/firefox \/usr\/local\/bin\/firefox<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Crear l&#8217;acc\u00e9s directe al men\u00fa d&#8217;aplicacions<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <code>~\/.local\/share\/applications\/firefox.desktop<\/code> amb les dades necess\u00e0ries (nom, icona, executable, etc.).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>Configurar el catal\u00e0<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Des de <code>about:preferences<\/code> \u2192 <strong>General<\/strong> \u2192 <strong>Idioma<\/strong>, afegir <strong>Catal\u00e0<\/strong> com a idioma preferit.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Resultat:<\/strong> \u2705 Firefox 152.0.5 instal\u00b7lat, funcional des del men\u00fa d&#8217;aplicacions i des del terminal.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fe1111\" class=\"has-inline-color\">Visual Studio Code<\/mark><\/strong><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"112\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-19.png\" alt=\"\" class=\"wp-image-18722\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-19.png 350w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-19-300x96.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f50a0a\" class=\"has-inline-color\">VLC<\/mark><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"242\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-22.png\" alt=\"\" class=\"wp-image-18820\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-22.png 516w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-22-300x141.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-22-500x234.png 500w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f00505\" class=\"has-inline-color\">LibreOffice<\/mark><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">com vull instal\u00b7lar la versi\u00f3 catalana <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Enlla\u00e7os r\u00e0pits<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f50a0a\" class=\"has-inline-color\">Synology assistant<\/mark><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Pas 1: Instal\u00b7lar el Synology Assistant<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f00505\" class=\"has-inline-color\">flatpak install flathub com.synology.SynologyAssistant<\/mark><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pas <\/strong>2: Executar l&#8217;aplicaci\u00f3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Un cop instal\u00b7lat, pots obrir-lo de dues maneres:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Des de la terminal:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">flatpak run com.synology.SynologyAssistant<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f51414\" class=\"has-inline-color\">qBittorrent<\/mark><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"573\" height=\"320\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-23.png\" alt=\"\" class=\"wp-image-18822\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-23.png 573w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-23-300x168.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-23-500x279.png 500w\" sizes=\"auto, (max-width: 573px) 100vw, 573px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f90202\" class=\"has-inline-color\">Calibre<\/mark><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Restablir TOT Calibre als valors per defecte<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Si vols restablir <strong>tota la configuraci\u00f3 de Calibre<\/strong>, executa al terminal:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Tanca Calibre primer!\nmv ~\/.config\/calibre ~\/.config\/calibre.backup<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong> Instal\u00b7lador oficial de Calibre (RECOMANAT)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Aquesta \u00e9s la manera oficial que recomana el propi Calibre. Obre el terminal i executa:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo -v &amp;&amp; wget -nv -O- https:\/\/download.calibre-ebook.com\/linux-installer.sh | sudo sh \/dev\/stdin<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Qu\u00e8 fa aquesta comanda?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>sudo -v<\/code>: demana la contrasenya d&#8217;administrador<\/li>\n\n\n\n<li><code>wget<\/code>: descarrega l&#8217;script oficial d&#8217;instal\u00b7laci\u00f3<\/li>\n\n\n\n<li><code>sudo sh \/dev\/stdin<\/code>: l&#8217;executa amb permisos de root<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Un cop acabi, podr\u00e0s obrir Calibre des del men\u00fa d&#8217;aplicacions o escrivint <code>calibre<\/code> al terminal.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Desinstal\u00b7lar calibre<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt remove calibre<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Visual Vode<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Synology Assistan<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">backup_mut<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">correu electronic<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Llibre d&#8217;0ffice<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f21515\" class=\"has-inline-color\">Backup_mut<\/mark><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Posar a l&#8217;escriptori backup_mut.txt . Aplicar aquesta comanda:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo cp \/home\/Miquel\/Desktop\/backup_mut-ok.txt \/usr\/local\/bin\/backup_mut<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">amb <mark style=\"background-color:rgba(0, 0, 0, 0);color:#f10303\" class=\"has-inline-color\">lsblk<\/mark> podem veure la estructura i les particions del sistema Deepin<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"390\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-16.png\" alt=\"\" class=\"wp-image-18698\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-16.png 519w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-16-300x225.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-16-399x300.png 399w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Clar, aqu\u00ed tens una descripci\u00f3 detallada de l&#8217;estructura de particions del teu sistema Deepin basant-me en la sortida de <code>lsblk<\/code>:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Disc <code>sda<\/code> \u2013 476,9 GB (disc principal)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u00c9s el disc intern del sistema on hi ha Deepin instal\u00b7lat.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sda1<\/strong> \u2013 100 MB \u2192 <code>\/boot\/efi<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Partici\u00f3 <strong>EFI System Partition (ESP)<\/strong>. Cont\u00e9 el carregador d&#8217;arrencada (bootloader) en format UEFI. \u00c9s essencial per a l&#8217;inici del sistema.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sda2<\/strong> \u2013 16 MB<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Partici\u00f3 <strong>Microsoft Reserved Partition (MSR)<\/strong>. Reservada per Windows per a metadades internes. No t\u00e9 punt de muntatge.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sda3<\/strong> \u2013 346,4 GB \u2192 <code>\/media\/Miquel\/windows<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Partici\u00f3 principal de <strong>Windows<\/strong> (probablement C:). Muntada en modo lectura\/escriptura des de Deepin, la tens acc\u00e9s a <code>\/media\/Miquel\/windows<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sda4<\/strong> \u2013 1,2 GB<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Partici\u00f3 de <strong>recuperaci\u00f3 de Windows<\/strong> (WinRE). Cont\u00e9 eines per restaurar Windows en cas de fallada. No t\u00e9 punt de muntatge actiu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sda5<\/strong> \u2013 129,3 GB \u2192 <code>\/var<\/code>, <code>\/persistent\/ostree<\/code>, <code>\/ostree<\/code>, <code>\/sysroot\/ostree<\/code>, <code>\/sysroot<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Partici\u00f3 principal de <strong>Deepin<\/strong> (basada en <strong>OSTree<\/strong>). Aix\u00f2 \u00e9s t\u00edpic de Deepin V23 o versions amb sistema immutable\/atomic.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>\/var<\/code><\/strong>: Dades variables del sistema (logs, bases de dades, spool, etc.)<\/li>\n\n\n\n<li><strong><code>\/ostree<\/code> i <code>\/persistent\/ostree<\/code><\/strong>: Sistema de desplegament <strong>OSTree<\/strong> (similar a una actualitzaci\u00f3 at\u00f2mica).<\/li>\n\n\n\n<li><strong><code>\/sysroot<\/code> i <code>\/sysroot\/ostree<\/code><\/strong>: Arrel del sistema operatiu (root filesystem).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Disc <code>sdb<\/code> \u2013 57,7 GB (disc extern o USB)<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sdb1<\/strong> \u2013 57,7 GB \u2192 <code>\/media\/Miquel\/backup<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Dispositiu extra\u00efble<\/strong> (la columna <code>RM<\/code> = 1 indica que \u00e9s extra\u00efble). Cont\u00e9 una \u00fanica partici\u00f3 amb tot l&#8217;espai, muntada com a c\u00f2pia de seguretat (<code>backup<\/code>).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Resum visual<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sda (476,9 GB) \u2500\u2500 Disc intern\n\u251c\u2500 sda1 (100 MB)  \u2192 \/boot\/efi          \u2192 Arrencada UEFI\n\u251c\u2500 sda2 (16 MB)   \u2192                     \u2192 Reserva MSR (Windows)\n\u251c\u2500 sda3 (346,4 GB)\u2192 \/media\/Miquel\/windows \u2192 Windows\n\u251c\u2500 sda4 (1,2 GB)  \u2192                     \u2192 Recuperaci\u00f3 Windows\n\u2514\u2500 sda5 (129,3 GB)\u2192 \/var, \/ostree...   \u2192 Deepin (sistema OSTree)\n\nsdb (57,7 GB)  \u2500\u2500 Disc extra\u00efble\n\u2514\u2500 sdb1 (57,7 GB)\u2192 \/media\/Miquel\/backup  \u2192 C\u00f2pia de seguretat<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Tens un <strong>sistema dual (Deepin + Windows)<\/strong> en el mateix disc, amb Deepin muntat sobre una estructura OSTree (sistema at\u00f2mic\/immutable) i un disc extern dedicat a c\u00f2pies de seguretat.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"387\" height=\"337\" src=\"http:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-17.png\" alt=\"\" class=\"wp-image-18702\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-17.png 387w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-17-300x261.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-17-345x300.png 345w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"253\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-18.png\" alt=\"\" class=\"wp-image-18706\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-18.png 495w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-18-300x153.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Fem un llistat de backup mut<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ cat -n \/usr\/local\/bin\/backup_mut\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#!\/bin\/bash\n# Indica al sistema que aquest fitxer s'ha d'executar amb l'int\u00e8rpret Bash.\n\n# ==========================================\n# 1. CONFIGURACI\u00d3 INICIAL I COLORS\n# ==========================================\n\nVERMELL='\\033[0;31m'\nVERD='\\033[0;32m'\nGROC='\\033[1;33m'\nBLAU='\\033[0;34m'\nNC='\\033[0m'\n\n# Opcions base de rsync; s'hi afegeixen flags segons el sistema de fitxers del dest\u00ed\nRSYNC_OPTS=\"-avh --progress\"\n\nclear\n\n# ==========================================\n# 2. FUNCIONS DE DETECCI\u00d3 I MUNTATGE DE DISCS\n# ==========================================\n\n# disc_sistema: nom del disc f\u00edsic on viu el Deepin (ex: \"sda\").\ndisc_sistema() {\n    local arrel\n    arrel=$(findmnt -n -o SOURCE \/ 2>\/dev\/null)\n    lsblk -ndo PKNAME \"$arrel\" 2>\/dev\/null | head -n 1\n}\n\n# detecta_discos: omple els vectors amb les particions (o discs sencers amb\n# sistema de fitxers propi) de tots els discs que NO siguin el del sistema.\ndetecta_discos() {\n    local sys part tipus disc mp mida label fst\n\n    sys=$(disc_sistema)\n\n    DISC_NOM=(); DISC_MIDA=(); DISC_ETIQUETA=(); DISC_MUNTATGE=(); DISC_MUNTAT=()\n    NUM_DISCS=0\n\n    while read -r part tipus; do\n        if [ \"$tipus\" == \"disk\" ]; then\n            disc=$(basename \"$part\")\n        else\n            disc=$(lsblk -ndo PKNAME \"$part\" 2>\/dev\/null | head -n 1)\n        fi\n\n        mp=$(lsblk -ndo MOUNTPOINT \"$part\" 2>\/dev\/null | head -n 1)\n        fst=$(lsblk -ndo FSTYPE \"$part\"    2>\/dev\/null | head -n 1)\n\n        # Mai el disc f\u00edsic on viu el Deepin (ni les seves particions)\n        [ \"$disc\" == \"$sys\" ] &amp;&amp; continue\n        # Descarta dispositius sense sistema de fitxers \u00fatil\n        case \"$fst\" in\n            \"\"|swap|crypto_LUKS) continue ;;\n        esac\n        # Descarta punts de muntatge propis del sistema operatiu\n        case \"$mp\" in\n            \/|\/boot|\/boot\/efi|\/efi) continue ;;\n        esac\n\n        mida=$(lsblk -ndo SIZE \"$part\"  2>\/dev\/null | head -n 1)\n        label=$(lsblk -ndo LABEL \"$part\" 2>\/dev\/null | head -n 1)\n\n        NUM_DISCS=$((NUM_DISCS + 1))\n        DISC_NOM[NUM_DISCS]=\"$part\"\n        DISC_MIDA[NUM_DISCS]=\"$mida\"\n        DISC_ETIQUETA[NUM_DISCS]=\"${label:-sense etiqueta}\"\n        DISC_MUNTATGE[NUM_DISCS]=\"$mp\"\n        if [ -n \"$mp\" ]; then\n            DISC_MUNTAT[NUM_DISCS]=\"si\"\n        else\n            DISC_MUNTAT[NUM_DISCS]=\"no\"\n        fi\n    done &lt; &lt;(lsblk -nlp -o NAME,TYPE 2>\/dev\/null | awk '$2 == \"part\" || $2 == \"disk\" {print $1, $2}')\n}\n\n# munta_disc &lt;\u00edndex>: monta la unitat amb udisksctl si cal (no cal sudo).\nmunta_disc() {\n    local idx=\"$1\" mp\n    [ \"${DISC_MUNTAT[$idx]}\" == \"si\" ] &amp;&amp; return 0\n\n    if ! command -v udisksctl >\/dev\/null 2>&amp;1; then\n        echo -e \"${VERMELL}udisksctl no disponible. Monta el disc des del gestor de fitxers.${NC}\"\n        return 1\n    fi\n\n    echo -e \"${BLAU}Muntant ${DISC_NOM[$idx]}...${NC}\"\n    udisksctl mount -b \"${DISC_NOM[$idx]}\" >\/dev\/null 2>&amp;1\n    mp=$(lsblk -ndo MOUNTPOINT \"${DISC_NOM[$idx]}\" 2>\/dev\/null | head -n 1)\n\n    if [ -n \"$mp\" ]; then\n        DISC_MUNTATGE[$idx]=\"$mp\"\n        DISC_MUNTAT[$idx]=\"si\"\n        echo -e \"${VERD}\u2713 Muntat a: $mp${NC}\"\n        return 0\n    else\n        echo -e \"${VERMELL}No s'ha pogut muntar ${DISC_NOM[$idx]}.${NC}\"\n        echo \"Monta'l des del gestor de fitxers i torna-ho a provar.\"\n        return 1\n    fi\n}\n\n# mostra_discos: llistat numerat d'unitats + estat de muntatge.\nmostra_discos() {\n    local i estat\n    if [ \"$NUM_DISCS\" -eq 0 ]; then\n        echo -e \"  ${VERMELL}(cap)${NC} No s'ha detectat cap USB ni disc extern\/intern.\"\n    else\n        for i in $(seq 1 \"$NUM_DISCS\"); do\n            if [ \"${DISC_MUNTAT[$i]}\" == \"si\" ]; then\n                estat=\"${VERD}muntat a ${DISC_MUNTATGE[$i]}${NC}\"\n            else\n                estat=\"${GROC}no muntat (es muntar\u00e0 en triar-lo)${NC}\"\n            fi\n            echo -e \"  ${VERD}$i${NC}) ${DISC_ETIQUETA[$i]} ${BLAU}[${DISC_NOM[$i]}, ${DISC_MIDA[$i]}]${NC} - $estat\"\n        done\n    fi\n}\n\n# rsync_compat &lt;dispositiu>: adapta les opcions de rsync al sistema de fitxers:\n#  - ext4\/btrfs\/xfs: hardlinks (-H) I permisos\/propietaris (clau per a ostree).\n#  - ntfs: hardlinks s\u00ed, sense permisos Linux.\n#  - exfat\/vfat: ni hardlinks ni permisos.\nrsync_compat() {\n    local fst\n    fst=$(lsblk -ndo FSTYPE \"$1\" 2>\/dev\/null | head -n 1)\n    case \"$fst\" in\n        ext2|ext3|ext4|btrfs|xfs) echo \" -H\" ;;\n        ntfs)                     echo \" -H --no-perms --no-owner --no-group\" ;;\n        *)                        echo \" --no-perms --no-owner --no-group\" ;;\n    esac\n}\n\n# ajusta_rsync &lt;ruta_desti>: determina el dispositiu de dest\u00ed i afegeix els\n# flags adequats a RSYNC_OPTS.\najusta_rsync() {\n    local ruta=\"$1\" i disc_desti=\"\"\n    for i in $(seq 1 \"$NUM_DISCS\"); do\n        case \"$ruta\" in\n            \"${DISC_MUNTATGE[$i]}\"*) disc_desti=\"${DISC_NOM[$i]}\"; break ;;\n        esac\n    done\n    RSYNC_OPTS=\"${RSYNC_OPTS}$(rsync_compat \"$disc_desti\")\"\n}\n\n# ==========================================\n# 3. MEN\u00da PRINCIPAL\n# ==========================================\necho -e \"${VERD}========================================${NC}\"\necho -e \"${VERD}   BACKUP_MUT - BACKUP I RESTAURACI\u00d3    ${NC}\"\necho -e \"${VERD}========================================${NC}\"\necho \"\"\necho \"1) Fer c\u00f2pia de seguretat (backup)\"\necho \"2) Restaurar c\u00f2pia de seguretat\"\necho \"3) Sortir\"\necho \"\"\n\nread -p \"Tria una opci\u00f3 [1-3]: \" opcio\n\n# ==========================================\n# 4. L\u00d2GICA DE DECISI\u00d3 (CASE)\n# ==========================================\ncase $opcio in\n    1) # --- OPCI\u00d3 1: FER BACKUP ---\n        echo \"\"\n        echo -e \"${GROC}--- MODE BACKUP ---${NC}\"\n\n        detecta_discos\n        echo \"\"\n        echo -e \"${BLAU}Unitats disponibles on guardar el backup:${NC}\"\n        mostra_discos\n        echo \"\"\n\n        # Arbre visual de tots els discs i particions del sistema\n        DISC_SYS=$(disc_sistema)\n        echo -e \"${BLAU}\ud83d\uddfa\ufe0f  Mapa de discs del sistema (el disc '${DISC_SYS}' \u00e9s el del Deepin i queda excl\u00f2s):${NC}\"\n        lsblk -o NAME,SIZE,TYPE,PKNAME,LABEL,MOUNTPOINT\n        echo \"\"\n\n        if [ \"$NUM_DISCS\" -eq 0 ]; then\n            echo -e \"${GROC}PKNAME \u00e9s el disc f\u00edsic 'pare'. Si tots els volums tenen el${NC}\"\n            echo -e \"${GROC}mateix PKNAME que el sistema, s\u00f3n particions del mateix disc${NC}\"\n            echo -e \"${GROC}f\u00edsic i queden excloses per seguretat.${NC}\"\n            echo \"\"\n        fi\n\n        echo \"\"\n        echo \"Tria el directori ORIGEN:\"\n        echo -e \"  ${VERD}A${NC}) \/home\/Miquel (tot el directori d'usuari)\"\n        echo -e \"  ${VERD}B${NC}) \/home\/Miquel\/Documents\"\n        echo -e \"  ${VERD}C${NC}) \/home\/Miquel\/Pictures\"\n        echo -e \"  ${VERD}D${NC}) \/home\/Miquel\/Downloads\"\n        echo -e \"  ${VERD}S${NC}) Sistema Deepin (sda5)\"\n        echo -e \"  ${GROC}R${NC}) Especificar ruta manualment\"\n        echo \"\"\n        read -p \"Opci\u00f3 [A\/B\/C\/D\/S\/R]: \" opcio_dir\n\n        case \"$opcio_dir\" in\n            A|a)\n                origen=\"\/home\/Miquel\/\"\n                echo -e \"${VERD}\u2713 Directori seleccionat: \/home\/Miquel${NC}\"\n                ;;\n            B|b)\n                origen=\"\/home\/Miquel\/Documents\/\"\n                echo -e \"${VERD}\u2713 Directori seleccionat: \/home\/Miquel\/Documents${NC}\"\n                ;;\n            C|c)\n                origen=\"\/home\/Miquel\/Pictures\/\"\n                echo -e \"${VERD}\u2713 Directori seleccionat: \/home\/Miquel\/Pictures${NC}\"\n                ;;\n            D|d)\n                origen=\"\/home\/Miquel\/Downloads\/\"\n                echo -e \"${VERD}\u2713 Directori seleccionat: \/home\/Miquel\/Downloads${NC}\"\n                ;;\n            S|s)\n                echo -e \"${VERD}\ud83d\udcbe BACKUP DEL SISTEMA DEEPIN (sda5)${NC}\"\n                echo \"\"\n\n                ARREL=$(findmnt -n -o SOURCE \/ 2>\/dev\/null)\n                if [ \"$ARREL\" != \"\/dev\/sda5\" ]; then\n                    echo -e \"${GROC}\u26a0  Atenci\u00f3: La partici\u00f3 arrel actual \u00e9s ${ARREL:-desconeguda}, no \/dev\/sda5.${NC}\"\n                    read -p \"Vols fer el backup del sistema actual de totes maneres? (s\/n): \" confirma_sys\n                    if [ \"$confirma_sys\" != \"s\" ] &amp;&amp; [ \"$confirma_sys\" != \"S\" ]; then\n                        echo \"Operaci\u00f3 cancel\u00b7lada.\"\n                        exit 0\n                    fi\n                fi\n\n                if [ \"$NUM_DISCS\" -eq 0 ]; then\n                    echo -e \"${VERMELL}Error: No s'ha trobat cap USB o disc connectat!${NC}\"\n                    echo \"Connecta un USB i torna a intentar-ho.\"\n                    exit 1\n                elif [ \"$NUM_DISCS\" -eq 1 ]; then\n                    if munta_disc 1; then\n                        USB_PATH=\"${DISC_MUNTATGE[1]}\/\"\n                        echo -e \"${BLAU}Unitat detectada: ${USB_PATH}${NC}\"\n                    else\n                        exit 1\n                    fi\n                else\n                    echo \"Tria la unitat on guardar el backup del sistema:\"\n                    mostra_discos\n                    read -p \"Opci\u00f3 [1-$NUM_DISCS]: \" opcio_sys\n                    if [[ \"$opcio_sys\" =~ ^[0-9]+$ ]] &amp;&amp; [ \"$opcio_sys\" -ge 1 ] &amp;&amp; [ \"$opcio_sys\" -le \"$NUM_DISCS\" ]; then\n                        if munta_disc \"$opcio_sys\"; then\n                            USB_PATH=\"${DISC_MUNTATGE[$opcio_sys]}\/\"\n                        else\n                            exit 1\n                        fi\n                    else\n                        echo -e \"${VERMELL}Opci\u00f3 no v\u00e0lida.${NC}\"\n                        exit 1\n                    fi\n                fi\n                echo \"\"\n\n                origen=\"\/\"\n                # Carpeta FIXA: el backup del sistema s'actualitza incrementalment\n                desti=\"${USB_PATH}deepin_system_backup\"\n\n                echo \"Origen: $origen\"\n                echo \"Dest\u00ed:  $desti\"\n                echo \"\"\n\n                mkdir -p \"$desti\"\n\n                if [ \"$EUID\" -ne 0 ]; then\n                    echo -e \"${GROC}\u26a0  Per copiar fitxers del sistema es necessiten permisos d'administrador.${NC}\"\n                    echo -e \"${BLAU}Introdueix la teva contrasenya quan se't demani.${NC}\"\n                    RSYNC_SYS=\"sudo rsync\"\n                else\n                    RSYNC_SYS=\"rsync\"\n                fi\n\n                ajusta_rsync \"$desti\"\n\n                echo -e \"${VERD}Iniciant c\u00f2pia de seguretat del sistema...${NC}\"\n                echo -e \"${GROC}Aquest proc\u00e9s pot trigar for\u00e7a temps...${NC}\"\n                $RSYNC_SYS $RSYNC_OPTS \\\n                    --exclude='\/proc' \\\n                    --exclude='\/sys' \\\n                    --exclude='\/dev' \\\n                    --exclude='\/run' \\\n                    --exclude='\/tmp' \\\n                    --exclude='\/mnt' \\\n                    --exclude='\/media' \\\n                    --exclude='\/lost+found' \\\n                    \"$origen\" \"$desti\/\"\n\n                echo -e \"${BLAU}Guardant informaci\u00f3 del backup...${NC}\"\n                if [ \"$RSYNC_SYS\" == \"sudo rsync\" ]; then ESCRIU=\"sudo tee\"; else ESCRIU=\"tee\"; fi\n                echo \"ORIGEN=$origen\" | $ESCRIU \"${desti}\/backup_info\" > \/dev\/null\n                {\n                    echo \"DATA=$(date +%Y-%m-%d_%H:%M:%S)\"\n                    echo \"TIPUS=deepin_system_backup\"\n                    echo \"USB=${USB_PATH}\"\n                    echo \"PARTICIO=${ARREL:-\/dev\/sda5}\"\n                } | $ESCRIU -a \"${desti}\/backup_info\" > \/dev\/null\n\n                echo -e \"${VERD}\u2705 Backup del sistema Deepin completat!${NC}\"\n                echo \"Metadades guardades a: ${desti}\/backup_info\"\n                echo \"\"\n                exit 0\n                ;;\n            *)\n                read -p \"Directori ORIGEN (ex: \/home\/Miquel\/Pictures\/Pict): \" origen\n                ;;\n        esac\n\n        # --- Selecci\u00f3 del DEST\u00cd (sempre a partir del llistat) ---\n        if [ \"$NUM_DISCS\" -eq 0 ]; then\n            echo -e \"${VERMELL}Error: no hi ha cap unitat disponible on guardar el backup.${NC}\"\n            echo \"Connecta un USB o disc extern i torna-ho a provar.\"\n            exit 1\n        elif [ \"$NUM_DISCS\" -eq 1 ]; then\n            if munta_disc 1; then\n                desti_base=\"${DISC_MUNTATGE[1]}\/backup_deepin\"\n                echo -e \"${VERD}\u2713 Dest\u00ed seleccionat: $desti_base${NC}\"\n            else\n                exit 1\n            fi\n        else\n            echo \"\"\n            read -p \"Tria la unitat de DEST\u00cd del backup (mira el llistat de dalt): \" opcio_desti\n            if [[ \"$opcio_desti\" =~ ^[0-9]+$ ]] &amp;&amp; [ \"$opcio_desti\" -ge 1 ] &amp;&amp; [ \"$opcio_desti\" -le \"$NUM_DISCS\" ]; then\n                if munta_disc \"$opcio_desti\"; then\n                    desti_base=\"${DISC_MUNTATGE[$opcio_desti]}\/backup_deepin\"\n                    echo -e \"${VERD}\u2713 Dest\u00ed seleccionat: $desti_base${NC}\"\n                else\n                    exit 1\n                fi\n            else\n                echo -e \"${VERMELL}Opci\u00f3 no v\u00e0lida.${NC}\"\n                exit 1\n            fi\n        fi\n\n        if [ ! -d \"$origen\" ]; then\n            echo -e \"${VERMELL}Error: El directori origen '$origen' no existeix.${NC}\"\n            exit 1\n        fi\n\n        nom_carpeta=$(basename \"$origen\")\n        if [[ \"$origen\" == \/home\/$USER* ]]; then\n            # Dades personals: una carpeta nova amb data a cada execuci\u00f3\n            desti=\"${desti_base}\/${nom_carpeta}_$(date +%Y%m%d_%H%M)\"\n        else\n            # Sistema (Roota, etc.): carpeta fixa actualitzada incrementalment\n            desti=\"${desti_base}\/${nom_carpeta}\"\n        fi\n\n        [[ \"$origen\" != *\/ ]] &amp;&amp; origen=\"${origen}\/\"\n        rsync_desti=\"${desti}\/\"\n\n        # SEGURETAT: mai copiar \"\/\" sense exclusions (usa l'opci\u00f3 S)\n        if [ \"$origen\" == \"\/\" ]; then\n            echo -e \"${VERMELL}Error: per copiar tot el sistema usa l'opci\u00f3 S.${NC}\"\n            exit 1\n        fi\n        # SEGURETAT: el dest\u00ed mai pot ser dins de l'origen (recursi\u00f3 infinita)\n        case \"$desti\" in\n            \"$origen\"*)\n                echo -e \"${VERMELL}Error: el dest\u00ed ('$desti') \u00e9s dins de l'origen ('$origen').${NC}\"\n                echo \"Aix\u00f2 provocaria una c\u00f2pia infinita. Operaci\u00f3 cancel\u00b7lada.\"\n                exit 1\n                ;;\n        esac\n\n        echo \"\"\n        echo -e \"${BLAU}\ud83d\udccb Resum del backup:${NC}\"\n        echo -e \"   Origen: ${VERD}$origen${NC}\"\n        echo -e \"   Dest\u00ed:  ${VERD}$rsync_desti${NC}\"\n        echo \"\"\n        read -p \"Vols continuar? (s\/n): \" confirma_backup\n\n        if [ \"$confirma_backup\" != \"s\" ] &amp;&amp; [ \"$confirma_backup\" != \"S\" ]; then\n            echo -e \"${GROC}\u26a0  Operaci\u00f3 cancel\u00b7lada. No s'ha copiat res.${NC}\"\n            exit 0\n        fi\n\n        mkdir -p \"$desti\"\n\n        echo \"\"\n        echo -e \"${VERD}Iniciant c\u00f2pia de seguretat...${NC}\"\n\n        ajusta_rsync \"$desti\"\n\n        if [ \"$EUID\" -ne 0 ] &amp;&amp; [[ \"$origen\" != \/home\/$USER* ]]; then\n            RSYNC_CMD=\"sudo rsync\"\n            echo -e \"${GROC}\u26a0  L'origen cont\u00e9 fitxers de sistema: cal contrasenya d'administrador.${NC}\"\n        else\n            RSYNC_CMD=\"rsync\"\n        fi\n\n        $RSYNC_CMD $RSYNC_OPTS \"$origen\" \"$rsync_desti\"\n\n        echo -e \"${BLAU}Guardant informaci\u00f3 del backup...${NC}\"\n        if [ \"$RSYNC_CMD\" == \"sudo rsync\" ]; then ESCRIU=\"sudo tee\"; else ESCRIU=\"tee\"; fi\n        echo \"ORIGEN=$origen\" | $ESCRIU \"${desti}\/backup_info\" > \/dev\/null\n        echo \"DATA=$(date +%Y-%m-%d_%H:%M:%S)\" | $ESCRIU -a \"${desti}\/backup_info\" > \/dev\/null\n        echo -e \"${VERD}\u2705 Metadades guardades a ${desti}\/backup_info${NC}\"\n        ;;\n\n    2) # --- OPCI\u00d3 2: RESTAURAR BACKUP ---\n        echo \"\"\n        echo -e \"${GROC}--- MODE RESTAURACI\u00d3 ---${NC}\"\n\n        detecta_discos\n        echo \"\"\n        echo -e \"${BLAU}Unitats disponibles on cercar backups:${NC}\"\n        mostra_discos\n        echo \"\"\n\n        if [ \"$NUM_DISCS\" -eq 0 ]; then\n            echo -e \"${VERMELL}Error: no hi ha cap unitat on cercar backups.${NC}\"\n            echo \"Connecta un USB o disc extern i torna-ho a provar.\"\n            exit 1\n        elif [ \"$NUM_DISCS\" -eq 1 ]; then\n            if munta_disc 1; then\n                USB_PATH=\"${DISC_MUNTATGE[1]}\/\"\n                echo -e \"${VERD}\u2713 Unitat seleccionada: ${USB_PATH}${NC}\"\n            else\n                exit 1\n            fi\n        else\n            read -p \"Tria la unitat on cercar el backup (mira el llistat de dalt): \" opcio_usb\n            if [[ \"$opcio_usb\" =~ ^[0-9]+$ ]] &amp;&amp; [ \"$opcio_usb\" -ge 1 ] &amp;&amp; [ \"$opcio_usb\" -le \"$NUM_DISCS\" ]; then\n                if munta_disc \"$opcio_usb\"; then\n                    USB_PATH=\"${DISC_MUNTATGE[$opcio_usb]}\/\"\n                    echo -e \"${VERD}\u2713 Unitat seleccionada: ${USB_PATH}${NC}\"\n                else\n                    exit 1\n                fi\n            else\n                echo -e \"${VERMELL}Opci\u00f3 no v\u00e0lida.${NC}\"\n                exit 1\n            fi\n        fi\n\n        # Cerca els backups de veritat: carpetes que contenen \"backup_info\"\n        echo -e \"${BLAU}Cercant backups disponibles...${NC}\"\n        mapfile -t backups &lt; &lt;(find \"$USB_PATH\" -maxdepth 4 -type f -name \"backup_info\" 2>\/dev\/null | sort -r)\n\n        if [ ${#backups[@]} -eq 0 ]; then\n            echo -e \"${VERMELL}No s'han trobat backups a ${USB_PATH}.${NC}\"\n            exit 1\n        fi\n\n        echo \"\"\n        echo \"Backups trobats:\"\n        for i in \"${!backups[@]}\"; do\n            info=\"${backups[$i]}\"\n            carpeta=$(dirname \"$info\")\n            nom_backup=$(basename \"$carpeta\")\n            data_backup=$(grep \"^DATA=\" \"$info\" | cut -d'=' -f2-)\n            origen_b=$(grep \"^ORIGEN=\" \"$info\" | cut -d'=' -f2-)\n            echo -e \"  ${VERD}$((i+1))${NC}) $nom_backup\"\n            echo -e \"       Data: $data_backup | Origen: $origen_b\"\n        done\n        echo \"\"\n\n        if [ ${#backups[@]} -eq 1 ]; then\n            idx=0\n            echo -e \"${VERD}\u2713 Backup trobat: $(basename \"$(dirname \"${backups[0]}\")\")${NC}\"\n        else\n            read -p \"Tria un backup per restaurar [1-${#backups[@]}]: \" eleccio\n            if [[ \"$eleccio\" =~ ^[0-9]+$ ]] &amp;&amp; [ \"$eleccio\" -ge 1 ] &amp;&amp; [ \"$eleccio\" -le \"${#backups[@]}\" ]; then\n                idx=$((eleccio-1))\n            else\n                echo -e \"${VERMELL}Opci\u00f3 no v\u00e0lida.${NC}\"\n                exit 1\n            fi\n        fi\n\n        info=\"${backups[$idx]}\"\n        backup_seleccionat=$(dirname \"$info\")\n        origen_original=$(grep \"^ORIGEN=\" \"$info\" | cut -d'=' -f2-)\n        data_backup=$(grep \"^DATA=\" \"$info\" | cut -d'=' -f2-)\n\n        echo \"\"\n        echo -e \"${BLAU}Backup seleccionat: ${VERD}$backup_seleccionat${NC}\"\n        echo \"\"\n        echo -e \"${BLAU}\ud83d\udccb Informaci\u00f3 del backup:${NC}\"\n        echo -e \"   Origen original: ${VERD}$origen_original${NC}\"\n        echo -e \"   Data del backup: ${VERD}$data_backup${NC}\"\n        echo \"\"\n        echo -e \"${BLAU}\ud83d\udd04 Restauraci\u00f3 autom\u00e0tica:${NC}\"\n        echo -e \"   Des de: ${VERD}$backup_seleccionat${NC}\"\n        echo -e \"   Cap a:  ${VERD}$origen_original${NC}\"\n        echo \"\"\n\n        read -p \"Vols continuar? (s\/n): \" confirma\n\n        if [ \"$confirma\" != \"s\" ] &amp;&amp; [ \"$confirma\" != \"S\" ]; then\n            echo \"Operaci\u00f3 cancel\u00b7lada.\"\n            exit 0\n        fi\n\n        echo \"\"\n        echo -e \"${VERD}Iniciant restauraci\u00f3...${NC}\"\n\n        if [ \"$EUID\" -ne 0 ] &amp;&amp; [[ \"$origen_original\" != \/home\/$USER* ]]; then\n            RSYNC_CMD=\"sudo rsync\"\n            echo -e \"${GROC}\u26a0  La restauraci\u00f3 toca fitxers de sistema: cal contrasenya d'administrador.${NC}\"\n        else\n            RSYNC_CMD=\"rsync\"\n        fi\n        $RSYNC_CMD $RSYNC_OPTS --exclude='backup_info' \"$backup_seleccionat\/\" \"$origen_original\"\n\n        echo \"\"\n        echo -e \"${VERD}\u2705 Restauraci\u00f3 completada!${NC}\"\n        ;;\n\n    3) # --- OPCI\u00d3 3: SORTIR ---\n        echo \"Ad\u00e9u!\"\n        exit 0\n        ;;\n\n    *) # --- OPCI\u00d3 NO V\u00c0LIDA ---\n        echo -e \"${VERMELL}Opci\u00f3 no v\u00e0lida.${NC}\"\n        exit 1\n        ;;\nesac\n\necho \"\"\necho -e \"${VERD}\u2705 Operaci\u00f3 finalitzada!${NC}\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f40d0d\" class=\"has-inline-color\">versi\u00f3:17-8-2026<\/mark><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">es salva amb Visual Code al escriptori -&gt; backup_mut.txt abans de moure&#8217;l al seu lloc defintiu: \/usr\/local\/bin\/backup_mut<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo cp \/home\/Miquel\/Desktop\/backup_mut.txt \/usr\/local\/bin\/backup_mut<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">i per pujar Grub del escriptori:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo cp \/home\/Miquel\/Desktop\/grub.txt  \/etc\/default\/grub<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">i per pujar grub.config<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo cp \/home\/Miquel\/Desktop\/grub_config.txt  \/boot\/grub\/grub.cfg<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">I per esborrar directoris obsolets:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo rm -rf \/media\/Miquel\/backup\/backup_deepin\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"381\" height=\"219\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-13.png\" alt=\"\" class=\"wp-image-18689\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-13.png 381w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-13-300x172.png 300w\" sizes=\"auto, (max-width: 381px) 100vw, 381px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"588\" height=\"295\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-20.png\" alt=\"\" class=\"wp-image-18731\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-20.png 588w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-20-300x151.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-20-500x251.png 500w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"511\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-21.png\" alt=\"\" class=\"wp-image-18813\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-21.png 778w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-21-300x197.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-21-768x504.png 768w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-21-457x300.png 457w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ed0707\" class=\"has-inline-color\">NOTA IMPORTANT<\/mark><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f00a0a\" class=\"has-inline-color\">Per evitar interferencies amb l&#8217;arrancada es molt important eliminar el directory ROOT cuan es fa una restauraci\u00f3<\/mark><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f22626\" class=\"has-inline-color\">GIMP 3.2.2 (PROGRAMA DE MANIPULACI\u00d3 D&#8217;IMATGES GNU)<\/mark><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per aconseguir una versi\u00f3 tan recent i de la nova branca 3.x (com la <strong>3.2.2<\/strong>) a Deepin sense trencar les depend\u00e8ncies del teu sistema, has de fer servir m\u00e8todes externs. Aqu\u00ed tens les dues millors maneres de fer-ho:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Opci\u00f3 1: Amb Flatpak (La m\u00e9s recomanada i neta)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Deepin s&#8217;integra molt b\u00e9 amb Flatpak, i des del repositori de <em>Flathub<\/em> sempre tindr\u00e0s l&#8217;\u00faltima versi\u00f3 estable de GIMP 3.x disponible.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Obre la <strong>Terminal<\/strong> a Deepin.<\/li>\n\n\n\n<li>Assegura&#8217;t de tenir Flatpak instal\u00b7lat i el repositori de Flathub afegit (copia i enganxa aquestes l\u00ednies una per una, et demanar\u00e0 la teva contrasenya a la primera)<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update\nsudo apt install flatpak\nflatpak remote-add --if-not-exists flathub https:\/\/flathub.org\/repo\/flathub.flatpakrepo<\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li>:<code>sudo apt update sudo apt install flatpak flatpak remote-add --if-not-exists flathub https:\/\/flathub.org\/repo\/flathub.flatpakrepo<\/code><\/li>\n\n\n\n<li>Ara, instal\u00b7la l&#8217;\u00faltima versi\u00f3 de GIMP disponible:<code>flatpak install flathub org.gimp.GIMP<\/code><\/li>\n\n\n\n<li><em>Nota:<\/em> Si un cop instal\u00b7lat no et surt a la teva llista d&#8217;aplicacions del men\u00fa de Deepin, tanca la sessi\u00f3 i torna a entrar (o reinicia l&#8217;ordinador) perqu\u00e8 el llan\u00e7ador d&#8217;aplicacions s&#8217;actualitzi i el reconegui.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\ud83d\udca1 Consell extra per a Deepin:<\/strong><br>De vegades, la <em>Deepin Store<\/em> (la botiga d&#8217;aplicacions visual) ja t\u00e9 integraci\u00f3 amb Flatpak. Pots buscar \u00abGIMP\u00bb directament all\u00e0, per\u00f2 <strong>fixa&#8217;t b\u00e9<\/strong> que a la informaci\u00f3 del paquet digui que prov\u00e9 de \u00abFlathub\u00bb o que \u00e9s la versi\u00f3 3.x. Si no ho indica, probablement est\u00e0s instal\u00b7lant la versi\u00f3 antiga del sistema.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Quin dels dos m\u00e8todes prefereixes provar? Si et trobes amb algun error concret a la terminal o la botiga es queda \u00abpensant\u00bb, digues-m&#8217;ho i ho solucionem al moment!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e91313\" class=\"has-inline-color\">AppServ<\/mark><\/strong> (de windows)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Amb molt de gust! \ud83d\ude0a Et deixo el text preparat perqu\u00e8 el puguis <strong>copiar i enganxar directament a una entrada de WordPress<\/strong>. He procurat que tingui un format de documentaci\u00f3, com una guia de consulta.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Instal\u00b7laci\u00f3 d&#8217;un entorn de desenvolupament LAMP a Deepin 25<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Despr\u00e9s d&#8217;instal\u00b7lar <strong>Apache, PHP, MariaDB i phpMyAdmin<\/strong> a Deepin 25, \u00e9s \u00fatil saber on es troba cada component del sistema.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A difer\u00e8ncia de Windows (AppServ, XAMPP, WAMP&#8230;), a Linux cada servei es guarda en el directori est\u00e0ndard del sistema.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Equival\u00e8ncia amb AppServ<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Component<\/th><th>AppServ (Windows)<\/th><th>Deepin 25<\/th><\/tr><\/thead><tbody><tr><td>Servidor Web (Apache)<\/td><td><code>C:\\AppServ\\Apache24\\<\/code><\/td><td><code>\/etc\/apache2\/<\/code><\/td><\/tr><tr><td>Carpeta Web (www)<\/td><td><code>C:\\AppServ\\www\\<\/code><\/td><td><code>\/var\/www\/html\/<\/code><\/td><\/tr><tr><td>PHP<\/td><td><code>C:\\AppServ\\php\\<\/code><\/td><td><code>\/usr\/bin\/php<\/code> + <code>\/etc\/php\/8.4\/<\/code><\/td><\/tr><tr><td>MariaDB<\/td><td><code>C:\\AppServ\\MySQL\\<\/code><\/td><td><code>\/var\/lib\/mysql\/<\/code><\/td><\/tr><tr><td>phpMyAdmin<\/td><td><code>C:\\AppServ\\www\\phpMyAdmin\\<\/code><\/td><td><code>\/usr\/share\/phpmyadmin\/<\/code><\/td><\/tr><tr><td>Configuraci\u00f3 phpMyAdmin<\/td><td>dins del programa<\/td><td><code>\/etc\/phpmyadmin\/<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">ls -lh \/etc\/php\/8.4\/apache2\/php*.ini<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Miquel@Miquel-PC:~$ ls -lh <mark style=\"background-color:rgba(0, 0, 0, 0);color:#f70b0b\" class=\"has-inline-color\">\/etc\/php\/8.4\/apache2\/<\/mark>php*.ini<br>-rw-r&#8211;r&#8211; 1 root root 68K de jul. 21 20:15 \/etc\/php\/8.4\/apache2\/php.ini<br>-rw-r&#8211;r&#8211; 1 root root 68K de jul. 22 12:01 \/etc\/php\/8.4\/apache2\/php_saved.ini<br>Miquel@Miquel-PC:~$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">modificar php.ini amb Vs<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"871\" height=\"324\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-11.png\" alt=\"\" class=\"wp-image-18550\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-11.png 871w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-11-300x112.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-11-768x286.png 768w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-11-500x186.png 500w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">1. Apache<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Configuraci\u00f3<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/apache2\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cont\u00e9 principalment:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apache2.conf\nports.conf\n\nsites-available\/\nsites-enabled\/\n\nmods-available\/\nmods-enabled\/\n\nconf-available\/\nconf-enabled\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u00c9s el directori principal de configuraci\u00f3 del servidor web.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Carpeta Web (DocumentRoot)<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/html\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u00c9s l&#8217;equivalent al directori <strong>www<\/strong> d&#8217;AppServ.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per exemple:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/html\/index.php\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">es pot obrir des del navegador amb:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/127.0.0.1\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">o b\u00e9<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/localhost\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">2. PHP<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Executable:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/bin\/php\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Per comprovar-ne la versi\u00f3:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">php -v\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">o b\u00e9<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">which php\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Configuraci\u00f3<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/php\/8.4\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cont\u00e9:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apache2\/\ncli\/\nmods-available\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Fitxers principals:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Servidor Apache<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/php\/8.4\/apache2\/php.ini\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Terminal (CLI)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/php\/8.4\/cli\/php.ini\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">3. MariaDB<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Les bases de dades es guarden a:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/lib\/mysql\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">All\u00e0 hi trobarem una carpeta per cada base de dades.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per exemple:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">information_schema\/\n\nmysql\/\n\nperformance_schema\/\n\nphpmyadmin\/\n\nsys\/\n\npolidic\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">4. phpMyAdmin<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ed0f0f\" class=\"has-inline-color\">ACC\u00c9S-&gt; http:\/\/127.0.0.1\/phpmyadmin\/<\/mark><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"663\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12-1024x663.png\" alt=\"\" class=\"wp-image-18557\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12-1024x663.png 1024w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12-300x194.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12-768x498.png 768w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12-1536x995.png 1536w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12-463x300.png 463w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-12.png 1650w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Amb Firexox hi ha alguna dificultat amb la funci\u00f3 Importar i es millor posar la bd al escriptori i usar:<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   mysql -u root -p beseit &lt; ~\/Desktop\/beseit.sql<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Programa:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/share\/phpmyadmin\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Configuraci\u00f3:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/phpmyadmin\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">5. Registres (Logs)<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Els registres d&#8217;Apache es troben a:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/log\/apache2\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Principalment:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">access.log\n\nerror.log\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Quan alguna cosa no funciona, aquest \u00e9s el primer lloc on mirar.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">6. Estat dels serveis<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Comprovar Apache<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status apache2\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Comprovar MariaDB<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status mariadb\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reiniciar Apache<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart apache2\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reiniciar MariaDB<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart mariadb\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">7. Estructura recomanada dels projectes<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Per defecte Apache utilitza:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/html\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Una bona organitzaci\u00f3 consisteix a crear un directori per cada projecte:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/\n\n    html\/\n\n    polidic\/\n\n    wordpress\/\n\n    proves\/\n\n    api\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Exemple<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/\n\n\u251c\u2500\u2500 html\/\n\u2502     index.php\n\u2502\n\u251c\u2500\u2500 polidic\/\n\u2502     index.php\n\u2502     css\/\n\u2502     js\/\n\u2502     includes\/\n\u2502     BD_conexions\/\n\u2502     0imatges_polidic\/\n\u2502     diccionaris_default\/\n\u2502\n\u251c\u2500\u2500 wordpress\/\n\u2502\n\u2514\u2500\u2500 proves\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">D&#8217;aquesta manera podem accedir als projectes mitjan\u00e7ant:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/localhost\/polidic\/\n<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/localhost\/wordpress\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">8. Directoris m\u00e9s importants<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Directori<\/th><th>Funci\u00f3<\/th><\/tr><\/thead><tbody><tr><td><code>\/etc\/apache2\/<\/code><\/td><td>Configuraci\u00f3 d&#8217;Apache<\/td><\/tr><tr><td><code>\/var\/www\/html\/<\/code><\/td><td>Carpeta web principal<\/td><\/tr><tr><td><code>\/usr\/bin\/php<\/code><\/td><td>Executable PHP<\/td><\/tr><tr><td><code>\/etc\/php\/8.4\/<\/code><\/td><td>Configuraci\u00f3 de PHP<\/td><\/tr><tr><td><code>\/var\/lib\/mysql\/<\/code><\/td><td>Bases de dades MariaDB<\/td><\/tr><tr><td><code>\/usr\/share\/phpmyadmin\/<\/code><\/td><td>Programa phpMyAdmin<\/td><\/tr><tr><td><code>\/etc\/phpmyadmin\/<\/code><\/td><td>Configuraci\u00f3 phpMyAdmin<\/td><\/tr><tr><td><code>\/var\/log\/apache2\/<\/code><\/td><td>Registres d&#8217;Apache<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Conclusions<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Deepin (igual que Debian i Ubuntu) distribueix cada component del servidor en el seu directori corresponent. Aix\u00f2 pot semblar menys intu\u00eftiu que AppServ o XAMPP, per\u00f2 ofereix molts avantatges:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>configuraci\u00f3 m\u00e9s clara i modular;<\/li>\n\n\n\n<li>actualitzacions independents de cada component;<\/li>\n\n\n\n<li>m\u00e9s estabilitat i seguretat;<\/li>\n\n\n\n<li>estructura est\u00e0ndard compartida per la majoria de distribucions Linux.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Un cop coneguda aquesta organitzaci\u00f3, administrar un servidor LAMP resulta tan senzill com treballar amb AppServ a Windows, amb l&#8217;avantatge d&#8217;utilitzar l&#8217;estructura est\u00e0ndard de Linux.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Espero que aquesta guia et sigui \u00fatil. Ha estat un plaer ajudar-te a deixar el teu Deepin preparat com a entorn de desenvolupament. Bon treball amb <strong>Polidic<\/strong>! \ud83d\ude80<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">1. Apache<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Configuraci\u00f3<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/apache2\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cont\u00e9:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apache2.conf\nports.conf\n\nsites-available\/\nsites-enabled\/\n\nmods-available\/\nmods-enabled\/\n\nconf-available\/\nconf-enabled\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u00c9s probablement el directori que m\u00e9s tocar\u00e0s.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">DocumentRoot (equivalent a www)<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/html\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Aqu\u00ed \u00e9s on Apache serveix la web per defecte.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per exemple:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/html\/index.php\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">es veu a:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/127.0.0.1\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">2. PHP<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Executable<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/bin\/php\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Comprovar:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">which php\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Configuraci\u00f3:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/php\/8.4\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cont\u00e9:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apache2\/\ncli\/\nmods-available\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">El fitxer principal \u00e9s:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/php\/8.4\/apache2\/php.ini\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">i pel terminal:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/php\/8.4\/cli\/php.ini\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">3. MariaDB<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Les bases de dades estan a:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/lib\/mysql\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Si hi entres veur\u00e0s alguna cosa semblant a:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">information_schema\/\n\nmysql\/\n\nperformance_schema\/\n\nsys\/\n\nnom_base_dades\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cada base de dades \u00e9s un directori.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">4. phpMyAdmin<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Programa<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/share\/phpmyadmin\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Configuraci\u00f3<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/phpmyadmin\/\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">5. Logs<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Apache<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/log\/apache2\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cont\u00e9<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">access.log\n\nerror.log\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">S\u00f3n molt \u00fatils quan alguna cosa falla.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">6. Serveis<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Comprovar Apache<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status apache2\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">MariaDB<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status mariadb\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">7. Els teus projectes<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Ara mateix Apache utilitza<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/html\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Per\u00f2 pots crear-ne tants com vulguis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per exemple:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/\n\n    html\/\n\n    polidic\/\n\n    proves\/\n\n    api\/\n\n    wordpress\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">i configurar un VirtualHost per a cadascun.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">8. Si vols treballar com AppServ<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Com que est\u00e0s acostumat a Windows, jo faria una estructura molt semblant:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/\n\n    html\/\n        index.php\n\n    polidic\/\n        index.php\n        css\/\n        js\/\n        imatges\/\n        includes\/\n\n    wordpress\/\n\n    proves\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Aix\u00f2 et resultar\u00e0 molt familiar.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">El meu suggeriment per al teu cas<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Coneixent el projecte <strong>Polidic<\/strong>, jo el deixaria aix\u00ed:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/\n\u2502\n\u251c\u2500\u2500 html\/\n\u2502\n\u251c\u2500\u2500 polidic\/\n\u2502   \u251c\u2500\u2500 index.php\n\u2502   \u251c\u2500\u2500 css\/\n\u2502   \u251c\u2500\u2500 js\/\n\u2502   \u251c\u2500\u2500 BD_conexions\/\n\u2502   \u251c\u2500\u2500 includes\/\n\u2502   \u251c\u2500\u2500 0imatges_polidic\/\n\u2502   \u251c\u2500\u2500 diccionaris_default\/\n\u2502   \u2514\u2500\u2500 ...\n\u2502\n\u2514\u2500\u2500 wordpress\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">D&#8217;aquesta manera podr\u00e0s accedir-hi amb una URL com <code>http:\/\/localhost\/polidic\/<\/code>, molt semblant al que feies amb AppServ.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Quan vulguis, tamb\u00e9 et puc ajudar a configurar <strong>VirtualHosts<\/strong> perqu\u00e8 puguis obrir els teus projectes amb adreces encara m\u00e9s c\u00f2modes, per exemple:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>http:\/\/polidic.local<\/code><\/li>\n\n\n\n<li><code>http:\/\/wordpress.local<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u00c9s una configuraci\u00f3 molt pr\u00e0ctica per treballar en desenvolupament i \u00e9s la que acostumen a fer servir molts desenvolupadors Linux.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Directament, <strong>no es pot instal\u00b7lar AppServ de manera nativa a Deepin<\/strong> (ni a cap altra distribuci\u00f3 Linux moderna). Tot i que algunes fonts antigues esmenten un suport te\u00f2ric per a Linux, els instal\u00b7ladors actuals d&#8217;AppServ s\u00f3n fitxers <code>.exe<\/code> dissenyats exclusivament per a l&#8217;entorn Windows [[44]].<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No et preocupis, per\u00f2: com que Deepin est\u00e0 basat en Debian, tens alternatives molt millors, m\u00e9s segures i totalment integrades per aconseguir exactament el mateix resultat (un servidor web amb Apache, PHP, base de dades i phpMyAdmin).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Aqu\u00ed tens les millors opcions per al teu sistema:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Entorn LAMP natiu (Opci\u00f3 m\u00e9s recomanada)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u00c9s l&#8217;est\u00e0ndard de la ind\u00fastria en entorns Linux. En lloc d&#8217;un instal\u00b7lador de tercers, utilitzes els paquets oficials de Deepin, la qual cosa garanteix major estabilitat i actualitzacions de seguretat autom\u00e0tiques. Obre la terminal i executa:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Actualitza la llista de paquets:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   sudo apt update<\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Instal\u00b7la el servidor web Apache:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   sudo apt install apache2<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"388\" height=\"89\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-10.png\" alt=\"\" class=\"wp-image-18544\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-10.png 388w, https:\/\/www.beseit.net\/wp-content\/uploads\/2026\/07\/imatge-10-300x69.png 300w\" sizes=\"auto, (max-width: 388px) 100vw, 388px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Per comprovar si Apache est\u00e0 instal\u00b7lat a Deepin i on es troba, executa aquestes comandes a la terminal:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. <strong>Comprovar si Apache est\u00e0 instal\u00b7lat<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apache2 -v<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">o<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">dpkg -l | grep apache2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Si est\u00e0 instal\u00b7lat, veur\u00e0s la versi\u00f3. Si no, dir\u00e0 que no es troba la ordre.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. <strong>Comprovar si est\u00e0 en execuci\u00f3<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status apache2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Si est\u00e0 actiu, veur\u00e0s <code>active (running)<\/code> en verd.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. <strong>On est\u00e0 instal\u00b7lat<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Els fitxers principals es troben a:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Executable<\/strong>: <code>\/usr\/sbin\/apache2<\/code><\/li>\n\n\n\n<li><strong>Fitxers de configuraci\u00f3<\/strong>: <code>\/etc\/apache2\/<\/code><\/li>\n\n\n\n<li><strong>Carpeta web (document root)<\/strong>: <code>\/var\/www\/html\/<\/code><\/li>\n\n\n\n<li><strong>Logs<\/strong>: <code>\/var\/log\/apache2\/<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4. <strong>Veure la configuraci\u00f3 del document root<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">grep -i \"documentroot\" \/etc\/apache2\/sites-available\/000-default.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Aix\u00f2 et dir\u00e0 on estan els fitxers web (normalment <code>\/var\/www\/html<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. <strong>Comprovar si el port 80 est\u00e0 escoltant<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo netstat -tlnp | grep :80<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">o<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ss -tlnp | grep :80<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Resum r\u00e0pid<\/strong>: Executa <code>apache2 -v<\/code> per saber si est\u00e0 instal\u00b7lat i <code>sudo systemctl status apache2<\/code> per saber si est\u00e0 funcionant. Si vols veure la p\u00e0gina per defecte, ves a <code>http:\/\/localhost<\/code> al navegador.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Instal\u00b7la el servidor de base de dades (MariaDB, el substitut directe i compatible de MySQL a Debian\/Deepin):<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   sudo apt install mariadb-server<\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Instal\u00b7la PHP i els m\u00f2duls necessaris per connectar amb la base de dades:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   sudo apt install php libapache2-mod-php php-mysql<\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>(Opcional) Instal\u00b7la phpMyAdmin per gestionar les bases de dades des del navegador:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   sudo apt install phpmyadmin<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Nota: Durant la instal\u00b7laci\u00f3, quan et pregunti, prem la barra espaiadora per seleccionar <code>apache2<\/code> i despr\u00e9s <code>Enter<\/code>. Tamb\u00e9 et demanar\u00e0 configurar una contrasenya per a l&#8217;administrador de la base de dades.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Un cop finalitzat, pots comprovar que tot funciona obrint el navegador i visitant <code>http:\/\/localhost<\/code>. Els teus fitxers web aniran a la carpeta <code>\/var\/www\/html\/<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. XAMPP per a Linux (Alternativa \u00abtot en un\u00bb)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Si prefereixes una experi\u00e8ncia m\u00e9s semblant a la d&#8217;AppServ (un sol paquet que instal\u00b7la tot de cop), <strong>XAMPP<\/strong> ofereix una versi\u00f3 oficial per a Linux. El pots descarregar des del lloc web d&#8217;Apache Friends i executar l&#8217;instal\u00b7lador <code>.run<\/code> des de la terminal. Tot i aix\u00f2, la comunitat de desenvolupament sol recomanar l&#8217;opci\u00f3 LAMP nativa, ja que XAMPP a vegades pot donar problemes de permisos o no rebre actualitzacions tan \u00e0gils com el gestor de paquets <code>apt<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Docker (Per a entorns a\u00efllats)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Com a estudiant de ci\u00e8ncies de la computaci\u00f3, \u00e9s molt probable que en el futur valoris tenir entorns a\u00efllats. Pots fer servir Docker per desplegar un contenidor LAMP amb una sola ordre, sense instal\u00b7lar res directament al teu sistema operatiu Deepin, mantenint-lo net i sense conflictes entre projectes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Resum<\/strong>: Descarta AppServ per a Linux. La instal\u00b7laci\u00f3 nativa de <strong>LAMP<\/strong> mitjan\u00e7ant la terminal de Deepin \u00e9s el cam\u00ed m\u00e9s r\u00e0pid, professional i lliure de problemes de permisos a llarg termini. Si necessites ajuda per configurar qualsevol d&#8217;aquests passos, no dubtis a dir-m&#8217;ho!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>Firefox Aqu\u00ed tens el resum dels 5 passos que vam seguir per instal\u00b7lar Firefox 152.0.5 des de ~\/Downloads\/firefox-152.0.5.tar.xz: 1. Extreure el fitxer 2. Moure la carpeta a \/opt 3. Crear enlla\u00e7 simb\u00f2lic al terminal 4. Crear l&#8217;acc\u00e9s directe al men\u00fa &hellip; <a href=\"https:\/\/www.beseit.net\/?p=18475\">Continua llegint <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":3167,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[207,1],"tags":[],"class_list":["post-18475","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-deepin-linux","category-bloc-de-notes"],"_links":{"self":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/18475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18475"}],"version-history":[{"count":71,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/18475\/revisions"}],"predecessor-version":[{"id":18916,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/18475\/revisions\/18916"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/media\/3167"}],"wp:attachment":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}