Suporte à linha de comando
ServBay fornece suporte à linha de comando, permitindo que você instale a ferramenta de linha de comando do ServBay no bash ou zsh. Aqui estão os passos de instalação:
- Abra o ServBay e clique em
Configurações
na barra de navegação à esquerda.
- Na página de configurações, encontre a opção
Ferramenta de Linha de Comando
. - De acordo com o seu ambiente de terminal, clique em
Instalar ferramenta CLI no zsh
ouInstalar ferramenta CLI no bash
.
- Após a instalação, reabra o seu terminal, e a ferramenta de linha de comando estará disponível.
Configurar a versão padrão do pacote
Se você deseja configurar a versão padrão de um software, como a versão padrão do PHP ou MariaDB, você pode consultar o documento Configurar versão padrão para passos detalhados.
Executar uma versão específica do PHP
ServBay suporta a execução direta de versões específicas do PHP, como php-5.6
ou phpize-8.3
. Você pode usar esses comandos no terminal para executar operações com versões específicas do PHP.
Comandos de exemplo
- Verificar a versão do PHP instalada atualmente:
bash
php -v
1
- Executar um script PHP usando PHP 5.6:
bash
php-5.6 your_script.php
1
- Conectar ao banco de dados PostgreSQL:
bash
psql -h localhost -U your_user -d your_database
1
- Executar uma consulta SQL:
bash
psql -h localhost -U your_user -d your_database -c "SELECT * FROM your_table;"
1
- Verificar o status do Redis:
bash
redis-cli info stats
1
Com esses comandos de exemplo, você pode utilizar os diversos serviços fornecidos pelo ServBay em um ambiente de linha de comando.