Are you wanting to set up a new thirty bees site on your own private Digital Ocean VPS account? Digital Ocean is a great choice for hosting a low cost thirty bees site if you are technically inclined. This article will show you how to install thirty bees on the 16.04 LAMP stack One-click App.
The first thing you will need to do is to log into your Digital Ocean account. If you do not already have a Digital Ocean account, you can get started here. Once you get signed in, You will need to click Create link in the top right corner of the site. From there choose the One-click App for LAMP on 16.04. This will install a Linux, Apache, MySQL, and PHP stack on the server.
Then you can select the size of the droplet. For this tutorial I am going to use the 2 GB droplet size just because it is a little bit faster. thirty bees can run on any of the droplet sizes that Digital Ocean offers though. Next you can select which data center you want to use. I always recommend selecting the data center that is geographically closest to your customer base. I am going to use New York 1 for this test. Now you can click create and your droplet will be created.
Setting up the droplet
Unfortunately the default installation of the droplets do not contain all of the software needed to run thirty bees. So we will need to install some software to get the droplet compatible with thirty bees. You will need to ssh into your droplet and install a few things before you can start the thirty bees installation. After you launch your droplet you will get an email with all the information you need to log into your droplet.
When you log in the first thing you will need to install is the php extension simplexml and also zip. Run the commands below to install these.
Update the software on the server first
sudo apt-get update
sudo apt-get install php7.0-xml
Install PHP zip
sudo apt-get install php7.0-zip
Install PHP BcMath
sudo apt-get install php7.0-bcmath
sudo apt-get install php7.0-mbstring
Install Mod Rewrite for Apache
sudo a2enmod rewrite
service apache2 restart
Install unzip on the server
sudo apt-get install unzip
Now change your directory to the webroot
Now download thirty bees to the server (the url will change over time with updates, look on our Github releases page for the latest zip archive url)
Once you get the files unzipped, you will need to own them by the web user since you are logged in with the root account
chown -R www-data:www-data /var/www/html
Now point your web browser to the IP address that Digital Ocean assigned to your server. If everything worked well you you should see the thirty bees installer and you can start the installation. Do not close your shell window, you will still need it.
Once you get to the step in the installer that needs your database information we need to go back to the shell window and create the database.
Run this command to show the password for MySQL
Now copy the password to your clipboard, the part of the password between the “”
Now you want to open MySQL so you can create the database
mysql -u root -p
Your command prompt should turn to a MySql prompt that looks like this mysql> Now you can create the database
CREATE DATABASE thirtybees;
Now you have created a database named thirtybees with the root user using the root password. You can enter this in your thirty bees installer and continue the installation.
After your shop is created you will need to delete your installation directory and rename your admin directory. You can do that with the two commands below. In the last command you can replace myadmin with any directory name you want for your back office login.
rm -R /var/www/html/install
mv /var/www/html/admin /var/www/html/myadmin
Now you can go to your new back office you just created and enjoy your shop!