Cloud Hosting

How to Install Python 2.7 on CentOS 7.1 or 6.7 with Anaconda

Karoline Alexiou August 20, 2015 by under Cloud Hosting 0 Comments
Python Illustration by Walker Cahall

Python Illustration by Walker Cahall

Introduction

CentOS is a popular Linux distribution because it’s free to use without the need for a license and because the feature-freeze practices applied during the release cycle guarantee long-term stability.

The price for stability is that the operating system ships with certain libraries that are quite out of date. Such is the case for Python, which is found in CentOS distributions at versions 2.6 or even lower. If developers need a higher version of Python, they need to compile and install it themselves.

However, it’s important to leave the already installed Python intact, too. The operating system requires it for internal use, such as for the yum package manager. The most common thing that can go wrong is that a developer, in trying to install the new Python version, manages to corrupt the system (just Google for “installing Python 2.7 on CentOS broke my yum”).

For that reason, it makes sense to use an existing tool that manages Python installations without tampering with the system Python installed at /usr/bin/python, and installs the new version side-by-side with the old one. A relatively new but already widely-used tool for managing Python installations is Anaconda by Continuum.io, which makes building Python quite easy.

Read More


How to: VRRP (Virtual Router Redundancy Protocol) Keepalived Configuration

Atlantic.Net NOC August 18, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 08/17/15

Introduction

VRRP (Virtual Router Redundancy Protocol) is a commonly used protocol that offers high availability for a network (or subnetwork). Keepalived is a Linux package that uses VRRP to deliver high availability among Linux servers. It also delivers load-balancing services, but this article concentrates on getting started with just the VRRP portion.

Prerequisites

– Linux installation on at least 2 hosts (be sure they are already updated). If you do not have servers and need them, you can get reliable, fast SSD cloud server from Atlantic.Net.
– At least 3 available IP addresses (1 for each of at least 2 peer keepalived servers, and 1 virtual IP shared amongst them).

Read More


How to Install LEMP (Nginx, MySQL, PHP) on Centos 6.7

Jose Velazquez August 17, 2015 by under Cloud Hosting 0 Comments
NGINX Car by Walker Cahall

NGINX Car by Walker Cahall

Verified and Tested 08/17/15

Introduction

In this How-To, we will walk you through the LEMP install on your CentOS 6.7 Server. LEMP is a software bundle that is made up of four parts (Linux, Nginx, MySQL, and PHP). This how-to will be using CentOS 6.7 which was released on August 7th, 2015, Nginx version 1.0.15, MySQL version 5.1.73 and php-fpm using PHP version 5.3.3.

Prerequisites

A server with CentOS 6.7 already installed. If you do not have a CentOS 6.7 server, you can get a reliable cloud SSD server from Atlantic.Net and be up and running in under 30 seconds!

Installing EPEL in CentOS 6.7 for LEMP

In this how to we are going to install the Fedora epel release to quickly install Nginx. Run the following command to install EPEL:

sudo yum install epel-release

Installing and Configuring NGINX in CentOS 6.7 for LEMP

Install NGINX with the following command:

sudo yum install nginx

Start the NGINX service with the following command:

sudo /etc/init.d/nginx start

Configure NGINX to start when the system is rebooted:

sudo chkconfig nginx on

You will now have NGINX installed on your server. This can be verified by typing in the following with your IP ADDRESS on your browser. Also, all configuration files are provided on the page.

We can now verify Apache is working by opening your browser and entering the URL http://your-server's-address. you should get a blue Nginx test page similar to the image below.

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

sudo 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 into our browser’s address bar.

 

Sample Nginx Default Webpage

Sample Nginx Default Webpage

Installing and Configuring MySQL on CentOS 6.7 for LEMP

Install MySQL with the following command to begin the install:

sudo yum install mysql-server

Start the service with the following command:

sudo service mysqld start

Set root MySQL password with the following command:

sudo /usr/bin/mysql_secure_installation

Note: You will be prompted with a series of questions. Just type Y for yes on all of them, see the screen shot below:

Sample my_secure_installation output.

Sample my_secure_installation output.

Configure MySQL to start when the system is rebooted:

sudo chkconfig mysqld on

 

Installing and Configuring php-fpm on CentOS 6.7 for LEMP

Install php-fpm with the following command:

sudo yum install php-fpm php-mysql

Start the php-fpm service with the following command:

sudo service php-fpm restart

Make sure php-fpm starts on boot with the following command:

sudo chkconfig php-fpm on

Using your favorite editor, edit the file /etc/php-fpm.d/www.con  and change user and group from apache to nginx. It should look similar to the block below.

; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
; RPM: apache Choosed to be able to access some dir as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx

Now we need to make some changes to the Nginx configuration file so that php-fpm works correctly with Nginx. Using your favorite editor, edit the file /etc/nginx/conf.d/default.conf and carry out the following changes or copy the following block below into your conf file.

1) Add the index.php to the index location

2) Change the root location to /usr/share/nginx/html

3) Uncomment the Pass PHP scripts to FastCGI section.

4) Change the fastcgi_param  SCRIPT_FILENAME  to use /usr/share/nginx/html$fastcgi_script_name

#
# The default server
#
server {
    listen       80 default_server;
    server_name  _;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
        root   /usr/share/nginx/html;
        index  index.php index.html index.htm;
    }

    error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           /usr/share/nginx/html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

 

Create a test PHP file in the following directory with the following command:

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

Insert the following code in the space then save and exit:

<?php
phpinfo();
?>

Restart apache so all the changes take effect:

sudo service nginx restart

Test your page in your browser with the following hyperlink changed with yourIP address:
http://YOUR.IP.ADD.RESS/info.php

Sample info.php

Sample info.php

You should removed the info.php file as it could be used against you by an attacker. Delete it with the following command:

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

Congratulations! You have just installed LEMP on your CentOS 6.7 Server. Thank you for following along in this How-To! Check back with us for any new updates and browse our scalable Cloud Hosting solutions for any sized business.


Reduce Your Cloud Computing Costs – Cut the Middleman

Adnan Raja August 14, 2015 by under Cloud Hosting 0 Comments

If you want to get your cloud computing costs down to the level you expected when you initially made the transition, one expert argues that the solution is simple: cut out the middleman.

When 150 top IT executives in the United Kingdom were asked about the challenges and costs of transitioning to cloud, the results (released in early 2015) were both predictable and startling.

Read More


How to Install a LAMP (Apache, MySQL, PHP) stack on CentOS 6.7

Jose Velazquez August 13, 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 08/12/15

Introduction

In this How-To, we will walk you through the installation of a LAMP stack on a CentOS 6.7 based server. Although we are writing this article in the context of CentOS 6.7, a Linux, Apache, Mysql, PHP(LAMP) server is a common installation stack capable of being hosted on many different Operating Systems. Examples of such are Debian (see our how-to on this here) and Debian based distributions like Ubuntu (see our how-to for Ubuntu here), or RHEL and RHEL based distributions such as Fedora or Scientific Linux. You’ll see these installations occurring on a variety of hosting platforms such as shared web hosting, dedicated hosting and cloud hosting.

In the case of this article, we’ll be utilizing the YUM package manager associated with the RHEL distribution CentOS.

Prerequisites

A server with CentOS 6.7  installed will take care of the Linux aspect of the LAMP stack install. If you do not have a server, consider a reliable SSD cloud hosting server from Atlantic.Net.

Installing Apache on CentOS 6.7

Install Apache with the following command to begin the install:

sudo yum install httpd

Start Apache with the following command:

sudo service httpd start

We can now verify Apache is working by opening your browser and entering the URL http://your-server's-address. you should get a blue Apache 2 test page similar to the image below.

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 into our browser’s address bar.

 

Apache 2 Test page

Apache 2 Test page

Installing MySQL on CentOS 6.7

Install MySQL with the following command to begin the install:

sudo yum install mysql-server

Start the service with the following command

sudo service mysqld start

Set root MySQL password with the following command:

/usr/bin/mysql_secure_installation

Note: You will be prompted with a series of questions. Simply type Y for yes on all of them, see the screen shot below:

Sample mysql_secure_installation

Sample mysql_secure_installation

Installing PHP on CentOS 6.7

Install PHP with the following command to begin the install:

sudo yum install php php-mysql

Create a test PHP file in the following directory with the following command:

