HIPAA Compliant Cloud Hosting

How to Install Apache on CentOS 7

Verified and tested on March 3, 2017

Introduction

Apache is a commonly used service that allows you to serve web pages from your Cloud server. It had robust support for many different technologies by adding modules. It has become commonplace in many web workflows, like LAMP (Linux, Apache, MySQL, and PHP).

In order to install Apache on CentOS 7, you will need to create an Atlantic.Net Cloud Server and select CentOS 7.x for the operating system. You can sign up for our service or spin up a server in our Atlantic.Net Cloud here.

Read More


What Linux Distro Should You Use? The Best Linux Distributions

What are the best Linux distributions? Let’s look at four distros that we feel are the best available for general needs – secure, stable, and reliable.

  • About Linux
  • Best Linux Server Distros for You
  • Flavor #1 – Ubuntu
  • Flavor #2 – CentOS
  • Flavor #3 – Debian
  • Flavor #4 – Fedora
  • Deploying Your Linux Server

About Linux

As an operating system (OS), Linux is software that allows programs and the user to access the computer’s hardware and perform tasks. The OS sends directions from a program to the central processing unit (CPU), for example. Once the assigned work is completed, the CPU gets the data to the OS for transfer back to the program. The OS is like a mediator.

Read More


How to Install Java (JRE or JDK) on Ubuntu 16.04

Java Illustration by Walker Cahall

Java Illustration by Walker Cahall

Verified and Tested 03/4/16

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). Like 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.

Read More


Docker Net Worth: Why Docker Was Valued at $1 Billion Last Year

In April 2015, Docker was valued at $1 billion. Why is that? Of course, Docker is not just a trend. What’s so remarkable about this containerization technology? Why is the company worth so much?

  • Growth of the Company
  • Value of the Company
  • 5 Reasons Docker is Worth $1 Billion
  • One-Click Docker

Growth of the Company

Docker adoption has been growing rapidly. In fact, a study of 7000 businesses found that adoption of Docker rose 400% between September 2014 and November 2015.

The study, from infrastructure monitoring group Datadog, showed that Docker had almost none of the market in fall 2014 but was running on 6% of the servers tracked for the report by November. Interestingly enough, this open source software is particularly popular among enterprises: over half of firms with more than 500 hosts have used Docker, at least in testing environments.

Read More


What is: glibc (GNU C Library) Vulnerability (CVE-2015-7547) Patch and Information

On Tuesday, 16 February 2016, Google security researchers Fermin J. Serna and Kevin Stadmeyer announced the discovery of a vulnerability in the GNU C library (called “glibc” or “libc6”, depending on the specific platform) that underlies many Unix/Linux systems. Similar to the GHOST vulnerability, exploitation of this vulnerability involves a buffer overflow that can cause a system crash or allow an attacker to remotely execute malicious code.

How It Works

When the Google researchers reported the vulnerability to the C library maintainers, they discovered that the bug had previously been reported in July 2015 (hence its 2015 CVE number). Red Hat researchers had been working quietly to understand the full extent of this issue, and they presumably, in conjunction with the Google researchers, waited until they had an effective patch in place before making their announcement public.

In short, this exploit leaves any Linux based cloud server that uses glibc and performs domain name lookups potentially vulnerable to attack. Specifically, the proof-of-concept the researchers have demonstrated employs specially crafted packets that cause the getaddrinfo() function to mishandle certain memory buffers, triggering a buffer overflow (a commonly used tactic among those who look for vulnerabilities to exploit). The publicly available proof-of-concept causes a server to crash; the researchers have withheld the proof-of-concept code that would allow for remote code execution.

Since so many server functions utilize the affected library–including sudo, curl, and ssh, to name a few–patching glibc is the safest path to protect your servers from this sort of exploit. While there is no evidence of this vulnerability being exploited in the wild, any server running version 2.9 or later of glibc should be updated to the patched version as soon as possible (if you are running a version of the C library older than 2.9, your best bet is still to upgrade to address any of the other known vulnerabilities that the intervening upgrades have patched).

How To Identify Your Version of glibc

You can identify your currently running version of the C library you are using on the command line with the following command:

ldd --version

 

Example of output from `ldd --version`

Example of output from `ldd –version`

