• 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 » Install WordPress on HP Cloud (Ubuntu, Nginx)

By Abhishek Ghosh December 10, 2014 11:18 pm Updated on January 25, 2015

Install WordPress on HP Cloud (Ubuntu, Nginx)

Advertisement

Here is step by step guide to install WordPress on HP Cloud with one Database Server and one Web server on Ubuntu and Nginx PHP5-FPM platform. There are some differences with the other kind of Public Cloud instances and HP Helion Public Cloud. We are writing about HP Helion Public Cloud, by the way; HP Cloud is not exactly the right word. You must read out previous guides – Router and Subnet Settings on HP Cloud and HP Cloud FTP/SFTP Setup, to make sure that the setup are right and publicly available.

 

Install WordPress on HP Cloud (Ubuntu, Nginx) : Basics

 

Two server configuration is considered to be difficult setup, yet this is the right setup for proper scaling. You will select Ubuntu latest LTS partner image while creating the instances (which is 14.04 at the time of writing). You can connect with the database server using the internal IP which looks like 10.0.0.x. You can disassociate the Floating IP to the database server instance when you do not need to SSH. This will ensure strict security.

 

Install WordPress on HP Cloud : Create Database Server

 

SSH to the instance with allotted and associated floating IP :

Advertisement

---

Vim
1
2
3
cd /path/to/hp-cloud/pem-file
ssh -i your-downloaded-key.pem ubuntu@your-IP
# change your-downloaded-key.pem and your-IP

Get sudo privilege and cd to /root :

Vim
1
2
3
4
sudo su
# or
# sudo su -
cd /root

It will throw error as domain name is not set, but it will not matter. Update and upgrade :

Vim
1
2
3
4
5
6
apt-get update -y && apt-get upgrade -y
apt-get dist-upgrade -y
## optionally reboot the instance
# reboot
## login again and run
# sudo su && cd /root

Only install MySQL server :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
apt-get install mysql-server
# you will be prompted for providing a password
# 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 internal network, change the
#bind-address directive to the server's IP address:
nano /etc/mysql/my.cnf
# change ip
bind-address            = 10.0.0.x
# change the x
# guides on
# https://help.ubuntu.com/12.04/serverguide/mysql.html
# advanced http://dev.mysql.com/doc/refman/5.0/en/multiple-servers.html
# Edit to use innodb engine by default
## ^ + O writes the file, ^ + X exits
# restart mysql
service mysql restart

We need to create a database and an user :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
mysql -u root -p
# MySQL Welcome message will appear with " > "
# ' and ™ are not same, you should use '
# you should manually correct our basic example
# take that 10.0.0.1 is the database server
CREATE USER 'abhishekghosh'@'10.0.0.2' IDENTIFIED BY 'put-password-here';
# take that 10.0.0.2 is the web server
CREATE USER 'abhishekghosh'@'10.0.0.1' IDENTIFIED BY 'put-password-here';
# abhishekghosh is database user
GRANT SELECT,DELETE,INSERT,UPDATE ON wordpress.* TO 'abhishekghosh'@'10.0.0.2';
# wordpress is the database name
GRANT SELECT,DELETE,INSERT,UPDATE ON wordpress.* TO 'ahishekghosh'@'10.0.0.1';
GRANT ALL PRIVILEGES ON wordpress.* TO 'abhishekghosh'@'10.0.0.2';
FLUSH PRIVILEGES;
show databases;
# you will see the table with wordpress named database
# there can be typographical error in our example due to
# forced chanced of ' and ™
# correct the things before running the command
# exit from mysql and ssh
exit
exit

People installs PHPMyAdmin for this small works. No need.

 

Install WordPress on HP Cloud : Create Web Server

 

Rinse, wash, rinse and repeat! SSH to the instance with allotted and associated floating IP :

Vim
1
2
3
cd /path/to/hp-cloud/pem-file
ssh -i your-downloaded-key.pem ubuntu@your-IP
# change your-downloaded-key.pem and your-IP