sudo vi /var/www/html/info.php

Insert the following code in the empty space then save and exit:

<?php
phpinfo();
?>

Restart apache so all the changes take effect:

sudo service httpd restart

Test your page in your browser with the following hyperlink changed with your IP address:
http://YOUR.IP.ADD.RESS/info.php

Sample info.php

Sample info.php

It is a good idea to remove your php.info file as it can be used to aid an attacker to compromise your server. You can do that with the following command:

sudo rm /var/www/html/info.php

If you would like Apache and MySQL to start on boot, run the following commands:

sudo chkconfig httpd on
sudo chkconfig mysqld on

Congratulations! You have just installed a LAMP stack on your CentOS 6.7 Server. Thank you for following along in this How-To and check back with us for any new updates, or to learn more about our industry leading cloud hosting solutions.


How to Install Zabbix Server on a CentOS 6.7 Server

Brendan Bonner August 12, 2015 by under Cloud Hosting 0 Comments
Zabbix Vision by Walker Cahall

Zabbix Vision by Walker Cahall

Verified and Tested 11/23/15

Introduction

This how-to will show you how to install Zabbix 2.4 Server on a CentOS 6 installation. Zabbix is an open source monitoring tool that is ideal for monitoring your cloud servers. However, it can monitor many other types of devices. Installing Zabbix can help you find issues with your server before an outage occurs.

Prerequisite

– A CentOS 6.7 server running LAMP. Please see this post for details on installing LAMP on CentOS 6.7.

–  If you do not have a CentOS 6.7 server, try a Cloud Server today!

Read More


How to Configure Logging in IIS Windows Server 2012

Jose Velazquez August 11, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 08/11/2015

Introduction

In this How-To, we will walk you through to Configure Logging in IIS Windows Server 2012.

This feature is set up to store data HTTP request and errors from your website(s) and of your Web Server. Configuring this feature will make your site troubleshooting much easier because you will have logs that serve as a starting point.

Prerequisites

– A Server with Windows Server 2012. If you do not have a server already, why not spin up a Windows Cloud server from Atlantic.Net in under 30 seconds.

– Internet Information Services(IIS) installed on your server. If you need to install IIS, follow our guide Install IIS On Windows Server 2012 R2.

Read More


How to Install Java (JRE or JDK) on CentOS 7

Jose Velazquez August 10, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 08/10/15

Introduction

If you had the option to choose between a base model car or a fully loaded model, which one would you choose? Both cars will take you from point A to point B, but with the fully loaded car you have additional features that can make rush hour a chill hour. Well, that’s the same concept when we take a closer look at Java. There are two standard types of installations, JRE (Java Runtime Environment) and JDK (Java Development Kit). As the base model car, JRE enables the ability to create Java Applications for different types of deployments using minimal core tools to accomplish the task. JDK is a fully loaded Development Kit that has everything that JRE has plus additional resources to create/secure Applications and Applets.

This how-to will take you through the installation of JRE and JDK on CentOS 7.

Prerequisites

You need a CentOS 7 server that is configured with a static IP address. If you do not have a server already, you can visit our informative Cloud Hosting page and spin a new server up in under 30 seconds.

Read More


How to Install HHVM (HipHop Virtual Machine) on Ubuntu 14.04 using Apache or Nginx

Brendan Bonner August 7, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 8/5/15

Introduction

This guide will show you how to install HHVM (HipHop Virtual Machine) on an Ubuntu 14.04 server using Apache or Nginx. HHVM is a process virtual machine designed to execute Hack and PHP programs. HHVM runs programs at run time rather than prior, which gives HHVM high-caliber performance over a typical PHP install. HHVM was open-sourced and developed by Facebook.

Prerequisites

– A server with Ubuntu 14.04 installed. HHVM requires the 64-bit version.  If you do not have a server, try a market-leading Cloud Server in under 30 seconds from Atlantic.Net

– Apache or Nginx installed on your server. You can follow our guides on installing Apache or Nginx if needed.

Installing HHVM on Ubuntu 14.04 using Apache or Nginx

First we need to add the HHVM key to your Ubuntu Server with the following command:

sudo wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add -

Next we are going to add the HHVM source to your sources list with the following command:

