Pesquisa de site

Como instalar o Webmin no FreeBSD 12 | FreeBSD 13


Como posso instalar o Webmin no FreeBSD 12 | FreeBSD 13? Webmin é uma popular ferramenta de configuração de sistema baseada na web de código aberto para sistemas Linux e Unix. Com o Webmin você pode configurar contas de usuário, gerenciar servidor web Apache, servidor DNS, configuração de samba e arquivos, servidores de e-mail, gerenciamento de pacotes, gerenciar servidores de banco de dados etc.

É fácil instalar o Webmin no FreeBSD 12 | FreeBSD 13. O pacote pode ser instalado a partir do repositório binário ou construindo o Webmin a partir do código-fonte. A escolha é sua, mas neste tutorial iremos com a instalação binária do Webmin no FreeBSD 12|FreeBSD 13.

Instale o Webmin no FreeBSD 12 | FreeBSD 13

O FreeBSD vem com um gerenciador de pacotes chamado pkg que usaremos para instalar o Webmin.

Primeiro atualize seu índice de pacotes do FreeBSD

# pkg update
 Updating FreeBSD repository catalogue…
 Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
 Fetching packagesite.txz: 100%    6 MiB 668.1kB/s    00:10    
 Processing entries: 100%
 FreeBSD repository update completed. 32049 packages processed.
 All repositories are up to date.

Assim que a atualização retornar com sucesso, instale o Webmin no FreeBSD 12 executando o comando abaixo:

# pkg install webmin
 Updating FreeBSD repository catalogue…
 FreeBSD repository is up to date.
 All repositories are up to date.
 The following 8 package(s) will be affected (of 0 checked):
 New packages to be INSTALLED:
     webmin: 1.900
     p5-Net-SSLeay: 1.85
     perl5: 5.28.1
     p5-Authen-PAM: 0.16_2
     python27: 2.7.15
     readline: 7.0.5
     libffi: 3.2.1_3
     p5-IO-Tty: 1.12_2
 Number of packages to be installed: 8
 The process will require 210 MiB more space.
 42 MiB to be downloaded.
 Proceed with this action? [y/N]: y
 [1/8] Fetching webmin-1.900.txz: 100%   16 MiB   1.2MB/s    00:15    
 [2/8] Fetching p5-Net-SSLeay-1.85.txz: 100%  253 KiB 258.8kB/s    00:01    
 [3/8] Fetching perl5-5.28.1.txz: 100%   14 MiB 183.5kB/s    01:20    
 [4/8] Fetching p5-Authen-PAM-0.16_2.txz: 100%   21 KiB  21.3kB/s    00:01    
 [5/8] Fetching python27-2.7.15.txz: 100%   11 MiB 291.0kB/s    00:38    
 [6/8] Fetching readline-7.0.5.txz: 100%  332 KiB 113.4kB/s    00:03    
 [7/8] Fetching libffi-3.2.1_3.txz: 100%   34 KiB  35.0kB/s    00:01    
 [8/8] Fetching p5-IO-Tty-1.12_2.txz: 100%   30 KiB  30.5kB/s    00:01    
 Checking integrity… done (0 conflicting)
 [1/8] Installing perl5-5.28.1…
 [1/8] Extracting perl5-5.28.1: 100%
 [2/8] Installing readline-7.0.5…
 [2/8] Extracting readline-7.0.5: 100%
 [3/8] Installing libffi-3.2.1_3…
 [3/8] Extracting libffi-3.2.1_3: 100%
 [4/8] Installing p5-Net-SSLeay-1.85…
 [4/8] Extracting p5-Net-SSLeay-1.85: 100%
 [5/8] Installing p5-Authen-PAM-0.16_2…
 [5/8] Extracting p5-Authen-PAM-0.16_2: 100%
 [6/8] Installing python27-2.7.15…
 [6/8] Extracting python27-2.7.15: 100%
 [7/8] Installing p5-IO-Tty-1.12_2…
 [7/8] Extracting p5-IO-Tty-1.12_2: 100%
 [8/8] Installing webmin-1.900…
 [8/8] Extracting webmin-1.900: 100%
.....

Depois de instalar o Webmin pela primeira vez, você deve configurar o Webmin executando o seguinte comando como root:

# /usr/local/lib/webmin/setup.sh
 
 Welcome to the Webmin setup script, version 1.900        * 
 
 Webmin is a web-based interface that allows Unix-like operating
 systems and common Unix services to be easily administered.
 Installing Webmin in /usr/local/lib/webmin …
 
 Webmin uses separate directories for configuration files and log files.
 Unless you want to run multiple versions of Webmin at the same time
 you can just accept the defaults.
 Log file directory [/var/log/webmin]: 
 
 Webmin is written entirely in Perl. Please enter the full path to the
 Perl 5 interpreter on your system.
 Full path to perl (default /usr/local/bin/perl): 
 Testing Perl …
 Perl seems to be installed ok
 
 Operating system name:    FreeBSD
 Operating system version: 12.0
 
 Webmin uses its own password protected web server to provide access
 to the administration programs. The setup script needs to know :
 What port to run the web server on. There must not be another
 web server already using this port.
 The login name required to access the web server.
 The password required to access the web server.
 If the webserver should use SSL (if your system supports it).
 Whether to start webmin at boot time. 
 Web server port (default 10000): 
 Login name (default admin): 
 Login password: <Enter admin Password>
 Password again: <Conform admin Password>
 Use SSL (y/n): y
 
 Creating web server config files..
 ..done
 Creating access control file..
 ..done
 Creating start and stop scripts..
 ..done
 Copying config files..
 ..done
 Changing ownership and permissions ..
 ..done
 Running postinstall scripts ..
 ..done
 Enabling background status collection ..
 ..done

Certifique-se de definir

  • Diretório do arquivo de configuração
  • Diretório do arquivo de log
  • Caminho completo para Perl
  • Porta do servidor Web (padrão 10.000)
  • Nome de login (padrão admin)
  • Senha de login
  • Opção SSL (Sim/Não)

Inicie o serviço Webmin no FreeBSD 12 | FreeBSD 13

Instalamos e configuramos o Webmin no FreeBSD 12 | FreeBSD 13. A última etapa é configurar o serviço Webmin para iniciar na inicialização e iniciar o serviço.

Configure o serviço Webmin para iniciar na inicialização do sistema:

# sysrc webmin_enable="YES"
webmin_enable:  -> YES

O comando acima adicionará a linha webmin_enable="YES" ao seu /etc/rc.conf

Para iniciar o Webmin pela primeira vez, execute:

# service webmin start
 Starting webmin.
 Cron 15469220631494 missing any time spec

O serviço deve estar escutando na porta 10000

# sockstat -4 -6 |grep 10000
 root     perl       1536  5  tcp4   *:10000               *:*
 root     perl       1536  6  udp4   *:10000               *:*

Acessar a interface do Webmin

abra a porta URL/endereço IP do servidor 10000, por exemplo, https://192.168.122.197:10000

Se você receber o aviso “Certificado inválido”, clique em Continuar mesmo assim

Faça login com o nome de usuário especificado durante a instalação e sua senha.

Agora você tem o Webmin instalado no FreeBSD 12. Aproveite a administração fácil do seu servidor FreeBSD a partir de uma interface web.

Verifique também:

  • Como instalar o Node.js 10 LTS e NPM no FreeBSD 12
  • Como instalar o MariaDB 10.5 no FreeBSD 12
  • Como instalar o PHP 7.2 no FreeBSD 12

Artigos relacionados: