Keeping track of hundreds of different passwords for hundreds of different websites is not only a pain, but it leads to poor security practices. Protocols such as OAuth and OpenID have provided single sign-on support, which eventually expanded to use social media platforms such as LinkedIn, Twitter, and Facebook. Once you have single sign-on support […]
Keeping track of hundreds of different passwords for hundreds of different websites is not only a pain, but it leads to poor security practices. Protocols such as OAuth and OpenID have provided single sign-on support, which eventually expanded to use social media platforms such as LinkedIn, Twitter, and Facebook. Once you have single sign-on support across multiple websites and services, you have the added benefit of tracking users across platforms.
Janrain offers a single sign-on solution complete with customer identity and access-management tools. They offer a range of products, but in this tutorial we will show you how to deploy WordPress with the Janrain Engage plugin on CenturyLink Cloud services. This provides you with a solid base on which to build a cross-platform social media customer identity solution.
If you don’t have a CenturyLink Cloud account yet, head over to our website and activate an account. You’ll need it to use CenturyLink Cloud tools.
You will also need a Janrain account. Visit the Janrain sign-in page to create one.
CenturyLink Cloud Compute servers are high-performance cloud servers. These enterprise-grade virtual machines are easy to deploy and manage from the CenturyLink Cloud Console and via our powerful API.
CenturyLink Cloud MySQL is a cloud-hosted managed relational database solution. It is backed by 100% flash storage, and automatically scales to handle even the most demanding workloads.
Our first step is to deploy a new CenturyLink Cloud virtual server. Follow the steps below.
On the left side menu, click Infrastructure and then Servers.
On the left-hand side of the server panel, click on the region for the server we will provision.
Your server provisioning request will enter the queue. You can watch the progress of your request on the screen. Your server is provisioned when the status of all tasks in the queue is complete.
After your new server is provisioned, in the CenturyLink control portal, click Infrastructure on the left side menu, then click Servers.
Next, we will provision a new CenturyLink Cloud MySQL database. Follow the steps below.
In the "Create Database" form, select "MySQL" for the engine.
For "location", pick a data center close to the one you selected for your virtual server.
This section is based on the WordPress Famous 5-Minute Install, but we will guide you through the configuration options for each step.
To get Janrain and WordPress configured properly, you will need to create a DNS "A" record so you can refer to your server properly. There are too many ways to handle DNS configuration to cover in this tutorial, so we can't walk you through the whole process. However, you will need your virtual server's public IP address to configure DNS. Follow these steps to find it.
From a shell or terminal on your local machine, connect to your virtual server with the following command. Replace "YOUR.HOST.NAME" with your server's hostname.
Install the required Ubuntu packages with the following commands.
apt update apt-get install lamp-server^ postfix -y a2enmod rewrite service apache2 restart
Download and install the WordPress package.
wget -O wordpress.tar.gz https://wordpress.org/latest.tar.gz cd /var/www/html/ tar --strip-components=1 -xvzf ~/wordpress.tar.gz cp wp-config-sample.php wp-config.php rm index.html
Next, we need to prepare the CenturyLink Cloud MySQL database that we created earlier. For this step, you will need the following configuration values from the "Provision a CenturyLink MySQL Database" section.
From the shell prompt on your virtual server, run
ifconfig to get your server's private IP address. In the example below, it is "10.80.109.12", highlighted.
Run the following command to configure the database. Replace "CONNECTION_HOST", "CONNECTION_PORT", "USERNAME", and "PASSWORD" with the configuration values for your CenturyLink Cloud MySQL database.
mysql -h CONNECTION_HOST -P CONNECTION_PORT -u USERNAME -pPASSWORD
At the "mysql>" prompt, run the following commands. Replace "PRIVATE.VPS.IP" with your private IP address. Replace "USERNAME" and "PASSWORD" with the configuration values for your CenturyLink MySQL database. Each command should produce a "Query OK" response.
CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'USERNAME'@'PRIVATE.VPS.IP' IDENTIFIED BY 'PASSWORD'; FLUSH PRIVILEGES; EXIT
Next, we will configure WordPress to connect to the MySQL database we just created. The following commands will be run in the shell on your virtual server.
Run the following command to make sure you're in the correct directory.
In your favorite text editor, open wp-config.php. Look for the line that says
/** MySQL settings - You can get this info from your web host **/ and edit the section under it to look like the following. Replace "CONNECTION_HOST", "CONNECTION_PORT", "USERNAME", and "PASSWORD" with the configuration values for your CenturyLink Cloud MySQL database.
/** The name of the database for WordPress */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'USERNAME'); /** MySQL database password */ define('DB_PASSWORD', 'PASSWORD'); /** MySQL hostname */ define('DB_HOST', 'CONNECTION_HOST:CONNECTION_PORT'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
Run the following commands to make sure permissions are set correctly and the web server is running.
chown -R www-data.www-data /var/www/html/ service apache2 restart
To finish the configuration of your new WordPress installation, follow these steps.
Before we add the WordPress plugin, we need to create a new Janrain Engage application to support social login. Follow these steps.
Click Create an App next to "Engage".
Follow the instructions on the app creation wizard.
Finally, we will add the Janrain Engage plugin to your WordPress installation and configure it. Follow the steps below:
Your WordPress application will now have social login and registration for users. You can see it in action on the admin login form or on blog post comment forms.
Janrain offers a wide variety of powerful social user management tools. Once you have Janrain Engage working in WordPress, you can explore further integration in other applications. Leveraging the capabilities of the CenturyLink Cloud with social user management brings the full power of distributed cloud-based applications to your project.
We’re a different kind of cloud provider – let us show you why.