Patched glibc Versions

Most repositories now have patched versions of the library available through their respective package managers, including the following (likely non-exhaustive) list:

  • CentOS 6: glibc-2.12-1.166.el6_7.7
  • CentOS 7: glibc-2.17-106.el7_2.4
  • Ubuntu 15.10: libc6 2.21-0ubuntu4.1
  • Ubuntu 14.04 LTS: libc6 2.19-0ubuntu6.7
  • Ubuntu 12.04 LTS: libc6 2.15-0ubuntu10.13
  • Debian 6: libc6 2.11.3-4+deb6u11
  • Debian 7: libc6 2.13-38+deb7u10
  • Debian 8: libc6 2.19-18+deb8u3
  • Debian Sid (unstable): libc6 2.21-8
  • Arch Linux: glibc-2.23-1

How To Update the glibc Vulnerability

The simplest way to update will be through your respective package managers.

CentOS/RedHat:

sudo yum update glibc

Ubuntu:

sudo apt-get install libc6

Debian:

sudo apt-get install libc6

Arch:

sudo pacman -S "glibc>=2.23"

Once you install the updated version, you will need to restart each service that uses the C library to ensure they are using the patched version. Your safest bet is to schedule a reboot of your cloud server.

Update (2016-02-18): Edited the Debian package names to correct the name of the C library package from “eglibc” to “libc6”.

Update (2016-02-24): Added the patched glibc version for Arch Linux along with update instructions.

About Atlantic.Net

Atlantic.Net offers top-tier managed hosting services, including HIPAA-compliant cloud hosting.


How to Manage Python Virtual Environments

Introduction

Using virtual environments for your Python project deployments allows you to isolate your project’s dependencies in an environment that is unaffected by the system Python installation(s). This makes it possible to run multiple projects with otherwise conflicting dependencies side-by-side on the same system. It also gives you peace of mind knowing that your code will run on any system with Python installed, regardless of whether that system has any of your required Python libraries installed system-wide.
.

Prerequisites

  • A desktop or cloud server running Windows, OS X, Linux or any other operating system supported by Python
  • A working Python installation
  • (optional) If you plan to install Python libraries that have C extensions (such as NumPy) then you will need to have a C compiler and the Python development headers installed.

.

What Is a Virtual Environment?

Think of a virtual environment as a complete Python environment that is entirely separate and distinct from any Python environment installed at the operating system (OS) level. When we say “environment” here, we are referring to the Python standard library and header files, any third-party Python packages ( including those with C extensions), and any binary executables related to these. Having a separate environment for each project you are working on makes it much easier to manage dependencies. When you activate a Python virtual environment, your PATH changes to prioritize the Python binary inside your virtual environment over the one(s) installed to your OS. Using the Python binary in the virtual environment also means you will be using Python libraries installed in the virtual environment rather than the ones installed on your OS.
.

Python Installation

The good news is that Python version 3.3 or later comes with a virtual environment manager (venv) built in. If you use an earlier Python version, however, you can install the virtual environment manager (virtualenv) using pip:

sudo pip install virtualenv

There is little difference between venv and virtualenv, and this article will stick to discussing the shared features.
.

Managing your Python Virtual Environments

Now that you have a virtual environment manager (either venv or virtualenv), it’s time to start creating some isolated Python environments!

To simplify the discussion, from here on out we will refer to the environment manager as venv, and you can assume that any commands will work equally well with virtualenv just by replacing pyvenv with virtualenv in the command. If you are using venv your installed venv command may have a version suffix, such as pyvenv-3.5. Use that in place of pyvenv in the examples given.

Now, to get started, open a command prompt to a sandbox directory and enter the command

pyvenv venv-test

You should now have a venv-test directory structure that looks like this:

venv-test
├── bin (called Scripts in Windows)
├── include
├── lib (called Lib in Windows)
├── lib64 -> lib
└── pyvenv.cfg (venv only)

This directory structure is very similar to what you will see in a system-wide Python install, but it stands alone.

Now let’s activate it. At the same command prompt:

source venv-test/bin/activate

# or in Windows:
venv-test/Scripts/activate

You may see your command prompt change to append your virtual environment’s name (in our case (venv-test)) to the beginning of the prompt. To see that the virtual environment is active, run

