Tower Panel Installation on a Server
A quick installation guide for a home server or a provider’s VPS.
Configuring an Ubuntu server for Tower
1. Install Ubuntu Server
Download the distribution
Create a bootable USB drive
Install Ubuntu Server 18.
2. Install LAMP
Install Apache2
sudo apt update && sudo apt install apache2
Install MySQL
sudo apt update && sudo apt install mysql-server
Install PHP
sudo apt update && sudo apt install php libapache2-mod-php php-mysql
Enable PHP short open tags
find /etc/php -type f -print0 | xargs -0 sed -i 's/short_open_tag = Off/short_open_tag = On/g'
Install PHP module
sudo apt -y install php-mbstring
Restart Apache
/etc/init.d/apache2 restart
apache2ctl restart
Install phpMyAdmin (optional)
sudo apt -y install phpmyadmin
If phpMyAdmin doesn’t open, append this line to the end of /etc/apache2/apache2.conf
include /etc/phpmyadmin/apache.conf
Restart Apache
/etc/init.d/apache2 restart
3. Install Tower
Install the unzip utility
sudo apt install unzip
Create the project directory and switch to it, for example:
mkdir /var/www/html
cd /var/www/html
Download the Tower panel
wget https://simroulette.com/tower/panel.zip
Unpack it into the current directory and remove the archive
unzip panel.zip
cp -a panel/. ./ && rm -rf panel panel.zip
Set directory permissions
chmod -R 767 /var/www/html
Enter MySQL console with your password
mysql -u root -p
Create the database
CREATE DATABASE tower;
Create a user for it
CREATE USER 'tower'@'localhost' IDENTIFIED BY '_your_password_';
Grant the user privileges on the database
GRANT ALL PRIVILEGES ON *.* TO 'tower'@'localhost';
Flush privileges
FLUSH PRIVILEGES;
Exit MySQL
quit
Set SQL mode TRADITIONAL in the MySQL configuration file; otherwise the panel may not work correctly
echo 'sql_mode = TRADITIONAL' >> /etc/mysql/mysql.conf.d/mysqld.cnf
Restart MySQL
service mysql restart
Later: if saving data to the DB does not work, change the SQL mode to NO_ENGINE_SUBSTITUTION in /etc/mysql/mysql.conf.d/mysqld.cnf
sql_mode = NO_ENGINE_SUBSTITUTION
Restart MySQL
service mysql restart
Open your server address in a browser and install Tower using:
Host: localhost
Username: tower
Password: _your_password_
Database Name: tower
Important! Be sure to copy the contents of the field “Path to the script directory on the server”.
Prepare CRON entries — replace _path_to_Tower_folder_ with the value you copied in the previous step (see above).
Enter the following in the terminal one by one:
echo "* * * * * /usr/bin/php _path_to_Tower_folder_/cron.php > _path_to_Tower_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_Tower_folder_/cron.php 10 > _path_to_Tower_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_Tower_folder_/cron.php 20 > _path_to_Tower_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_Tower_folder_/cron.php 30 > _path_to_Tower_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_Tower_folder_/cron.php 40 > _path_to_Tower_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_Tower_folder_/cron.php 50 > _path_to_Tower_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
Restart CRON
sudo /etc/init.d/cron restart