Add install_v2.sh

This commit is contained in:
RomanNum3ral 2025-11-03 20:19:02 +00:00
parent b9b40e3470
commit 6938555286
1 changed files with 29 additions and 0 deletions

29
install_v2.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
apt update && apt upgrade -y
apt install -y apache2 ghostscript libapache2-mod-php mysql-server php php-bcmath php-curl php-imagick php-intl php-json php-mbstring php-mysql php-xml php-zip
mkdir -p /srv/www
chown www-data: /srv/www
curl https://wordpress.org/latest.tar.gz | sudo -u www-data tar zx -C /srv/www
echo "<VirtualHost *:80>
DocumentRoot /srv/www/wordpress
<Directory /srv/www/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /srv/www/wordpress/wp-content>
Options FollowSymLinks
Require all granted
</Directory>
</VirtualHost>" >> /etc/apache2/sites-available/wordpress.conf
a2ensite wordpress
a2enmod rewrite
a2dissite 000-default
service apache2 reload