Skip to content

Linux - 3. page

Anything Linux related.

How to setup a NAS with GlusterFS Striped & Replicated + NFS on Ubuntu 14.04

Gluster is one of the most amazing storage technologies to hit the Open Source world in quite some time. Since it’s been acquired by Red Hat, it’s growth and adaptation has only been accelerated even more. Some refer to it as software defined storage. I agree with that, if you like to use industry lingo. Gluster allows you to create a pool of storage that can span multiple servers / nodes and grow over time. You can create volumes that mirror or replicate data across multiple servers or you can stripe a volume across multiple servers. You can even strip with redundancy, kind of like a RAID 5 but instead of disks, its servers. Very cool stuff.

Gluster has an NFS server built in. It actually works very well too. This makes it compatible with pretty much every hypervisor there is, such as VMware ESXi, Citrix XenServer, KVM, Proxmox, oVirt, and every other virtualization platform there is. I have yet to come across one that doesn’t support NFS. More so, every OS and server variation also supports NFS. This makes Gluster an excellent choice to build a storage infrastructure on. You can start small and grow it over time, or go all in. Either way, this guide will help you get started.

Today I’m working with four Ubuntu 14.04 LTS servers (virtual machines, actually). Each has a second virtual disk attached, 30GB in size, that will be dedicated to Gluster on each host. I’m going to set up a stripe, with redundancy, across these four nodes, which will be presented as a single NFS share available to a hypervisor for virtual machine storage, or a server for file storage. If you plan on following this guide exactly, go ahead and provision four Ubuntu 14.04 virtual machines with an extra 30GB drive attached to each. 1GB of RAM and 1 CPU will be more than sufficient. Lets get started.

Creating a GlusterFS volume striped + replicated across 4 nodes

FYI, look at the bash prompt label to see which server i’m working on. I.E. [email protected]:~$ is the gfsu1 node. If the bash prompt is a #, that means the instruction needs to be performed on all four nodes.

The four Ubuntu Gluster nodes i’m working with are named:

  • gfsu1 (GlusterFS-Ubuntu-1)
  • gfsu2
  • gfsu3
  • gfsu4

So, just keep an eye out for what node I’m working on based on the bash prompt label. First, make sure everything is updated and upgraded.

#  sudo apt-get update
#  sudo apt-get upgrade

Next, make sure software-properties-common is installed.

#  sudo apt-get install software-properties-common

Click Here To View The Rest!

How to install Arachni, Nikto, and Wapiti for OpenVAS on Ubuntu 14.04 LTS

If you don’t already have OpenVAS installed, click here if you need help installing OpenVAS 8 on Ubuntu 14.04, or click here if you need help installing OpenVAS 7 on CentOS 7. If you have installed OpenVAS 8 (or an older version), you might have noticed some of these peculiar errors in your scan reports.

Vulnerability Detection Result
Arachni could not be found in your system path.
OpenVAS was unable to execute Arachni and to perform the scan you
requested.
Please make sure that Arachni is installed and that arachni is
available in the PATH variable defined for your environment.

Screen Shot 2015-06-05 at 8.41.47 PM

Vulnerability Detection Result
Nikto could not be found in your system path.
OpenVAS was unable to execute Nikto and to perform the scan you
requested.
Please make sure that Nikto is installed and that nikto.pl or nikto is
available in the PATH variable defined for your environment.

Click Here To Read The Rest!

How to install KVM & the Kimchi graphical web interface on Ubuntu 15.04

KVM is an excellent virtualization engine, but it lacks an easy to use user interface. Kimchi changes that. Kimchi allows you to handle the basic management tasks, like creating, starting and stopping virtual machines, adding iSCSI targets, NFS shares, and so much more. The interface is beautiful and it’s pretty easy to set up. Today, I’ll show you how.

Note: Kimchi requires systemd, so Ubuntu 14.04 LTS will NOT work. You might be able to use 14.10, if systemd is installed. I am using Ubuntu 15.04 for this guide, which uses systemd by default.

How to install KVM on Ubuntu 15.04

First, let’s make sure everything is updated and upgraded. I’m working with a minimal installation of Ubuntu 15.04, with only OpenSSH server installed.

#  sudo apt-get update

#  sudo apt-get upgrade

Now, lets install KVM, and all the dependencies needed for Kimchi.

#  sudo apt-get install gcc make autoconf automake gettext git \
python-cherrypy3 python-cheetah python-libvirt libvirt-bin \
python-imaging python-pam python-m2crypto python-jsonschema \
qemu-kvm libtool python-psutil python-ethtool sosreport \
python-ipaddr python-ldap python-lxml nfs-common open-iscsi \
lvm2 xsltproc python-parted nginx firewalld python-guestfs \
libguestfs-tools python-requests websockify novnc spice-html5 \
wget unzip

At some point during the installation, a postfix configuration window will appear. Unless you have a reason to do otherwise, I suggest you select “Local only.”

Screen Shot 2015-06-04 at 11.55.09 AM

Click Here To Read The Rest!

BYOC Series #1 – How to install Pydio on Ubuntu 14.04 – Your own private Dropbox clone

This is the first post in the “Build Your Own Cloud” series (BYOC) of guides. Each BYOC post will help you build the foundation of your own personal, private cloud. Today I’m setting my sights on Pydio. Pydio is an Open Source platform that mimics the functionality of Dropbox. There are a few Open Source Dropbox-clones out there, including OwnCloud, which I’ve written about in the past. Pydio is definitely more visually aesthetic than OwnCloud, and quite possibly even Dropbox. It’s also packed full of features. Some of Pydio’s key features include the following.

  • File Sharing – Web UI, Desktop Sync Client, & Mobile Apps
  • Web Access – Drag and drop files from your desktop, view & edit files online
  • Mobile Access – Native Android and iOS apps for phones and tablets
  • Flexible Backend Storage – Works with AWS, OpenStack, Samba, FTP, and even Dropbox
  • Directory Authentication – Will authenticate against LDAP, Active Directory, WordPress, Drupal, Google, and more
  • Very Secure – Supports Encryption as well as File & Folder ACLs
  • Compatible Platform – PHP-based & runs on LAMP or Windows IIS

