apt install -y composer nginx git software-properties-common unzip zip build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget mariadb-server php7.4 php7.4-mbstring php7.4-xmlrpc php7.4-soap php7.4-gd php7.4-xml php7.4-cli php7.4-zip php7.4-bcmath php7.4-tokenizer php7.4-json php-pear php7.4-curl php7.4-intl php7.4-mysqli php7.4-fpm
cd /opt
git clone https://github.com/APIBrasil/apibrasil-whatsapp.git painel-whatsapp
cd /opt/painel-whatsapp
cp .env_example .env
nano /etc/php/7.4/fpm/pool.d/www.conf
listen = 127.0.0.1:9000
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
mysql_secure_installation
mariadb -u root -p
CREATE DATABASE apibrasil;
USE mysql;
UPDATE user SET PLUGIN='' WHERE User='root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '_SeT_On3_B1g_STR0NG_P@ssw0rd_';
FLUSH PRIVILEGES;
EXIT;
composer install
sudo systemctl enable nginx
sudo systemctl enable mariadb.service
crontab -e
* * * * * cd /opt/painel-whatsapp && php7.4 artisan schedule:run >> /dev/null 2>&1
service mysql restart
service php7.4-fpm restart
service php7.4-fpm status
php artisan migrate
php artisan db:seed
chmod 777 storage/app
chmod 777 -R storage/framework
chmod 777 -R storage/logs
php artisan serve 127.0.0.1 --port=8000
E-mail: [email protected]
Senha: 221568
php artisan queue:work
server {
root /opt/painel-whatsapp/public;
index index.php index.html index.htm;
server_name DOMINIO;
location / {
try_files $uri $uri/ /index.php?$query_string;
resolver 8.8.8.8 ipv6=off;
}
location ~ \.php$ {
try_files $uri $uri/ /index.php?$query_string;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
listen 80;
}
ln -s /etc/nginx/sites-available/painel /etc/nginx/sites-enabled/painel
certbot --nginx