Impostazione della versione predefinita
In ServBay, puoi impostare la versione predefinita supportata dalla riga di comando per utilizzare automaticamente quella versione quando esegui comandi o script. Supporta PHP, Nodejs, MariaDB, PostgreSQL e altri. Ecco una guida dettagliata su come impostare la versione predefinita:
- Apri ServBay e clicca su "Impostazioni" nella barra di navigazione a sinistra.
- Nella pagina delle impostazioni, trova l’opzione "Versione predefinita".
- Nelle opzioni a discesa, seleziona la versione predefinita di PHP, Nodejs, MariaDB e PostgreSQL.
- Clicca sul pulsante "Applica" per confermare le modifiche.
Dopo aver impostato la versione predefinita, ad esempio, se imposti la versione predefinita di PHP a 7.4, eseguendo il comando php -v
nella riga di comando vedrai l'output PHP 7.4.x (cli)
.
Se hai bisogno di eseguire temporaneamente una versione non predefinita nella riga di comando, ad esempio PHP 8.1, puoi utilizzare il comando php-8.1
per richiamare la versione 8.1, come php-8.1 -v
, e questo mostrerà l'output PHP 8.1.x (cli)
.
Impostazioni simili si applicano a MariaDB, PostgreSQL e altri pacchetti. Si prega di notare che nella pagina Gestione dei servizi, è possibile vedere un'icona fissa accanto al nome del servizio per indicare che quella versione è la predefinita.