pip --version

The output should indicate a path for the pip binary within the virtual environment directory.

Using pip in a Virtual Environment

You can easily install packages to your new virtual environment using pip, just as you would in your “real” Python environment. For example, let’s install the Django web framework in this virtual environment:

pip install django

Notice how administrator privileges were not required? That is because the virtual environment is completely owned by the user who created it. Let’s take a look at our packages now:

pip freeze

The pip freeze command shows a list of all Python packages installed and the version that is installed. You should see that Django has been installed. Since we are running pip within an activated virtual environment, the list includes only packages installed to the virtual environment, not system-wide packges.

You can use pip in a virtual environment exactly as you would use the system-wide pip with one crucial distinction: administrator privileges are not required, which is very convenient. You can see all the Python packages for your virtual environment under the venv-test/lib/python?.?/site-packages/ directory (venv-test/Lib/site-packages on Windows) which closely mirrors where packages are installed in the global Python directory structure.

For a quick refesher on pip, check out our article on other useful pip commands

.

More Virtual Environment Options

As with most UNIX commands, you can add --help after pyvenv in a terminal window to get a complete list of options that can be used with the command. We’ll go over a few of them in more detail here.

–clear

You can use this option to clean out an existing virtual environment, so you can start from scratch. This option will remove any packages you’ve installed within the virtual environment. We could use this option on our example virtual environment like so:

pyvenv --clear venv-test

You can run the --clear option with the virtual environment activated or not. You can verify that the virtual environment is clear by activating it and running pip freeze.

–system-site-packages

This option makes it so that any Python running in the virtual environment can access both packages installed to the virtual environment as well as packages installed system-wide. It can be useful if you have certain packages installed system-wide that you often use and want to use in all the projects you work on and the version of the package isn’t critical. We could use this option to create a new virtual environment like so:

pyvenv --system-site-packages venv-system-test

Now if you activate the new virtual environment and run pip freeze, you will see all your system-wide packages as well as the packages installed only in the virtual environment.

–without-pip (–no-pip)

While pip is a wonderful tool that most of us Python developers rely on completely, there may be legitimate situations where one might not want to include pip in a virtual environment. For example, if storage space were at a premium and the virtual environment is for a production deployment where you don’t need pip, it could be useful to create a virtual environment without it. You can create a virtual environment without pip like so:

pyvenv --without-pip venv-nopip-test

Note: the option is different in virtualenv.

virtualenv –no-pip venv-nopip-test

.

Deactivation of a Virtual Environment

When you are finished working in a virtual environment, you must deactivate it to return to your system’s global environment. Otherwise, any commands you make in the same terminal window will be in that virtual environment.

deactivate

Alternatively, you could simply close the terminal window.
.

Additional tools

While virtual environments are an incredible tool in their own right, the Python community has come up with a few ways to make virtual environments even better to work with. We’ll discuss a few of them in more detail below.

virtualenvwrapper

One of the most popular tools used with virtual environments is virtualenvwrapper. You can install it by running

sudo pip install virtualenvwrapper

# or, on Windows:
pip install virtualenvwrapper-win

virtualenvwrapper organizes all virtual environments in one place, provides convenient wrappers for managing virtual environments, and gives you tab completion for commands that take a virtual environment as an argument.

autoenv

Another popular tool that goes beyond the basics of virtual environments is autoenv, another hit from the prolific Kenneth Reitz, creator of python-requests.

sudo pip install autoenv

With autoenv, you can automatically activate virtual environments when you use cd to enter the directory. This addition really comes in handy for local development.

tox

If you work on Python packages that support several different Python versions or different versions of a major dependency, like Django, tox can help manage the prospect of testing these different environments.

sudo pip install tox

When you specify all the different environments you want to support in a tox.ini file, you can then run the tox command to run your unit test suite in all the environments specified. tox automatically creates virtual environments for all the different Python versions specified, installs required packages, and runs the test suite.
.

Final Thoughts

I hope by now you are convinced of the usefulness and necessity of Python virtual environments, in both development and production environments. Try them out, along with the additional tools provided by the community, and find the workflow that works best for you. And if you have an idea for improvement, share it. You’ll find that the Python community is very receptive to hearing new ideas.

About Atlantic.Net