Get sudo privilege and cd to /root :

Vim
1
2
3
4
sudo su
# or
# sudo su -
cd /root

It will throw error as domain name is not set, but it will not matter. Update and upgrade :

Vim
1
2
3
4
5
6
apt-get update -y && apt-get upgrade -y
apt-get dist-upgrade -y
## optionally reboot the instance
# reboot
## login again and run
# sudo su && cd /root

Vim
1
netstat -natu

If port 80 is not listening, nginx can not open it. Simple. On HP Cloud, OS software based firewall is not much of importance. You can control from one level up. Build an Instance with Ubuntu 14.04 LTS AMD64 Partner Image. 4 GB is great, you can use 2 GB for lesser traffic. Practically, more the number of cores, nginx works more better plus xcache works faster with more RAM.

SSH to the instance. You are not root user, initially using sudo once, do not disturb the installation process. Yet, we are providing the commands with sudo. First, fully update the instance :

Vim
1
2
3
4
sudo apt-get update -y && sudo apt-get upgrade
# check if there is anything suspicious, if not great
# proceed. These lines with # are not commands
sudo apt-get dist-upgrade -y

We will run WordPress. Run these :

Vim
1
2
3
sudo apt-get install python-software-properties
# if it ask something, accept it
apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-imap php5-mcrypt

Run auto-remove to get rid off stuffs not needed :

Vim
1
sudo apt-get autoremove

Install Nginx :

Vim
1
2
3
4
sudo add-apt-repository ppa:nginx/stable
# accept anything if asked
sudo apt-get update -y
sudo apt-get install nginx

Reboot the instance once as we have upgraded lot of stuffs :

Vim
1
sudo reboot

Again SSH to the instance. Install these things :

Vim
1
apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-xcache

Yeah, php5-curl and php5-gd are repeats. Running commands twice will not harm. php5-fpm has installed, still we will run :

Vim
1
sudo apt-get install php5-fpm php5-gd libssh2-php mysql-client

We want a separate database server, so only mysql-client for testing connection like work. Open your IP address and default Debian Nginx webpage will show up. Run this command :

Vim
1
php -v

If you are facing lot of errors like :

Vim
1
2
3
Cannot adopt OID in UCD-SNMP-MIB: ucdShutdown ::= { ucdTraps 2 }
Cannot adopt OID in UCD-SNMP-MIB: ucdStart ::= { ucdTraps 1 }
Cannot adopt OID in LM-SENSORS-MIB: lmMiscSensorsTable ::= { lmSensors 5 }

then you need to install :

Vim
1
sudo apt-get install snmp

Run :

Vim
1
php -v

You’ll get a clean output like :

Vim
1
2
3
4
5
6
7
8
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
    with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo

snmp should get installed but basically it does not get installed in expected way; it depends on vendor, so we install it later.

The funny part is that, on HP cloud, the Ubuntu distribution has the public directory at /var/www/html not at /usr/share/nginx/html. Make sure where is your public directory by opening the nginx host file :

Vim
1
2
3
4
5
nano /etc/nginx/sites-available/default
# check where is directory
# add index.php among the index files
# you can tweak php5-fpm later by uncommenting
# or reading the doc

Basically your /etc/nginx/sites-available/default file should look like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
# do not edit root location, this is example
root /usr/share/nginx/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
# use a full domain name
server_name localhost;
location / {
# only uncomment, test by adding
# /index.php?q=$uri&$args
# later
try_files $uri $uri/ /index.php;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
                try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}

Open php.ini file :

Vim
1
2
3
4
5
6
7
nano /etc/php5/fpm/php.ini
# find the string
# cgi.fix_pathinfo=
# with ^ + W
# uncomment it
# value will be 0
# save the file

Create this directory and chown it :

Vim
1
2
mkdir -p /spool/nginx/client_temp
sudo chown root:www-data /spool/nginx/client_temp -R

