• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Setup Separate Database Server on Rackspace Cloud

By Abhishek Ghosh July 1, 2014 7:41 am Updated on July 1, 2014

Setup Separate Database Server on Rackspace Cloud

Advertisement

If we setup a separate database server on Rackspace Cloud Server, the setup becomes more scalable and less vulnerable to security exploits. Yes, there is definitely Rackspace Deployment which automates the process, but for learning purpose or for custom, personalized need; we obviously need to know the step by step guides from command line. Normally, we always (and all in this world) give example of installing WordPress on one server.

So, in this guide, we will discuss the next step of configuring a setup on Rackspace Cloud. Here, we will use some terminologies which are specific to either Rackspace Cloud or OpenStack. One might not be able to use them on different IaaS provider. Obviously, the basic idea can be used on any IaaS provider running Linux as OS.

 

Setup Separate Database Server on Rackspace Cloud : First Things First

 

If you are migrating or planning to migrate your existing setup from one server; you must use two newly build Ubuntu instances. Guide for Installing WordPress on Rackspace Cloud Server is remaining the same in essence, but we will modify it to certain degree. We recommend to use :

Advertisement

---

  1. Rackspace Cloud Files as CDN
  2. Rackspace Load Balancer as to face the traffic

 

Thus, one must need to master the basics of one server configuration before the attempting to configure the setup in this way. A big plus for Rackspace is that – we are not billed for the Intranet bandwidth (Service Net), so one can calculate the end bill quite easily by simply multiplying the cost incurred by a server without assuming the bandwidth consumption.

 

Setup Separate Database Server on Rackspace Cloud

 

We are providing the example with a typical WordPress instance running on LAMP server. Here is the blueprint of the practical idea :

 
Setup Separate Database Server on Rackspace Cloud
 

So, on the main server, we need these set of operations ( Please Look at the old Hyperlinked guide for detailed steps ) :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
~  sudo apt-get install lamp-server^
~  cd /var/www/html && rm -r index.html
~  sudo nano /etc/apache2/apache2.conf
# add this lines and save
ServerName thecustomizewindows.com
# reload apache
~  sudo service apache2 restart
~  sudo apt-get install php5-curl php5-gd
~  sudo apt-get install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions libapt-pkg-perl -y
# some components will not be installed but that will not matter, the explanation is bigger
~  sudo service mysql stop
# see http://dev.mysql.com/doc/refman/4.1/en/automatic-start.html to stop mysql on reboot
# we installed mysql with lamp-server^ package
# download wordpress
~  wget http://wordpress.org/latest.tar.gz
# un-tar it
~  tar -xzvf latest.tar.gz
# cd to wordpress folder
~  cd wordpress
# move all the files to root
~  mv * ..
# dot dot ==> one level up in Linux

On the second server, we only need MySQL to run.

Vim
1
2
3
4
5
6
7
8
9
10
11
sudo apt-get install mysql-server
# edit the /etc/mysql/my.cnf file to configure the basic settings
like log file, port number, etc.
# For example, to configure MySQL to listen for connections from service net network host, change the
bind-address directive to the server's IP address:
~  sudo nano /etc/mysql/my.cnf
# change ip
bind-address            = 192.168.0.5
# guides on
# https://help.ubuntu.com/12.04/serverguide/mysql.html
# advanced http://dev.mysql.com/doc/refman/5.0/en/multiple-servers.html

Now, we have the Service Net IP of the database server. First we need to create a database, an database user and add password :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
~  mysql -u root -p
# MySQL Welcome message will appear. Do not copt " > "
> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)
> CREATE USER wordpressuser@localhost;
Query OK, 0 rows affected (0.00 sec)
> SET PASSWORD FOR wordpressuser@localhost= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)
> GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
> exit
Bye
~  
# wordpress, wordpressuse and password must be changed

While installing WordPress, you will use the Service Net IP, that will work fine. Behind load balancer, add your one server (other than the database server) and allow only port 80 to get exposed. Your main servers IPs are now masked by load balancer’s IP. Even if wp-config becomes accessible, it is practically impossible to get an access to the database server.
This is an abstract of the idea of how safe configurations are done on high load production server.

Tagged With how to connect database in practical aspect
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Setup Separate Database Server on Rackspace Cloud

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • How To Install WordPress on Ubuntu 13.10 on Rackspace Cloud Server

    This is a Step by Step Guide For the New Users With All the Commands To Install Wordpress on Ubuntu 13.10 on Rackspace Cloud Server.

  • Install WordPress on Rackspace Cloud Server (Ubuntu 14.04 PVHVM)

    Install Wordpress on Rackspace Cloud Server is Step by Step Guide with Commands to Setup you Domain on Ubuntu 14.04 PVHVM Unmanaged Server.

  • Installing WordPress on Rackspace Cloud Server with Cloud Database

    Installing WordPress on Rackspace Cloud Server with Cloud Database can give you a good performance with scalable and economically best solution. Simple Guide.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy