By default, the 14 days trial version will be installed.
You can then upgrade to the full version using a valid license key in the interface (Settings->Updates).
If you want to install directly the full version, replace the second line with
curl -Lo userTrack.zip https://www.uxwizz.com/download-latest-version?variant=rg&cv=6.4.0&license=YOUR_LICENSE_CODE
Remember to replace YOUR_LICENSE_CODE with the license code received via email and to change variant accordingly (wp for WordPress version, ag for the Agency Version).
Replace YOUR_ROOT_DATABASE_PASSWORD with the password chosen when you ran mysql_secure_installation.
cd /var/www/html
curl -Lo userTrack.zip https://www.uxwizz.com/trial-download
apt install unzip
unzip userTrack.zip
rm userTrack.zip
mv userTrack/* userTrack/.* .
find . -type d -exec chmod 0777 {} +
find . -type f -exec chmod 0666 {} +
rm userTrack -r
ust_rootp=YOUR_ROOT_DATABASE_PASSWORD
ust_db=uxwizz
ust_user=uxwizz
ust_password="$(openssl rand -base64 12)"
mysql -u root -p"$ust_rootp" -e "CREATE DATABASE $ust_db /*\!40100 DEFAULT CHARACTER SET utf8 */;"
mysql -u root -p"$ust_rootp" -e "CREATE USER $ust_user@'%' IDENTIFIED BY \"$ust_password\";"
mysql -u root -p"$ust_rootp" -e "GRANT ALL PRIVILEGES ON $ust_db.* TO $ust_user@'%';FLUSH PRIVILEGES;"
sed -i "s*password = ''*password = '$ust_password'*" server/dbconfig.php
sed -i "s*username = 'root'*username = '$ust_user'*" server/dbconfig.php
sed -i "s*db_name = 'uxwizz'*db_name = '$ust_db'*" server/dbconfig.php
apt-get install php-zip -y
a2enmod headers rewrite
systemctl restart apache2
If, after the installation you need to see the database connection credentials, the values are stored in server/dbconfig.php.
Note: If accessing yoursite.com/servershows the Directory listing instead of 'Forbidden', it means that .htaccess files don't work properly. To fix this, set AllowOverride to All in your Apache2 config. You can automatically set it, assuming default paths, by running this command:
sudo sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
Certbot is used to generate a free certificate and manage its auto-renewal.