You will require this for our other guides on Nginx and PHP5-FPM. Run these now :

Vim
1
2
3
4
5
6
service php5-fpm restart
# if you got stuck with no service named php5-fpm
# then go here
# https://github.com/AbhishekGhosh/Nginx-PHP5-FPM-Restart-Fix-on-Ubuntu
# thats my fix
nginx -t && service nginx restart

Vim
1
2
3
4
5
6
Now, go to html directory :
 
cd /usr/share/nginx/html/
or
cd /var/www/html
# be sure from nginx that file

Download WordPress and untar :

Vim
1
2
3
4
5
6
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
cd wordpress
mv * .. && cd ..
rm -r wordpress latest.tar.gz && ls
# see the files

Now, at this point, you should do the DNS server work. Go to HP Helion Public Cloud DNS and add domain which you want. Add A record with the TTL value of 300 with the instance’s floating IP. There will be six name servers. Go to your domain resister’s control panel and add those six DNS. Go to webpagetest.org and test your domain name after 5 mins. It should show the WordPress installation page. On a different browser, open the domain name and continue the setup for WordPress. You will use the internal IP like 10.0.0.1 for the database server name. You will be prompted to copy a file and create it. Copy it and run these from terminal :

Vim
1
2
3
4
5
6
nano wp-config.php
# paste the stuffs
# write out
# ^ + O
# exit
# ^ + X

Continue setup on the browser. This is a secured setup. If you add this line in wp-config.php :

Vim
1
define('FS_METHOD','direct');

You ideally should not have problem with plugins, themes and uploads. Only if you need to fix cannot upload media via WordPress uploader or update Plugins, then you should chown.

Install WordPress on HP Cloud (Ubuntu, Nginx)

Next are advanced guides to tweak PHP5-FPM, tweak Nginx etc. – if you perform a search on our website, you will get all the guides. We have guide on XCache with W3 Total Cache Plugin too. We have not linked because this guide is a basic setup. With 2 x 2 GB server instances, after WordPress installation, you’ll get your site loading within 1.6 seconds on webpagetest.org without any tweak, cache plugin, CDN. If you increase the TTL of A value to 50 years, around 280 ms will get decreased. 6 name servers are unique about HP Cloud. You’ll never get more than a number of websites on one set of name servers. Rackspace has only two name servers. HP Cloud is far better than Rackspace in terms of performance and infrastructure level support. Hardware is HP Blade Servers.

If you can not install yourself, you can ask us, for a payment. When we will make the partnership with HP public, you do not have to bother about the backend.

Tagged With wordpress nginx

This Article Has Been Shared 859 Times!

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 Install WordPress on HP Cloud (Ubuntu, Nginx)

  • Cloud Computing : Are the users becoming more dependent?

    Cloud Computing already offering us various scopes and opportunities.It may be important to check whether we are becoming too much dependent on Cloud Computing.

  • Cloud Computing Leaders – Brands Who Revolutionized the Cloud

    Cloud Computing Leaders are not many in number. Only few Brands revolutionized Cloud Computing either offering as a free service or at a lower cost.

  • Cloud Computing in the Past Year : Who Uses and Who Do Not

    Cloud Computing, has involved vendors such as Dell, EMC, HP and IBM and now facing a market that challenges them to innovate more towards cloud services.

  • Dynamic Cloud Enterprise Content Management Strategy

    Companies need dynamic Cloud Enterprise Content Management strategy developed to combine collection, retention and use of business documents.

  • Digital Prescription : Standard for Cloud Computing Platform

    A Universal Digital Prescription Standard is a Real Need for Work on Cloud Computing Platforms as Chances of NSA Spyware Activities is More.

Additionally, 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

  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Install WordPress on HP Cloud (Ubuntu, Nginx)," in The Customize Windows, December 10, 2014, March 28, 2023, https://thecustomizewindows.com/2014/12/install-wordpress-hp-cloud-ubuntu-nginx/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT