apt install gnupg -y

wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
dpkg -i mysql-apt-config_0.8.15-1_all.deb
apt-get update
apt-get install mysql-server -y

apt-get update
export LANG=C.UTF-8
apt-get install -y software-properties-common
add-apt-repository -y ppa:ondrej/php
add-apt-repository -y ppa:ondrej/apache2
add-apt-repository -y ppa:certbot/certbot
apt-get update
apt-get install -y curl zip unzip
apt install php7.2-fpm php7.2-common php7.2-cli php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-mbstring php7.2-bcmath php7.2-imap php7.2-xml php7.2-zip
apt-get install apache2 libapache2-mod-php7.2 mysql-server -y
echo "<Directory /var/www/html>" >> /etc/apache2/sites-enabled/000-default.conf
echo "Options Indexes FollowSymLinks MultiViews" >> /etc/apache2/sites-enabled/000-default.conf
echo "AllowOverride All" >> /etc/apache2/sites-enabled/000-default.conf
echo "Order allow,deny" >> /etc/apache2/sites-enabled/000-default.conf
echo "Allow from all" >> /etc/apache2/sites-enabled/000-default.conf
echo "</Directory>" >> /etc/apache2/sites-enabled/000-default.conf
echo "Protocols h2 h2c http/1.1" >> /etc/apache2/apache2.conf
a2enmod rewrite
a2enmod proxy_fcgi proxy proxy_http http2 ssl expires headers rewrite proxy_fcgi setenvif actions fastcgi alias
a2enconf php7.2-fpm
a2enmod http2
a2dismod php7.2
a2dismod mpm_prefork
a2enmod mpm_event
service apache2 restart

#vhost
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"
</FilesMatch>

#Laravel
apt-get update && apt-get upgrade -y
apt-get install -y python-software-properties software-properties-common
add-apt-repository -y ppa:ondrej/php
apt-key update
apt-get update
apt-get install -y curl zip unzip php7.2-fpm php7.2-gd php7.2-mbstring php7.2-xml php7.2-curl
apt-get install -y apache2 libapache2-mod-php7.2
apt-get install -y mysql-server php7.2-mysql
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
cd /var/www/html
composer install
chown -R www-data.www-data /var/www/html
chmod -R 755 /var/www/html
chmod -R 777 /var/www/html/storage
mv .env.example .env
php artisan key:generate
php artisan migrate

#vhost
nano /etc/apache2/sites-available/test.com.conf
<VirtualHost *:80>
ServerAdmin admin@test.com
ServerName test.com
ServerAlias www.test.com
DocumentRoot /var/www/html/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
a2ensite test.com.conf
service apache2 restart


$letenscrypt
apt-get install -y python-software-properties software-properties-common
add-apt-repository -y ppa:certbot/certbot
apt-key update
apt-get update
apt-get install python-certbot-apache -y
certbot --apache -d example.com
certbot -d example.com -d *.example.com --manual --preferred-challenges dns certonly

apt update
apt install default-jdk -y
groupadd -r wildfly
useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
wget https://dl.dropboxusercontent.com/s/1zjo8zkws7s637d/wildfly.tar.gz -P /tmp
tar xf /tmp/wildfly.tar.gz -C /opt/
chown -RH wildfly: /opt/wildfly
mkdir -p /etc/wildfly
cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
sh -c 'chmod +x /opt/wildfly/bin/*.sh'
cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
ufw disable
systemctl enable wildfly
/opt/wildfly/bin/add-user.sh
mkdir /var/run/wildfly/
chown wildfly: /var/run/wildfly/
systemctl daemon-reload
systemctl restart wildfly
rm -rf /tmp/wildfly.tar.gz

 

https://drive.google.com/file/d/1tTBHdu7gO8hRl2LfsD8AJjmHouS55ZVH/view?usp=drivesdk