Add install_v2.sh
This commit is contained in:
parent
b9b40e3470
commit
6938555286
|
|
@ -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
|
||||
|
||||
Loading…
Reference in New Issue