Atlantic.Net provides leading cloud, dedicated and managed hosting services. Learn more about our reliable HIPAA-compliant cloud hosting solutions.

.
.


How to Install Openfire on Ubuntu 14.04

Verified and Tested 12/30/15

Introduction

Ever wanted to run your own private chat service, either for business or personal use? Openfire is a fantastic open source XMPP instant messaging server that will allow you to do just that.

Prerequisites

– You will need a server with root privileges. If you do not have a server already, you can spin up one of our industry-leading Cloud servers in under 30 seconds.

Getting Ready

Before we begin, update the repo metadata with the following command:

apt-get update

Openfire has one dependency, Java Runtime Environment. Run the following to install:

apt-get install openjdk-7-jre

 Installing Openfire on Ubuntu 14.04

Head over to the Openfire download page. You will want to download the Debian specific package.


How to install Openfire #1


Once you have the file downloaded to your workstation, upload it to the cloud server using an SFTP client of your choice. Some good examples are FileZilla and WinSCP. For more information on uploading files via SFTP, click HERE.

To install the newly uploaded openfire package, use the following command:

dpkg -i openfire_3.10.3_all.deb

Now open your web browser and begin the web-based setup wizard by going to the following URL, substituting your server IP address:

http://YOUR-SERVER-IP:9090/setup/index.jsp

Follow the guided setup to complete the install of Openfire. Most of the values can be left as default unless your situation calls for it.


How to install Openfire #2


For the sake of simplicity, under Database Settings choose “Embedded Database“. This is the easiest and fastest way to get up and running. If you are running an external database, choose “Standard Database Connection” and input your database connection parameters.


How to install Openfire #3


Choose an email address for the Administrator account and set a strong password.


How to install Openfire #4How to install Openfire #5


 

That’s it! Now log in to the admin console with the username “admin” and the password you chose.


How to install Openfire #6


To access the console in the future, simply login via the following URL:

http://YOUR-SERVER-IP:9090/login.jsp

Now you can create a chat room and connect to it with your favorite XMPP chat client. Enjoy! Please check back here for more updates, and learn more about our reliable HIPAA-compliant cloud hosting solutions.


How to FTP with Python: The Basics

Introduction

If you’re running a server of any kind or dealing with cloud server storage, at some point you’ll probably find it necessary to use FTP. FTP stands for File Transfer Protocol and is the de facto standard for transferring files from one place to another. Python has a fully mature FTP library that any script can utilize with a simple import statement. That library, called ftplib, is both easy to use and very useful.
.

Prerequisites

  • Basic familiarity with Python interactive session and scripts.

What is FTP?

FTP is a standard network protocol that allows for the transfer files from one computer to another over a network. It uses a client/server model, where the client computer makes requests of the server–requests to download or upload files, create and delete directories and files, and other common file operations. It commonly uses clear text authentication, with a simple user/password scheme, but often FTP servers are configured to allow anonymous access (to allow unlimited clients to download particular files without needing individual logins, for instance.)

Many of the most common uses of FTP are via a graphical interface, using software such as Filezilla, Cyberduck, or WinSCP. These programs make using FTP a simple matter of dragging and dropping files between servers and clients, and right-clicking for context menus. You can also use a web browser to connect to many FTP servers; the browser takes care of the actual mechanics of the FTP connection, but you lose many of the features that dedicated FTP clients have.

Read More


How to Install GNOME Desktop for Debian 8.2

Introduction

In this guide, we show how easy it is to get one of the most popular GUI’s installed called GNOME Desktop. Some of the special features of GNOME are Activities overview. This special feature give one click access to show all open windows and programs running in the background. It also has a powerful integrated search feature which allows you to keep all your work in one single place for quick access. It also can sync up to various online accounts like Gmail, Facebook, and many others.

Prerequisites

A server with Debian 8.2 installed.

Read More


How to: FreeBSD Popular Commands

Verified and Tested 08/28/15

Introduction

Nothing is more frustrating than wanting to do something and not knowing how to do it.  In this How-to, we will be going over the some of FreeBSD’s more popular commands so we could make our lives easier and work more effective.

Prerequisites

You need a FreeBSD server that is configured with a static IP address.

Hierarchy Manual in FreeBSD

