Instalação NGINX + Wordpress Ubuntu 22.04

De Gigafull
Revisão de 09h04min de 12 de abril de 2023 por Admin (discussão | contribs)
Ir para navegação Ir para pesquisar

Ubuntu Server 22.04

apt install net-tools -y
apt install nmap -y
apt install apache2 -y
apt install mysql-server -y
apt install php libapache2-mod-php php-mysql php-curl php-gd php-json php-zip -y
sudo apt update -y
sudo apt upgrade -y
sudo systemctl restart apache2
sudo mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'grtewUBINOP89UBio';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
FLUSH PRIVILEGES;
exit;
mkdir /var/www/wiki

vim /etc/apache2/sites-available/wiki.gigafull.com.br.conf

<VirtualHost *:80>
   ServerName wiki.gigafull.com.br
   DocumentRoot /var/www/html/wiki
   <Directory /var/www/html/wiki>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Require all granted
   </Directory>
   ErrorLog ${APACHE_LOG_DIR}/wiki_error.log
   CustomLog ${APACHE_LOG_DIR}/wiki_access.log combined
</VirtualHost>
a2ensite wiki.gigafull.com.br.conf
systemctl reload apache2
vim /etc/hosts
127.0.0.1 wiki.gigafull.com.br
::1 wiki.gigafull.com.br


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>
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.