FreeBSD

Fonte: WikiPeida
Saltar para a navegação Saltar para a pesquisa

Actualizar

Sistema

freebsd-update fetch
freebsd-update install

Ports

pkg update
pkg upgrade -y

Serviços

Nginx

Instalação

pkg install nginx
sysrc nginx_enable="yes"
service nginx start

Configuração

/usr/local/etc/nginx/nginx.conf

user www;
worker_processes 4;

Certbot

pkg install py37-certbot py37-certbot-nginx
certbot --nginx -d example.com -d www.example.com

MariaDB

pkg search -o mariadb
pkg install mariadb105-server mariadb105-client
sysrc mysql_enable="yes"
service mysql-server start
/usr/local/bin/mysql_secure_installation
sysrc mysql_args="--bind-address=127.0.0.1"
service mysql-server restart


create database DATABASE_NAME;
grant all privileges on DATABASE_NAME.* TO 'USER_NAME'@'localhost' identified by 'PASSWORD';
flush privileges;

PHP-fpm

 
pkg install php74 php74-mysqli php74-mbstring php74-zlib php74-curl php74-gd php74-json php74-phar php74-filter php74-openssl php74-bcmath php74-ctype php74-fileinfo php74-pdo php74-pdo_mysql php74-tokenizer php74-xml php74-dom php74-xmlwriter

cp /usr/local/etc/php.ini{-production,}
sysrc php_fpm_enable=YES
service php-fpm start
  • /usr/local/etc/php.ini
  • /usr/local/etc/php-fpm.d/www.conf


Redis

pkg install redis php74-pecl-redis
sysrc redis_enable=YES
service redis start
  • /usr/local/etc/redis.conf