Today, we will show you how to install SilverStripe on an Ubuntu 16.04 VPS using the Apache web-server and a MySQL database.
SilverStripe is popular and widely-used open source CMS. It uses the SilverStripe framework (previously Sapphire Framework). Because of the framework, developers can easily customize and extend the CMS and make it their own. With SilverStripe, you can create websites and applications with ease. It has all the features you’d need in a CMS. SilverStripe is a popular choice when looking for an alternative CMS to WordPress. It is fairly easy to install SilverStripe on an Ubuntu 16.04 VPS. The installation process should take about 5-10 minutes if you follow the very easy steps described below.
Requirements
At the time of writing this tutorial, SilverStripe 3.6.1 is the latest stable version available and it requires:
– Apache web server;
– PHP (5.3.3+, <7.2) along with the mbstring, curl, zip, bcmath, xml, tidy, gd and mcrypt extensions. They are most generally active by default on a standard php installation.
– MySQL(version 5.0 or higher) installed on your Linux VPS;
First of all login to your Ubuntu 16.04 VPS via SSH as user root
ssh root@IP_address
At the very beginning, it is best to start a screen session by executing the following command
screen -U -S sstripe
Update the system:
apt-get update && apt-get -y upgrade
Make sure to always keep your server up to date.
Install MariaDB 10.0
To install MariaDB, run the following command:
apt-get install -y mariadb-server
Next, we need to create a database for our Silverstripe installation.
mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE sstripe; MariaDB [(none)]> GRANT ALL PRIVILEGES ON sstripe.* TO 'sstripe'@'localhost' IDENTIFIED BY 'your-password'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> \q
Do not forget to replace ‘your-password’ with a strong password.
Install Apache2 web server
[user]$ sudo apt-get install apache2
Install PHP and required PHP modules
To install the latest stable version of PHP version 7 and all necessary modules, run:
[user]$ sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mbstring php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-bcmath php7.0-xml php7.0-json php7.0-tidy
Enable the Apache2 rewrite module if it is not already done:
[user]$ sudo a2enmod rewrite
In order to activate the new configuration, restart the Apache web server using the following command:
[user]$ sudo service apache2 restart
Download and install SilverStripe
Download and extract the latest version of SilverStripe on your server:
[user]$ sudo cd /opt && wget https://silverstripe-ssorg-releases.s3.amazonaws.com/sssites-ssorg-prod/assets/releases/SilverStripe-cms-v3.6.1.zip [user]$ sudo unzip SilverStripe-cms-v3.6.1.zip -d sstripe [user]$ sudo mv sstripe/ /var/www/html/sstripe
All files have to be readable by the web server, so we need to set a proper ownership
[user]$ sudo chown www-data:www-data -R /var/www/html/sstripe/
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘sstripe.conf’ on your virtual server:
[user]$ sudo touch /etc/apache2/sites-available/sstripe.conf [user]$ sudo ln -s /etc/apache2/sites-available/sstripe.conf /etc/apache2/sites-enabled/sstripe.conf [user]$ sudo nano /etc/apache2/sites-available/sstripe.conf
Then, add the following lines:
<VirtualHost *:80> ServerAdmin admin@yourdomain.com DocumentRoot /var/www/html/sstripe/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/sstripe/> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost>
Restart the Apache web server for the changes to take effect:
[user]$ sudo service apache2 restart
Open your favorite web browser, navigate to http://your-domain.com/ and if you configured everything correctly the SilverStripe installer should be starting. You should follow the easy instructions on the install screen inserting the necessary information as requested.
That is it. The SilverStripe installation is now complete.
Of course, you don’t have to do any of this if you use one of our Software Installation services, in which case you can simply ask our expert Linux admins to install SilverStripe for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please, share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.