Mudanças entre as edições de "Instalação NGINX + Wordpress Ubuntu 22.04"
Ir para navegação
Ir para pesquisar
Linha 6: | Linha 6: | ||
sudo apt upgrade -y | sudo apt upgrade -y | ||
− | sudo apt install | + | sudo apt install apache2 -y |
− | |||
− | |||
− | |||
sudo apt install mysql-server -y | sudo apt install mysql-server -y | ||
− | |||
− | mysql -u root -p | + | sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-json php-zip -y |
− | CREATE DATABASE | + | |
− | CREATE USER ' | + | vim /etc/apache2/mods-enabled/dir.conf |
− | GRANT ALL PRIVILEGES ON | + | <IfModule mod_dir.c> |
+ | DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm | ||
+ | </IfModule> | ||
+ | |||
+ | sudo systemctl restart apache2 | ||
+ | |||
+ | sudo mysql -u root -p | ||
+ | CREATE DATABASE wordpress; | ||
+ | CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'senha'; | ||
+ | GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost'; | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
− | + | exit; | |
− | + | cd /tmp | |
+ | curl -O https://wordpress.org/latest.tar.gz | ||
+ | tar xzvf latest.tar.gz | ||
− | sudo | + | sudo rsync -avP /tmp/wordpress/ /var/www/html/ |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | sudo chown -R www-data:www-data /var/www/html/ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Acesse o site do WordPress em um navegador da web através do IP do servidor e siga as instruções para concluir a configuração. | |
− | |||
− |
Edição das 09h14min de 10 de abril de 2023
Ubuntu Server 22.04
apt install net-tools -y
sudo apt update -y sudo apt upgrade -y
sudo apt install apache2 -y
sudo apt install mysql-server -y
sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-json php-zip -y
vim /etc/apache2/mods-enabled/dir.conf <IfModule mod_dir.c> DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm </IfModule>
sudo systemctl restart apache2
sudo mysql -u root -p CREATE DATABASE wordpress; CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'senha'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost'; FLUSH PRIVILEGES; exit;
cd /tmp curl -O https://wordpress.org/latest.tar.gz tar xzvf latest.tar.gz
sudo rsync -avP /tmp/wordpress/ /var/www/html/
sudo chown -R www-data:www-data /var/www/html/
Acesse o site do WordPress em um navegador da web através do IP do servidor e siga as instruções para concluir a configuração.