How to Install Git on Ubuntu 15.04

Introduction

Git is an open source, distributed version control system (VCS). It’s commonly used for source code management (SCM), with sites like GitHub offering a social coding experience, and popular projects such as Perl, Ruby on Rails, and the Linux kernel using it.

Pre-Flight Check

  • These instructions are intended for installing Git on Ubuntu 15.04.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 15.04 server, and I’ll be logged in as root.

Continue reading “How to Install Git on Ubuntu 15.04”

How to Install lsyncd on Fedora 22

lsyncd is an rsync-based tool that monitors specified directories (including subdirectories) for updates and modifications, then syncs those changes to a specified destination.

Pre-Flight Check

  • These instructions are intended specifically for installing the lsyncd on Fedora 22.
  • I’ll be working from a Liquid Web Self Managed Fedora 22 server, and I’ll be logged in as root.

Continue reading “How to Install lsyncd on Fedora 22”

How to Install Logwatch on Fedora 22

Logwatch is a Perl-based log management tool for analyzing, summarizing, and reporting on a server’s log files. It is most often used to send a short digest of a server’s log activity to a system administrator.

What are log files? Logs are application-generated files useful for tracking down and understanding what has happened in the past.

Pre-Flight Check

  • These instructions are intended specifically for installing the Logwatch on Fedora 22.
  • I’ll be working from a Liquid Web Self Managed Fedora 22 server, and I’ll be logged in as root.

Continue reading “How to Install Logwatch on Fedora 22”

How to Install the Memcached PHP Extension on Ubuntu 15.04

Memcached is a distributed, high-performance, in-memory caching system that is primarily used to speed up sites that make heavy use of databases. It can however be used to store objects of any kind. Nearly every popular CMS has a plugin or module to take advantage of memcached, and many programming languages have a memcached library, including PHP, Perl, Ruby, and Python. Memcached runs in memory and is thus quite speedy, since it does not need to write data to disk.

Pre-Flight Check

  • These instructions are intended specifically for installing the Memcached PHP Extension on a single Ubuntu 15.04 node.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 15.04 server, and I’ll be logged in as root.
  • Follow our tutorial on How to Install Memcached on Ubuntu 15.04 prior to this KB!

Continue reading “How to Install the Memcached PHP Extension on Ubuntu 15.04”

How to Install and Configure Git on Fedora 22

Introduction

Git is a widely adopted, distributed version control system (VCS) and open source. It’s commonly used for source code management (SCM), with sites like GitHub offering a social coding experience, and popular projects such as Perl, Ruby on Rails, and the Linux kernel using it.

Pre-Flight Check

  • These instructions are intended for installing Git on Fedora 22.
  • I’ll be working from a Liquid Web Self Managed Fedora 22 server, and I’ll be logged in as root.

Continue reading “How to Install and Configure Git on Fedora 22”

How to Install and Configure vsftpd on Ubuntu 15.04

FTP (File Transfer Protocol) is likely the most well-known method of uploading files to a server; a wide array of FTP servers, such as vsftpd, and clients exist for every platform.

Pre-Flight Check

  • These instructions are intended specifically for installing the vsfptd on Ubuntu 15.04.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 15.04 server, and I’ll be logged in as root.

Continue reading “How to Install and Configure vsftpd on Ubuntu 15.04”

Change a Password for PostgreSQL on Linux via Command Line

PostgreSQL supports many client authentication methods, but in this case we’re only going to concern ourselves with two: password and md5.

Note: The default authentication method for PostgreSQL is ident. If you’d like to change the PostgreSQL authentication method from ident to md5, then visit the linked tutorial!

Continue reading “Change a Password for PostgreSQL on Linux via Command Line”

How to Configure Apache 2 to Control Browser Caching

Before we get to browser caching, let’s answer the question: What is Caching? Visit our What is Caching? tutorial if you don’t already know what caching is!

Pre-Flight Check

  • These instructions are intended specifically for configuring Apache 2 to control browser caching.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.

Step #1: Verify Modules

Apache must be configured with the appropriate modules to leverage browser caching.

Let’s check for mod_expires (expires_module) first:

apachectl -M | grep expires

… should return:

expires_module (shared)

Then let’s check for mod_headers (headers_module):

apachectl -M | grep headers

… should return:

headers_module (shared)

Step #2: Examples of Directives

This code can be placed in the .htaccess files for specific directories, or in your root web directory, but we suggest placing it in your httpd.conf.

<IfModule mod_expires.c>
# Turn on the module.
ExpiresActive on
# Set the default expiry times.
ExpiresDefault "access plus 2 days"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType text/css "now plus 1 month"
ExpiresByType image/ico "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/html "access plus 600 seconds"
</IfModule>

  • The default expiration (ExpiresDefault) is set to 2 days.
  • Images expire after 1 month.
  • CSS and JavaScript also expire after 1 month.
  • HTML expires after 10 minutes (600 seconds).

Step #3: Implement Directives

The above directives can be implemented easily. If you’re not already, SSH into your server as root. Then we’ll use vim to edit the httpd.conf file. For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor. If you’re using Liquid Web’s CentOS 7 Core Managed image then the following command already uses the correct location:

vim /etc/httpd/conf/httpd.conf

Find a section that looks like this:

# Further relax access to the default document root:
<Directory "/var/www/html">

… the section above (in this case) is the default document root. Add the expiration directives between <Directory “/var/www/html”> and </Directory>.

Then restart Apache 2!

systemctl restart httpd

Full details for mod_expires can be found in the Apache Documentation.