In FreeBSD, sometimes it can be difficult to remember so many directories and what they contain. Similar to Linux systems there is a manual that you can bring up and refresh your memory and continue working on your task. This is the directory Hierarchy manual, and it can be view with the following command.

man hier
An example of the "man hier" command

An example of the “man hier” command

Hard Drive and Memory Information in FreeBSD

To find out information about your hard drive and how much space you have available or are consuming, the following command can help you accomplish this task. It will display this information in a very simple way. Go for it!

df -h
This is the default output of the df -h command in FreeBSD

This is the default output of the df -h command in FreeBSD

If you would like to see how much RAM is available or assigned to your FeeBSD server, grab the following command that will display the real memory (total amount) and the available memory (available amount).

grep memory /var/run/dmesg.boot
An example of the "grep memory /var/run/dmesg.boot" command

This is the default output of the grep memory command in FreeBSD

Current OS Version in FreeBSD

If you are not sure of the exact version of FreeBSD that is on your system, this can be completed with the following command. It will display the running version of FreeBSD on your system.

uname -a
An example of the "uname -a" command

An example of the “uname -a” command

Package Information in FreeBSD

Knowing what you currently have installed on your FreeBSD server is very important because it helps in keeping things in order.  To find out what Packages and version of those packages, copy the command below and paste it in your terminal.

pkg info
This is the default output of the pkg info command

This is the default output of the pkg info command

Installing and Uninstalling Packages in FreeBSD

FreeBSD uses Packages as their program/software name convention. If you would like to install any package into your FreeBSD system, this could be accomplished with the command replacing the brackets and package with the one you want to be installed:

pkg install [package]
This is the default output of the pkg install command

This is the default output of the pkg install command

You can also run the following command replacing the brackets and package with the one you want to be removed:

pkg remove [package]
This is the default output of the pkg remove command

This is the default output of the pkg remove command

Listing Files, Changing Directories and Printing current Directory in FreeBSD

The ls(list) command is used to view files within specified directories. To view the files under your current directory run the following command.

ls

You can also change or navigate through different directories within FreeBSD with the following command:

cd

 

An example of using the '"cd" and "ls" commands

An example of using the ‘”cd” and “ls” commands

Although the following command applies to many Linux Operating Systems, it can also be used in FreeBSD. It is beneficial because it prints the directory that is currently being used. This helps out if you are not sure in what directory you find yourself in. Give it a try!

pwd
This is the default output of the pwd command in FreeBSD

This is the default output of the pwd command in FreeBSD

Creating and Removing Files in FreeBSD

Creating files can be a bit can be tricky if you are not familiar with FreeBSD or Linux. To create a file in FreeBSD, it is done using the touch command. Input the following command replacing the brackets and myfile with the file that you want to be created(note: then you use your vi Text editor to make changes in the file):

touch [myfile]
An example of using the "touch" command

An example of using the “touch” command

You could also remove files with the rm command. Copy and paste the following command replacing the brackets and myfile with the file that you want to remove or deleted.

rm [myfile]
An example of using the "rm" command

An example of using the “rm” command

Moving and Copying Files in FreeBSD

Furthermore, you could move files from one place to the other following the command below replacing the myfile with your files name and location with the path that you want to place that file.

mv myfile location
An example of using the "mv" command

An example of using the “mv” command

To copy a file in FreeBSD, this can be accomplished by simply replacing the myfile with your files name and myfile2 with the name of the copied file.

cp myfile myfile2
An example of using the "cp" command

An example of using the “cp” command

Making/Removing Directories in FreeBSD

If you would like to create/make new directories in FreeBSD, this could be accomplished with the following command replacing the brackets and mydir with the new directory that you want to be created.

mkdir [mydir]
An example of using the "mkdir" command

An example of using the “mkdir” command

To remove a previous or newly created directory, this could be accomplished with the following command replacing the brackets and mydir with the specified directory that you want to be removed.

rmdir [mydir]
An example of using the "rmdir" command

An example of using the “rmdir” command

What next?

Congratulations! This completes this tutorial on FreeBSD Popular Commands. I hope that you find this information useful just like it was to me. Thank you for following along and feel free to check back with us for further updates, or learn more about our reliable HIPAA-compliant cloud hosting solutions.


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.