sudo echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list

Now that we added the key and sources it is a good idea to run and update with the following command:

sudo apt-get update

Now we can install HHVM with the following command:

sudo apt-get install hhvm

Make it start on boot by running the command:

sudo update-rc.d hhvm defaults

HHVM includes an excellent script to install FastCGI based on web server you have installed. Run it with the following command:

sudo /usr/share/hhvm/install_fastcgi.sh

Note: On Apache there have been issues with hhvm_proxy_fcgi.conf not matching the default directory and when you access PHP sites you get a 404 File Not Found. To fix this, use your favorite text editor open the following file:

/etc/apache2/mods-enabled/hhvm_proxy_fcgi.conf

Within the file find the line that says:

proxypassmatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/$1

Then replace it with the following:

ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1

You can now test it by making a sample PHP page and going to your web browser.

For Nginx open your editor and create the file:

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

For Apache open your editor and create the file:

/var/www/html/info.php

Then add the following code to your new file.

<?
php phpinfo();
?>

Now test it by opening up your web browser and going to yourhostname.com/info.php

You should get a page similar to the one below.

An example of the HHVM info page

An example of the HHVM info page

It is a good idea to delete your info.php file as it could be used to attack your server.

Sample Commands for HHVM you may find useful

Start HHVM with:

service hhvm start

Stop HHVM with:

service hhvm stop

Restart HHVM with:

service hhvm restart

You can also see if HHVM is version with the following command:

hhvm --version

What’s Next?

Congratulations on installing HHVM on Ubuntu 14.04. Try it out with some of your favorite CMS’s like WordPress or Drupal and you should see a performance increase especially under load. Thank you for following along this how to, please check back for more updates.

 


How to Install NGINX on Ubuntu 14.04

Atlantic.Net NOC August 6, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 08/06/15

Introduction

This tutorial will show you how to install Nginx on Ubuntu 14.04 so that you can successfully run a superior performance based web server while easing the load on your system resources. Nginx is a powerful web server software that can be used on your server.

Prerequisites

You need a Ubuntu 14.04 server that is configured with a static IP address. If you do not have a server already, you can visit our cloud hosting page and spin a new server up in under 30 seconds.

Server Preparation

Let’s make sure that your server is fully up-to-date.

apt-get update

With the server up-to-date, we can continue the installation process of your server.

Install Nginx

To install Nginx, we will need to use the apt-get  command so we can install the software:

sudo apt-get install nginx

You will now have NGINX installed on your server and can be verified typing in the following with your IP ADDRESS on your browser (http://YOUR.IP.ADD.RESS )

Your IP can be retrieved from the server with following command:

ifconfig eth0 | grep inet | awk '{ print $2 }'

An example of the default webpage Nginx gives you when installed on Ubuntu 14.04

An example of the default webpage Nginx gives you when installed on Ubuntu 14.04

Configure Nginx

We will now configure Nginx by opening the central configuration file and editing the server_name line with your domain.

nano /etc/nginx/sites-available/default
server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /usr/share/nginx/html;
        index index.html index.htm;

        # Make site accessible from http://localhost/
        server_name YOURDOMAIN.com;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules
        }

        # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
        #location /RequestDenied {
        #       proxy_pass http://127.0.0.1:8080;
        #}

        #error_page 404 /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page 500 502 503 504 /50x.html;
        #location = /50x.html {
        #       root /usr/share/nginx/html;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #       fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        #
        #       # With php5-cgi alone:
        #       fastcgi_pass 127.0.0.1:9000;
        #       # With php5-fpm:
        #       fastcgi_pass unix:/var/run/php5-fpm.sock;
        #       fastcgi_index index.php;
        #       include fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}

Save the file and restart the Nginx service so the changes take effect.

service nginx restart

Now you can create/upload your web content to the HTML directory of Nginx (Remember to replace the existing index.html file with your index.html which is your home page) The default directory for Ubuntu 14.05 is /usr/share/nginx/html/. Update the index with the following command:

nano /usr/share/nginx/html/

What Next?

You now have your Ubuntu 14.04 server with Nginx installed, you may now begin building high-performance websites using your newly installed web server. Thank you for following along and feel free to check back with us for further updates.


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

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.