Author: Brendan Bonner

How to Install LEMP (Linux, Nginx, MySQL, PHP) on a Ubuntu 14.04 LTS Cloud Server

Brendan Bonner July 3, 2015 by under Cloud Hosting 0 Comments
NGINX Car by Walker Cahall

NGINX Car by Walker Cahall

Verified and Tested 07/3/15

Introduction

This how-to will show you how to install LEMP on a Ubuntu 14.04 cloud server. LEMP is a web service stack that consists of a Linux operating system, Nginx (pronounced “engine-x”), MySQL, and PHP. The main difference between LAMP and LEMP is that LAMP uses Apache, and LEMP uses Nginx. LEMP has been gaining popularity in the last few years because it excels in speed and scalability.

Prerequisites

A server with Ubuntu 14.04 installed.  If you do not have a server, Atlantic.Net has industry-leading SSD cloud servers for any business solution.

Installing LEMP on a Ubuntu 14.04  Cloud Server

First we want to make sure that your server is up to date by running the commands:

sudo apt-get update
sudo apt-get upgrade

Note: Depending on your installation you may need to remove apache2. You can do that by running the commands:

sudo apt-get remove apache2*

Followed by:

sudo apt-get autoremove

 

Installing Nginx on Ubuntu 14.04

To install Nginx, use the command:

sudo apt-get install nginx

When it asks “Do you want to continue?”, hit Enter.

Start the Nginx service with the following command:

sudo service nginx start

We can now test Nginx by going to your hostname or IP address in your browser’s address bar. If you do not know your server’s IP address, you can run the following command:

ifconfig

You should get a result similar to the image below.

An example of ifconfig showing the IP address of 192.168.0.192

An example of ifconfig showing the IP address of 192.168.0.192

In our example, 192.168.0.192 is the IP address. So in our browser we would go to http://192.168.0.192.

You should see a web page that looks like the image below.

This example is the default nginx web page on Ubuntu 14.04

This example is the default nginx web page on Ubuntu 14.04

Now that Nginx is installed, we can move on to installing MySQL.

Installing MySQL on Ubuntu 14.04

Install MySQL with the command:

sudo apt-get install mysql-server

When it asks “Do you want to continue?”, hit Enter.

Shortly after, a screen similar to the image below will appear.  You need enter a password for your MySQL root user. It should be a strong password.

Insert your secure password for your new MySQL root password

Insert your secure password for your new MySQL root password

Hit enter to continue. Once you have hit enter, a new screen will appear prompting you to re-enter the password you just picked.

Retype your MySQL password

Retype your MySQL password

Now that MySQL is installed we need to do the MySQL secure installation by running the command:

sudo mysql_secure_installation

Enter your MySQL root password. When it asks “Change the root password?”, type “N” followed by Enter. The rest of the questions are up to you. For standard installations, you can hit Enter for the defaults.

An example of the MySQL secure installation

An example of the MySQL secure installation

Now that MySQL is installed, we can now install PHP.

Installing PHP on Ubuntu 14.04

Install PHP with the following command:

sudo apt-get install php5 php5-fpm php5-mysql

When it asks “Do you want to continue?”, hit Enter.

For Nginx to work with PHP correctly, we need to edit an Nginx configuration file. In this how-to, we are going to use a simple Nginx config file.

First, we need to move the original configuration file to a new file name. Run the command:

sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.old

Using a text editor of your choice, we are going to make a file called default in /etc/nginx/sites-available. For nano use the command:

sudo nano /etc/nginx/sites-available/default

Copy the following into your text editor:

