Install WordPress on Rackspace Cloud Server is Step by Step Guide with Commands to Setup you Domain on Ubuntu 14.04 PVHVM Unmanaged Server. We assume that the reader has zero idea about anything but want a solid performing website. Actually you can have three kind of Operating System on your Computer, for Windows users; there is no Terminal App, so you need to download and install PuTTY. We will use PVHVM Virtualization Mode to build image for better performance. For Linux, there is Terminal App and for Mac / OS X; either use the default Terminal App or use iTerm2. We use iTerm2 and the setup described on the linked article.
Install WordPress on Rackspace Cloud Server : Preparation
Rackspace Cloud Server is a part of IaaS, the virtual servers will be blank for the highest performance. They will not have any Control Panel like cPanel. We will add Webmin as an optional step – it is a light weight advanced control panel. For MySQL database administration, we will install PHPMyAdmin. You must own a fully qualified domain name. It can be domain like thecustomizewindows.com
or a subdomain like noexist.thecustomizewindows.com
if the main domain record exists on your Rackspace Cloud Account. You must point your domain towards :
1 2 | dns1.stabletransit.com dns2.stabletransit.com |
from your the account of your domain registerer. Now, go to Cloud Server webpage on Racksoace Cloud account and spin a server of 2GB with Ubuntu 14.04 PVHVM image, make sure to tick the networking (both IP V6 and IPv4). Give it a name. You’ll get the IP and now go to Cloud DNS. Add your domain name and at least these entries :
---
1 2 3 4 5 6 7 | thecustomizewindows.com IP-V4 A/AAAA www.thecustomizewindows.com IP-V4 A/AAAA NS dns1.stablestransit.com NS dns2.stablestransit.com CNAME IP-V4 ftp.thecustomizewindows.com IP-V4 # where IP-V4 is the full IP of your server |
Open any plain text editor like Notepad on Windows or TextEdit ( use Plain Text mode) or Gedit. By now, if you open Cloud Server page, the automatically generated password will show up. Copy it and paste on the Text Editor. Also, the SSH command to SSH and login to the server will show up. Copy paste it on the Text Editor.
Install WordPress on Rackspace Cloud Server : Preparation
Rules : Tilde (~) represents a command, you must not copy that part and paste to your command line tool. Hash ( # ) represents our instruction.
Rackspace builds from their own mirror, repo are hourly update, yet as a convention; update and upgrade your server after you type the command to login and agree to save the RSA key to known_hosts file, some what like these :
1 2 3 4 5 6 7 8 9 10 11 | ~ ssh root@23.253.218.181 # do not copy paste anything on your Terminal window before the # command like spaces, hash before the S of ssh # output The authenticity of host '23.253.218.181 (23.253.218.181)' can't be established. ECDSA key fingerprint is 89:35:46:1b:cb:77:14:8f:86:54:36:38:bt:3c:fa:c0. Are you sure you want to continue connecting (yes/no)? # press y and hit Enter key # welcome message # update and upgrade. && joins two commands ~ sudo apt-get update && sudo apt-get update |
Next step is to change the automated password :
1 2 3 | ~ passwd # it will ask to enter a new UNIX password and repeat it # no password will be visible as masked characters - nothing will appear |
This is a basic dev setup, we are not creating an user, editing firewall policies etc. Install LAMP server with one command :
1 2 | ~ sudo apt-get install lamp-server^ # MySQL will ask for password, fill them and copy paste on your notepad |
Point your browser towards the domain name or the IP address; it should open Ubuntu’s default Apache Webpage with some information. It is likely that your web root will be at :
1 | /var/www/html |
Install PHPMyAdmin :
1 2 3 | ~ sudo apt-get install phpmyadmin # Select Apache2 as server # Select YES when asked about whether to Configure the database for phpmyadmin with dbconfig-common |
Now, open and edit the apache2.conf
file :
1 2 3 4 5 6 | ~ sudo nano /etc/apache2/apache2.conf # add these two lines and save Include /etc/phpmyadmin/apache.conf ServerName thecustomizewindows.com # reload apache ~ sudo service apache2 restart |
Point your browser towards your domain or IP slash phpmyadmin, it should work now :
1 2 3 | http://your-domain.com/phpmyadmin # or your IP http://your-IP-V4/phpmyadmin |
Install PHP5 GD :
1 2 | ~ sudo apt-get install php5-curl php5-gd # required for WordPress and Cloud Files upload |
We will install webmin UNIX admin panel :
1 2 3 4 5 6 | ~ 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 ~ cd /root && wget http://prdownloads.sourceforge.net/webadmin/webmin_1.630_all.deb # we used older version ~ dpkg -i webmin_1.630_all.deb # done, your userid and password will be same that of to login to shell |
Login to webmin :
1 | https://your-IP-V4:10000 |
Login and update, upgrade the webmin panel.
As a caution, do not keep the PHPMyAdmin and webmin accessible in this way. Add htaccess password for PHPMyAdmin and the port of webmin panel – these are advanced steps and discussed here.
So, you got every needed graphical interfaces. Now to Install WordPress, first create a database user, database, set password and privileges :
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 |
Now go to public folder and delete the default index.html file :
1 2 3 4 5 6 7 8 9 10 11 12 13 | ~ cd /var/www/html # remove the default file ~ rm index.html # 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. In OSX / any UNIX it is one dot # alternatively, login to FTP via FileZilla, go to /var/www/html and move all the files from /var/www/html/wordpress to /var/www/html |
It is important to set ownership and chmod values properly. We should give ownership and set permission properly :
1 2 3 | ~ sudo chown root:www-data /var/www/html -R ~ sudo chmod g+w /var/www/html -R ~ sudo chgrp -R www-data /var/www/html |
You should be able to run the WordPress installation script if you point your browser to your domain name. We used domain name as if we install with IP, the WordPress database will bear the IP as site url, which again we have to change.
Install WordPress on Rackspace Cloud Server : What is Next Steps
There are many steps. With this guide, you can run WordPress nicely. But you will face some issues; like server might not allow auto update or you can not upload files. We have specific guides for them, come back to our website and search with the issue.
We have created a video, you can watch it :
There are many things to do as the next steps like adding an user, setting the firewall, hardening the Linux kernel, optimizing MySQL, installing APC and optimization of APC. These mostly are discussed previously as separate guides and we want that you get used with only the commands above first.
Tagged With GY2P