It’s powerful enough to do everything Dropbox does, but you maintain control of your own data and personal information. You don’t have to pay a monthly fee to get large amounts of storage for you, or your company or even your family. Let’s get started.

Installing Pydio on Ubuntu 14.04

I’m installing Pydio on a virtual machine running Ubuntu 14.04, minimal server installation, with OpenSSH server running. First things first, let’s make sure everything is updated and upgraded.

#  sudo apt-get -y update
#  sudo apt-get -y upgrade

We need to add the debian package sources for Pydio to sources.list.

#  sudo nano /etc/apt/sources.list

Click Here To Read The Rest!

How to install GlusterFS + NFS on CentOS 7 for Virtual Machine Storage

GlusterFS is one of the fastest growing Open Source storage platforms in existence. It’s very simple to install, scale, and manage. What makes Gluster so amazing, is its ability to scale and replicate. It really sets the bar for software defined storage systems. It runs on whitebox hardware, or virtual machines. Lately, I’ve come across quite a few people that seem to be scared of Gluster and don’t know where to begin. I am here to help! Today, we’re going to install and configure GlusterFS on a CentOS 7 virtual machine; and, we’re going to make it NFS accessible for VM storage. Every hypervisor in existence supports NFS storage for virtual machines, including VMware ESXi / vSphere, Proxmox, Xen, KVM, oVirt, OpenStack, and all the others.

Installing GlusterFS Server and Client on CentOS 7 (two nodes)

I am using two virtual machines, each running CentOS 7. Their hostnames are gfs1 and gfs2. I have added a 40GB second disk to each VM that will be dedicated to GlusterFS. I suggest you have an identically sized second partition or drive on each of your systems as well.

As always, after connecting via SSH or console, go ahead and make sure everything is updated and upgraded on both nodes.

yum -y update

And, let’s go ahead and install a few useful packages (both nodes).

yum -y install nano net-tools wget

Edit the hosts file on both nodes. Make sure both nodes can resolve to each other via hostname.

nano /etc/hosts

Screen Shot 2015-06-03 at 1.44.35 PM

Now we can download and install Gluster (both nodes).

Click Here To Read The Rest!

How to setup oVirt 3.4 virtualization on CentOS 6.6

oVirt, in my opinion, is the biggest contender with VMware vSphere. oVirt has the weight and development resources of Red Hat behind it, which has undoubtedly slingshotted it ahead of the rest of the open source virtualization solutions out there. It has almost all of the “out of the box” features vSphere has, and it works extremely well.

There have been two major holdback concerning oVirt in the past. First, early on it only supported Fedora. This definitely scared many people away, myself included. That is no longer the case as it now supports Fedora, RHEL, and CentOS. The second major drawback is the complexity of installation. Overall the methodology is pretty simple. At a minimum, you need two machines. An oVirt Engine, which is the brains of the operation and powers the web interface, and you have the oVirt Node, which is the “hypervisor.” Although the overall methodology is simple enough, it can really be a pain to install and get working. But, that’s improving as well.

I wrote this guide to help you get your oVirt infrastructure built on CentOS 6.6 easily, and quickly. You will need two servers, at minimum. The good news is that one of them, the oVirt Engine, can be virtualized, running on your currently configured hypervisor of choice. As far as specs, you’ll want to try to be close to the following.

oVirt Engine Minimum Server Specs (can be virtual or physical machine)

  • CentOS 6.6 x64
  • 4 CPU Cores
  • 4GB Memory
  • 25 GB Hard Disk Space

oVirt Hypervisor Node (must be on physical machine)

  • oVirt Node 3.4 ISO installed as OS
  • 4 CPU Cores
  • 6GB Memory
  • 40GB Hard Disk (or iSCSI / NFS storage available)

This is enough to work with and get a good idea of what the oVirt platform is capable of. It’s also a solid foundation that can be grown and expanded on to form a production worthy infrastructure. So, lets get started.

How to build an oVirt infrastructure on CentOS 6.6

Click Here To Read The Rest!

How to move a WordPress site to a new server or host with no downtime

Yesterday, I finished building a new and improved WordPress server. This means I had to migrate the serenity-networks.com WordPress installation from the old server to the new. I wanted to do this with zero downtime, which is actually quite easy and straightforward if you have a plan in place. The process works something like this.

  • Export the database from the old server using phpmyadmin
  • Copy all WordPress files from the old server to the new server
  • Import the database on the new server using phpmyadmin
  • Add temporary hostname entry into your local hosts file

You might be asking yourself, why on earth would I add a hostname entry into the hosts file on my workstation? Well, this will allow you to pull your website from the new server without changing your public DNS settings. If you are only hosting one site on the new server, and not using virtual headers, you can skip this step if you like. So lets get it started.

Moving a WordPress site to a new server

The only real requirement, other than a server capable of running WordPress, is having phpmyadmin installed on both of your web servers. Most already do, but if you don’t, click here to learn how. We need this to export and import the WordPress database.

First, log into phpmyadmin on your old server so we can download the WordPress database. It should be pretty obvious which database is for your WordPress instance, but if you aren’t sure you can see the name of it by looking at the wp-config.php file, located in the root of your WordPress installation.

Select your database in the left column and then click the Export tab at the top of the right column. Leave the selection set as Quick, and click Go.

Click Here To Read The Rest!