server {
        listen       80;
        server_name  your_site_name.com;
        root /usr/share/nginx/html;
        index index.php index.html;

        location / {
                try_files $uri $uri/ =404;
        }

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;

        location = /50x.html {
                root /var/www/html;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}

In nano, to exit and save, hit Ctrl+x , type “y”, and then Enter.

Since we made changes to the configuration file, we need to restart Nginx, by running the command:


sudo service nginx restart

We are now going to make a simple PHP page to test.

Using a text editor of your choice, we are going create a file called info.php in /usr/share/nginx/html/.

sudo nano /usr/share/nginx/html/info.php

Copy the following into your text editor.

<?php
phpinfo();
?>

In your browser, you can go to http://Your-Hostname/info.php or http://Your-IP-Address/info.php. As above, in this example, we would use http://192.168.0.192/info.php.

You should see a web page similar to the one below.

An example of the info.php web page

An example of the info.php web page

Once you are done testing, it is a good idea to remove the info.php file, since it may give a potential attacker information that can be used to craft a specific attack against your server. To do that run the command:

sudo rm /usr/share/nginx/html/info.php

Congratulations, you have installed LEMP on Ubuntu 14.04. Thank you for following this how-to. Please check back for more updates, to purchase a cost-effective cloud server, or take a look at our how-to on Installing WordPress on Ubuntu 14.04!


How to Install phpMyAdmin on a CentOS 7 Cloud Server

Brendan Bonner July 2, 2015 by under Cloud Hosting 0 Comments
phpMyAdmin Ship Illustration by Walker Cahall

phpMyAdmin Ship Illustration by Walker Cahall

Verified and Tested 07/2/15

Introduction

This how-to will walk you through the installation process of phpMyAdmin. phpMyAdmin is a tool to directly manage your databases by allowing you to visually add, delete, or modify databases and tables, among other things. phpMyAdmin is written in PHP and is free and open source.

Prerequisites

A CentOS 7 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

You will need valid MariaDB credentials to log into your database once phpMyAdmin is installed.

This how-to assumes you are using a user with root privileges. You do not have to append sudo to the commands below if you are logged in as the root user.

Install phpMyAdmin on CentOS 7

To install phpMyAdmin quickly on CentOS 7, we are going to install the Extra Packages for Enterprise Linux (EPEL) repo first by running the following command:

sudo yum install epel-release

During the install, it will prompt “Is this ok?”. Hit “Y” and then Enter.

Now we can install phpMyAdmin.

sudo yum install phpmyadmin

During the phpMyAdmin install, it will prompt “Is this ok?” for the install and then the EPEL key. Hit “Y” and then Enter for each question.

The phpMyAdmin installation process will make a configuration file in /etc/httpd/conf.d/ called phpMyAdmin.conf. By default, phpMyAdmin is configured only to accept connections from the server it is installed on. If you want to allow other IPs, you’ll need to open the phpMyAdmin.conf file with your preferred text editor.

sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

In this example, we are using Apache 2.4, so we only need to change the configurations for 2.4. There will be two places that say “Require ip 127.0.0.1”. Below each one we are going to put “Require ip {your-public-IP}” For the purpose of this example, we’ll say we want to grant phpMyAdmin access to a workstation with an IP of 192.168.0.2. In this case, we would put “Require ip 192.168.0.2” below “Require ip 127.0.0.1” If you do not know your public IP, you can use this tool.

The configuration file should like the one below when completed.

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
        Require ip 127.0.0.1
        Require ip 192.168.0.2
        Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
        Require ip 127.0.0.1
        Require ip 192.168.0.2
        Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

In Nano to save a close, hit Ctrl+X and then Y and then Enter.

Note: When adding allowed IPs to this file, be sure you only add the IPs for users who require access. The more access you allow, you more you may also increase your server’s exposure to exploit.

Now, we can restart Apache so that the changes take place:

sudo systemctl restart httpd.service

To get to the login page, you need open your browser and go to http://{your-server's-address}/phpMyAdmin/. You should get a page that looks like the image below.

An example of the phpMyAdmin login page

An example of the phpMyAdmin login page

Note: If you do not know your IP address, run the following command:

ip addr show eth0
An example of running the command: ip addr show eth0 and getting 192.168.100.10 for the IP address.

An example of running the command: ip addr show eth0 and getting 192.168.100.10 for the IP address.

In our example we would put http://192.168.100.10/phpMyAdmin/ into our browser’s address bar.

You can sign in with the root MariaDB credentials that you set-up when installing LAMP. Once logged in, you should get a page similar to the one below.

An example of the phpMyAdmin default page.

An example of the phpMyAdmin default page.

Using this interface, you can now easily manage your databases on your CentOS 7 LAMP server.

Congratulations! You have just installed phpMyAdmin on your CentOS 7 Cloud Server. Thank you for following along in this How-To! Check back with us for any new updates, and try our line of cloud hosting solutions.


How to Install WordPress using Atlantic.Net’s One-Click Install

Verified and Tested 06/15/15

Introduction

This how-to will show you how to install WordPress using Atlantic.Net’s One-click install. Currently, our WordPress application is installed on a LAMP stack using Ubuntu 14.04 LTS.

Prerequisites

You need a valid Atlantic.Net cloud account.

Install WordPress using Atlantic.Net’s One-Click Install

First, we need to log into https://cloud.atlantic.net and select Add Server.

Click Add Server

Click Add Server

 

On the add a server page, the first step is to name your cloud server.

 

Type the name of what you want your server to be called.

Type the name of what you want your server to be called.

 

We now need to select the location for which you want your server housed at. All applications are available at every location.

 

Select the location you want your server to be at.

Select the location you want your server to be located.

 

Next select Applications to see all the one-click applications that are available.

 

Select Applications.

Select Applications.

 

Select the WordPress application.

 

Select WordPress.

Select WordPress.

 

Select the size of the server you would like.

 

Select your server size.

Select your server size.

 

Optionally you can add your SSH key and/or add backups.

 

Select your SSH key and add backups if you would like.

Select your SSH key and add backups if you would like.

 

Click Create Server, and you should see that your server is building.

 

An example of what you server looks like when building.

An example of what you server looks like when building.

 

Once it is built, you should get a screen similar to the one below. It has relevant information like the IP address of your server and login credentials. You will also get an email with the same information.

 

An example of what you server looks like after it is built.

An example of what you server looks like after it is built.

 

To get to the WordPress web installation, you need the verification link. The verification link is in the email sent to you, or on the Message of the Day screen when you first SSH into your server. The message of the Day also has your database passwords. Below is what the message of the day looks like when you login.

 

Note: The reason we use verification links rather than just going to the IP address, is the potential that someone could hijack your WordPress installation.

 

 

An example of what it looks like when you SSH into the server.

An example of what it looks like when you SSH into the server.

 

Copy the verification link and put it into your browser. You should get a screen similar to the one below where you can select your language of choice.

 

Select the language for your WordPress installation.

Select the language for your WordPress installation.

 

Now you can continue with the WordPress web installation to which will ask for your site title, username, password, and email, which is all customizable for what you would like.

 

An example of the WordPress web installation.

An example of the WordPress web installation.

Congratulations! You have just installed WordPress using Atlantic.Net’s one-click WordPress install, check back for more updates. For more information, you may want to check out the WordPress Codex. Learn more about setting up HIPAA-compliant WordPress with Atlantic.Net.


How to Install LAMP (Apache, MariaDB, PHP) on a CentOS 7.2 Cloud Server

Brendan Bonner June 18, 2015 by under Cloud Hosting 0 Comments
LAMP Magic In Your Hands created by Walker Cahall

LAMP Magic In Your Hands created by Walker Cahall

Verified and Tested 12/31/15

Introduction

This how-to will show you a basic installation of LAMP on a CentOS 7.2 Cloud Server. LAMP, on CentOS 7.2, is a software bundle consisting of four components: Linux, Apache, MariaDB, and PHP. LAMP is the backbone for a wide variety of web-based software, such as WordPress and other web-hosting platforms. We will be using CentOS 7.2 for our Linux installation in this how-to. CentOS 7.2 implements systemd which will make this guide very different than the CentOS LAMP articles you may have seen in the past. Additionally the default database engine used by CentOS 7 is MariaDB and not MySQL. MariaDB is a forked version of MySQL, so most of the functionality that you may know from MySQL is built into MariaDB. We will be using Apache for our web server and PHP for our scripting language.

Read More


How to Install WordPress on a Ubuntu 14.04 LTS Cloud Server

Brendan Bonner June 15, 2015 by under Cloud Hosting 0 Comments
WordPress Illustration by Walker Cahall

WordPress Illustration by Walker Cahall

Verified and Tested 06/15/15

Introduction

This how-to will take you through installing WordPress on Ubuntu 14.04 LTS. WordPress is a content management system which is free and open source. Since it is open source, there are a numerous amount of themes and plugins that are readily available to you. Although it is typically used as a blogging platform, it can be used for many other uses.

Prerequisites

To install WordPress, a Ubuntu 14.04 server running LAMP or LEMP is required. Please see our how-to guide for installing LAMP or LEMP. If you do not have a server, you can get a trusted cloud server from Atlantic.Net, or use our One-Click WordPress installation.

Installing WordPress on Ubuntu 14.04

Installing WordPress is very simple if you follow these steps. We will first start off by setting up the MySQL database.

Setting up the MySQL database in Ubuntu 14.04

We are going to start off by setting up the MySQL database by running the following commands:

mysql -u root -p

When prompted, enter your MySQL root password that you set up when installing MySQL.

In MySQL enter the following commands:

create database wordpress character set utf8 collate utf8_bin;

Make sure you set your secure password where it says [insert-password-here]

grant all privileges on wordpress.* to [email protected] identified by "[insert-password-here]";
flush privileges;
exit

Get the Latest WordPress Install on Ubuntu 14.04

Now that the database is created, we can download the latest version with the following command:

wget http://wordpress.org/latest.tar.gz

The latest package will download to the directory that you are currently in, with the file name latest.tar.gz. We need to decompress the file by running:

tar -xzvf latest.tar.gz

Configure WordPress on Ubuntu 14.04

Next, we need to copy wp-config-sample.php to wp-config.php which is where it gets its base configuration. To do that, run:

cp wordpress/wp-config-sample.php wordpress/wp-config.php

In your favorite text editor, edit wordpress/wp-config.php

For a basic setup, we need to have the following.

define(‘DB_NAME’, ‘wordpress’);

define(‘DB_USER’, ‘wordpressuser’);

define(‘DB_PASSWORD’, ‘[insert-password-here]’);

It should look like this when completed:

What wp-config.php should look like once you have edited it

What wp-config.php should look like once you have edited it

 

Next, we need to move the WordPress folder to your web directory.

cp -r ~/wordpress/* /var/www/html

Note: Your web directory may be different based on your configuration.

Finish The Installation Through The WordPress Web Installation.

Now, we can go to the WordPress web installation. In your browser go to http://yourhostname-or-ipaddress

If you are unsure what your IP address is, run the following:

ifconfig
An example of using ifconfig to show the IP address of your server

An example of using ifconfig to show the IP address of your server

 

In our example, we would put http://172.20.6.154/ in the address bar and get the following page.

 

An example of the WordPress web installation

An example of the WordPress web installation

 

From here all that is needed to do is to follow along with the WordPress install and give the information required.

Congratulations! You have just installed WordPress on Ubuntu 14.04, check back for more updates. For more information, you may want to check out the WordPress Codex.


Install WordPress on a Fedora 22 Cloud Server

Verified and Tested 05/25/15

Introduction

This how-to will show you how to install WordPress on Fedora 22. WordPress started as a blogging system, but now has become a full content management system (CMS). It is a free, open source program, which has become the most popular CMS on the Web. With thousands of plugins, your website is nearly limitless.

Prerequisite

– A Fedora 22 server running LAMP or LEMP is required. Please see our how-tos for Fedora 22 LAMP or LEMP.

Creating The WordPress Database In MariaDB on Fedora 22

We are going to start off by setting up the database  in MariaDB, by running the following commands:

mysql -u root -p

When prompted, enter your MariaDB root password that you set up when installing MariaDB.

In MariaDB, enter the following commands: (Make sure you set your secure password where it says [insert-password-here])

create database wordpress character set utf8 collate utf8_bin;
grant all privileges on wordpress.* to [email protected] identified by '[insert-password-here]';
flush privileges;
exit

The commands above creates a database called wordpress, a dbuser named wordpressuser with a password [insert-password-here]. You can modify these settings to your liking.

Downloading And Unpacking The Latest WordPress Install on Fedora 22

Since we created the database, we can now move on to the next step of downloading the latest WordPress install by running the following command:

wget http://wordpress.org/latest.tar.gz

Note: if Wget is not installed, install it by running the command:

dnf install wget

Wget will download the compressed WordPress install, in the directory that you are currently in. We now need to unpack it by running the command:

tar -xzvf latest.tar.gz

Configuring the WordPress Install on Fedora 22

wp-config.php is where WordPress gets its base configuration. We need to make a wp-config.php by copying wp-config-sample.php and making a new file. To do that run:

cp wordpress/wp-config-sample.php wordpress/wp-config.php

Next we need to edit wordpress/wp-config.php. In this how-to we will be using the text editor nano.

nano wordpress/wp-config.php

For a simple setup, we need to edit the following values:

define(‘DB_NAME’, ‘wordpress’);

define(‘DB_USER’, ‘wordpressuser’);

define(‘DB_PASSWORD’, ‘[insert-password-here]’);

It should look like this when completed:

An image showing the styling for the WordPress db info

Please be careful when updating this file.

 

We now need to move the config files to the web directory.

For LAMP run the command:

sudo cp -r ~/wordpress/* /var/www/html

For LEMP run the command:

sudo cp -r ~/wordpress/* /usr/share/nginx/html

Finishing The WordPress Install In The Web Installation on Fedora 22

We now can go to the web installation by going to http://yourhostname-or-ipaddress in your browser.

If you are unsure what you IP address is run the following:

ifconfig
An example of ifconfig showing the IP address 192.169.0.15

An example of ifconfig showing the IP address 192.169.0.15

In the above example, we would put http://192.68.0.15/ in the browser address bar and get the following page.

 

An example of the WordPress web installation

An example of the WordPress web installation

 

The next step is to follow the web installation by submitting your information. Congratulations you have installed WordPress on Fedora 22, please check back for more updates. For more information, you may want to check out the WordPress Codex.

Atlantic.Net

Atlantic.net offers managed hosting services which include a layer of business-essential managed services to your hosting packages. Contact us today for more information.


How to Install Linux, Apache, MySQL and PHP (LAMP) on a Ubuntu 14.04 Cloud Server

Brendan Bonner May 15, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 05/15/15

Introduction

In this How-To, we install LAMP on an Ubuntu 14.04 Cloud Server. LAMP is a simple software bundle made of 4 components, Linux, Apache, MySQL, and PHP. Linux the core of the platform, in this case, we are using Ubuntu 14.04 LTS. Apache is the web server, majority of the web servers in the world are running Apache MySQL is a database management system, developed by Oracle. PHP is an extremely popular programming language that is widely used in web development. Altogether this forms LAMP or LAMP stack.

Prerequisites

A server with Ubuntu 14.04  installed. Get a reliable server from Atlantic.Net if you do not have one.

Installing LAMP on Ubuntu 14.04

Before we begin the installation, it is important that your system is up to date, you can do so with the following command:

apt-get update

Once updating, we can get to the first step of making a LAMP stack by installing Apache.

Installing Apache on Ubuntu 14.04

Install Apache by running the following command:

apt-get install apache2

Hit enter to when it asks “Do you want to continue?” during the install.

After the install, you can check to see if Apache is running by running the command:

service apache2 status

Also, you can verify if all is working by opening your browser and going to http://youripaddress

If you do not know your IP address, you can run the following command:

ifconfig
An example of ifconfig showing the IP address 172.20.6.154

An example of ifconfig showing the IP address 172.20.6.154

In our case, we would put http://172.20.6.154 in your browser’s address bar and get the following page:

The default page for Apache on Ubuntu 14.04

The default page for Apache on Ubuntu 14.04

Installing MySQL on Ubuntu 14.04

Install MySQL with the following command:

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Hit enter to when it asks “Do you want to continue?” during the install.

During the install, it will prompt you to enter a MySQL root password. Set any password that you would like. It should be a strong password.

Enter a strong password of your choice

Enter a strong password of your choice

After you enter your MySQL root password, you will need to re-enter it.

Re-enter the password you set before

Re-enter the password you set before

Continue with the MySQL Security installation with the following command:

mysql_secure_installation

Note: You will be prompted with a series of questions. Just type N for the change root password and Y for yes on all of the rest, see the screen shot below:

An example of what mysql_secure_installation looks like

An example of what mysql_secure_installation looks like

Verify that MySQL is running with the following command:

service mysql status

Installing PHP on Ubuntu 14.04

Install PHP with the following command:

apt-get install php5

Hit enter to when it asks “Do you want to continue?” during the install.

Create a test PHP file called info.php in /var/www/html/. In this how-to, we will be using the text editor nano with the following command:

nano /var/www/html/info.php

Insert the following code in the text editor then save and exit:

<?php
phpinfo();
?>

Since we made changes, we need to restart Apache so that the changes take effect:

service apache2 restart

Test your page in your browser with the following hyperlink changed with your IP address:

http://youripaddress/info.php

The result of the php.info file you made.

The result of the php.info file you made.

Congratulations! You have just installed LAMP on your Ubuntu 14.04 Server. Thank you for following this How-To on installing LAMP, please check back for more updates.


How to Tell if 32-Bit or 64-Bit Version of Linux

Brendan Bonner April 6, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 10/28/15

Introduction

You might be a new sysadmin with equipment installed by someone else, or you were just given a server with no clue of what is installed.

If your software requires a system that is 32-Bit or 64-Bit you probably are going to need to find out if your system is 32 or 64 bit.

This how-to will show you how to find out if you are using a 32-Bit or 64-Bit installation on Linux.

Prerequisites

A server running a Linux Operating system. If you’re interested in purchasing a cloud server, you can spin up a reliable Linux Cloud Server from Atlantic.Net in under 30 seconds.

Read More


How to Install IIS on Windows Server 2012 R2

Brendan Bonner February 3, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 02/03/15

Introduction

This how-to shows you how to install IIS 8.0 role on a Windows Server 2012 R2.

Prerequisites

Administrator access on the Windows Server 2012 R2 server. If you do not have a server already, you can spin up an Atlantic.Net Windows server in under 30 seconds.

Installing IIS on Windows Server 2012 R2

Open the server manager by clicking Server Manager icon that should be located on your task-bar. If you are unable to find it, click the Windows start button and click Control Panel, and then click System and Security then click Administrative Tools then click Server Manager.

Read More


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources

We use cookies for advertising, social media and analytics purposes. Read about how we use cookies in our updated Privacy Policy. If you continue to use this site, you consent to our use of cookies and our Privacy Policy.