http://www.bookedscheduler.com/
Helpful Links
- https://support.rackspace.com/how-to/set-up-apache-virtual-hosts-on-ubuntu/
- https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
Install required packages
sudo apt-get update
sudo apt-get install -y curl unzip nano vim
# install web server
sudo apt-get install -y apache2 php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-gd
# install mysql server
sudo apt-get install -y mysql-server
On Prompt, enter Password for root
user
While not mandatory, it is highly recommended that you set a password for the MySQL administrative "root" user.
If this field is left blank, the password will not be changed.
New password for the MySQL "root" user:
Start Apache
sudo /etc/init.d/apache2 restart
Update ServerName Response You will see this error each time you restart the server
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
To fix it, we need to edit the Apache configuration file and add a ServerName.
The below command will append this line ServerName web-01
to the bottome of the apache2.conf
file. You can use any name you like
as long as it adheres to a standard domain name.
echo "ServerName web-01" >> /etc/apache2/apache2.conf
Next, restart the server You should no longer see the message
sudo /etc/init.d/apache2 restart
Test Apache is Working
curl -I http://127.0.0.1
You should see HTTP/1.1 200 OK
displayed in the terminal.
Step 4: Install Website
# downloads the latest code and saves it to /tmp/booked.zip
curl -L -o /tmp/booked.zip https://sourceforge.net/projects/phpscheduleit/files/latest/download
# places it within the web directory
sudo unzip /tmp/booked.zip -d /var/www
# removes the default site
sudo rm -rf /var/www/html
# links booked to the default site
sudo ln -s /var/www/booked /var/www/html
# updates the permissions so apache owns the site
sudo chown www-data:www-data -R /var/www/booked
Enable Follow Of Symlinks
sudo nano /etc/apache2/sites-available/000-default.conf
# or sudo vim /etc/apache2/sites-available/default
Add the following before </VirtualHost>
.
So long as it is inside these tags <VirtualHost>...HERE...</VirtualHost>
, it should be ok.
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Next, Copy Starter Config File
sudo mv /var/www/html/config/config.dist.php /var/www/html/config/config.php
Next, Update Permissions
sudo chmod -R 0755 /var/www/booked/tpl_c
sudo chmod -R 0755 /var/www/booked/tpl
sudo chmod -R 0755 /var/www/booked/uploads
Verify PHP Session AutoStart is Disabled
sudo cat /etc/php/7.0/apache2/php.ini | grep session.auto_start
# cat /etc/php5/apache2/php.ini | grep session.auto_start
You should see session.auto_start = 0
If the value is not 0, edit the file to fix it.
Restart Apache and Test
sudo /etc/init.d/apache2 restart
curl -I http://127.0.0.1
Again, you should see: HTTP/1.1 200 OK
Step 5: Configure MySQL
We need to first start the server.
Start the Server
sudo /etc/init.d/mysql start
Change Username/Password
Edit the following file and change the username and password: GRANT ALL PRIVILEGES ON *.* TO 'booked_user'@'localhost' IDENTIFIED BY 'password';
nano /var/www/html/database_schema/full-install.sql
# sudo vim /var/www/html/database_schema/full-install.sql
Install Database
sudo sh -c "mysql -u root -p < /var/www/html/database_schema/full-install.sql"
# Enter password:
Step 6: Update Settings
Edit the settings to match database name and username/password.
sudo nano /var/www/html/config/config.php
Example
// ...
$conf['settings']['script.url'] = 'http://localhost/Web'; // fix this URL to the correct one
// ...
$conf['settings']['admin.email'] = '[email protected]';
// ...
$conf['settings']['database']['type'] = 'mysql';
$conf['settings']['database']['user'] = 'booked_user'; // database user with permission to the booked database
$conf['settings']['database']['password'] = 'password';
$conf['settings']['database']['hostspec'] = '127.0.0.1'; // ip, dns or named pipe
$conf['settings']['database']['name'] = 'booked'; // changed to match the full-install.sql
Done
Visit: http://YOUR_DOMAIN_OR_IP/Web/register.php Use the same email address entered on
- Advanced settings were not added
- Email settings were not added or tested
- Firewall allowances for port 80 By using curl with http://127.0.0.1 we are testing the server does work. If it is not working in the browser, you may need to open ports 80 and 443.
- Does not cover HTTPS and adding SSL