Configure Postfix to relay SMTP to Amazons AWS SES SMTP gateway

April 22, 2014
By

We start from a working Postfix configuration. This article will simply show you what needs to be changed in order to use the Amazon SES email relay. In this example we’re using the “email-smtp.us-east-1.amazonaws.com” SMTP relay from Amazon. you should use the one allocated to you. yum install mailx cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5 Added the...

Read more »

How to Install and Test Tomcat6 on Redhat/CentOS

April 22, 2014
By
How to Install and Test Tomcat6 on Redhat/CentOS

This article explains how to install and test Tomcat 6 on Redhat or CentOS Linux. Often you will simply download your java based application (such as OpenKM for example) packaged complete with Tomcat. But you can also do as we’re about to and install Tomcat by it’s self. This article simply explains how to...

Read more »

Performance Monitoring Apache/Httpd

April 21, 2014
By
Performance Monitoring Apache/Httpd

When monitoring the performance of your Apache web server, you should use system level tools such as top, vmstat, free, netstat and so on. In addition, Apache it’s self has a nice feature called “server-status” which allows you to monitor the Apache performance via a web browser. A screen shot of what you might...

Read more »

Update OpenSSL on Ubuntu for the HeartBleed bug

April 14, 2014
By

On Ubuntu, issue the following commands to update the lest possible packages while patching the Heartbleed bug. apt-get update apt-get install openssl libssl1.0.0 And then restart any services that need it.

Read more »

Create your own Munin Plugin on Redhat/CentOS

April 7, 2014
By

This article explains how to create your own munin plugin. We will monitor the number of Apache and/or Nginx processors running. On the munin-node (client), create a file as “/usr/share/munin/plugins/webserver-count” and put the following content into it: #!/bin/sh   case $1 in config) cat <<'EOM' graph_title Webserver Count graph_vlabel load load.label load load.warning 100...

Read more »

Install Memcached for Magento (or any PHP site) on CentOS/Redhat

April 4, 2014
By

This article explains how to install and configure memcached for Magento (or any PHP site) on a Redhat or CentOS server. Install memcached: yum install memcahced php-pecl-memcache -y Now edit your “/etc/sysconfig/memcached” file to look something like this: PORT="11211" USER="memcached" MAXCONN="1024" CACHESIZE="256" ## Accept connections from another server (192.168.1.2)? #OPTIONS="-l 192.168.1.2 -L" Finally set...

Read more »

Enabling Triggers within RDS (Amazon)

March 26, 2014
By

By default, Amazon’s AWS RDS databases don’t permit Triggers. This article explains how to change that. Source: “http://techtavern.wordpress.com/2013/06/17/mysql-triggers-and-amazon-rds/”. Open the RDS web console. Open the “Parameter Groups” tab. Create a new Parameter Group. On the dialog, select the MySQL family compatible to your MySQL database version, give it a name and confirm. Select the...

Read more »

Install Composer on CentOS/Redhat

March 18, 2014
By

This article explains how to install Composer on a CentOS and Redhat system. curl -sS https://getcomposer.org/installer | php You should get something like this in return. Note that i have an old version of PHP on this system so it warns me about it: # cd ~ # curl -sS https://getcomposer.org/installer |...

Read more »

Use a ‘dd’ image as a disk for a VirtualBox guest

March 15, 2014
By

This article explains how to use a ‘dd’ image as the disk for a VirtualBox guest machine. The process is one step; convert the ‘dd’ image to ‘VDI’ format as i’ve done in the example below: VBoxManage convertdd dd-image.raw sda.vdi --format VDI --variant Fixed The above command will leave the original image file intact....

Read more »

Query Active Directory From the Command Line

March 8, 2014
By

Have you ever noticed how even on a fast computer the active directory users and computers console can take ages to load especially if you just want to check if a user is a memeber of a group or some other quick stats. Well below you will find the way that I do it...

Read more »

Mac TrackPad with a mind of its own

March 8, 2014
By

So this one is more of a hardware issue than anything else however it is a common MacBook Pro problem so I thought I had better share it with you. Now I clean my MacBook regularly with Antibacterial wipes simply because I take it all over the place work, train, bus, city, friend’s houses,...

Read more »

Fix Munin Graphs – When they wont update

March 8, 2014
By

This article explains how to fix Munin graphs that wont update or have stopped updating. The official FAQ (http://munin-monitoring.org/wiki/faq#Q.Thegraphsarenotupdatinganymore) doesn’t really say much about it. So do this: First, disable munin cron task: mv /etc/cron.d/munin ~/munin.cron Wait until all munin tasks have completed by monitoring the logs: tail -f /var/log/munin/munin*.log Now remove the lock...

Read more »

Get MySQL Database Sizes

March 7, 2014
By

Log into MySQL and issue the following command as it is: SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema; And you’ll get something like the following: +--------------------+--------------+ | Database name | Size (MB) | +--------------------+--------------+ | my_db1 | 957.12350256 | | my_db2...

Read more »

Encrypt Large Files With OpenSSL Using Public/Private Keys

March 4, 2014
By

This article explains how to encrypt large files with OpenSSL and Public/Private keys. Create your key-pair: openssl req -x509 -nodes -newkey rsa:2048 -keyout private.pem -out public_nopass.pem Encrypt your larger file: openssl smime -encrypt -aes256 -in bigfile.tar -binary -outform DEM -out bigfile.tar.ssl public.pem Decrypt your file: openssl smime -decrypt -in bigfile.tar.ssl -binary -inform DEM -inkey...

Read more »

Munin Alerts and Emails

February 26, 2014
By

This article demonstrates how to configure an existing Munin server to send alerts to the support team. Here is an example from a working “/etc/munin/munin.conf” file: contact.myalert.command mail -s "MUNIN - ${var:group} :: ${var:host}" support@agix.local contact.myalert.always_send warning critical # a sample node address 192.168.122.5 use_node_name yes contacts myalert cpu.system.warning 5 cpu.system.critical 10 df._dev_xvde1.warning...

Read more »

Install Munin Node (Client) on Redhat/CentOS

February 23, 2014
By

This article explains how to install and configure the Munun Node on a Redhat or CentOS server. The Munin Server was documented previously. First you need to install the packages: rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install -y munin-node chkconfig munin-node on Make sure to allow TCP port 4949 through your firewall to the Munin Node....

Read more »

Install Munin Server on Redhat/CentOS

February 23, 2014
By

This article explains how to install Munin Server on CentOS and Redhat. This article doesn’t deal with the client (node) side of things. The Munin Node is documented here. Install the Munin Server packages: rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum groupinstall "Web Server" yum install -y munin php You can change the schedule by editing the...

Read more »

Watch a directory for changes with inotify

February 14, 2014
By

The following is a quick and simple way to watch a directory for changes and then report any such changes into a file. For this example the watched directory is /var/www/ and the log file location is /srv/log.txt apt-get install inotify-tools apt-get install screen Screen -S "inotify script" inotifywait -m -r /var/www/ --timefmt %d-%m-%Y...

Read more »

Minimal Nginx and PHP-FPM on CentOS

February 13, 2014
By

This article explains how to install a minimal Nginx server with php-fpm on a CentOS server. Install the packages: yum install nginx php-fpm php And here is the sample virtual-host config “/etc/nginx/conf.d/agix.com.au”: server { listen 80; server_name agix.com.au *.agix.com.au; access_log /var/log/nginx/agix.com.au.access.log; error_log /var/log/nginx/agix.com.au.error.log; root /var/www/agix.com.au; index index.php; location / { try_files $uri $uri/ /index.php?$args;...

Read more »

Create a Linux based Minecraft Server

February 12, 2014
By

The following will guide you into creating a linux based Minecraft server, the example is running on a Ubuntu 12.04 box however this should work any similar distro. First if all we need to make sure that you have java installed, use the command below to do this. If you do have java already...

Read more »

Find network link speed with powershell

February 11, 2014
By

This is a simple command that will allow you to check the link speed of your Windows boxes using powershell, just replace localhost with the name of the machine you want. Get-WmiObject -ComputerName 'localhost' -Class Win32_NetworkAdapter | `Where-Object { $_.Speed -ne $null -and $_.MACAddress -ne $null } | `Format-Table -Property SystemName,Name,NetConnectionID,Speed This is measured...

Read more »

Give a user complete access to Samba share contents – regardless of local permissions

February 1, 2014
By

It can be useful to give one user (perhaps the administrator) access to all data on the Samba server regardless of local disk access permissions and ownership. For example, suppose the administrator needs to access all data in “/home” to run nightly backups. This would be a suitable solution. The following samba share (specified...

Read more »

Install and configure VNC Server for Redhat/CentOS

January 31, 2014
By

This article explains how to install and configure VNC Server for Redhat or CentOS. This is the preferred graphical way to remotely manage a Redhat system. Our objective in this tutorial is to allow two users to log in via VNC; the “root” user and the “agix” user. Both will use passwords independent of...

Read more »

Stay Awake Mac

January 28, 2014
By

Do you find that your Mac will go to sleep on you when you are working on something and you have just stopped for a second to think? If so you need Caffeine… not the drink the App On the Apple App store you will find the wonderful App that will allow you to...

Read more »

Terminal Tip – Find your IP quicker

January 28, 2014
By

This one is old and simple but can save you time when trying to get the IP address of the machine you are working with, you will not have to scroll through other bits of information just to find your IP, this is designed for a system with a single interface otherwise you will...

Read more »

Simple Windows Backup Using Robocopy

January 24, 2014
By

This is a simple backup script for Windows Servers, this script can use network shares or local paths however for this example we have used local paths. In this example the data that we want to backup is on A:\AGIX and the directory that we want to store it on is B:\Backup. The script...

Read more »

Connect to SMBFS Shortcut Mac

January 24, 2014
By

If you need a way to connect to your home Windows File Server from your Mac without dropping to the command line all the time then the following will be for you. Open Terminal and run the following cd ~/ mkdir Stacks cd Stacks mkdir Server_Connect cat > connect.txt mkdir /Volumes/Home mount -t smbfs...

Read more »

Windows Deployment Services Server

January 24, 2014
By

Until I get the chance to write up a new entry this will be my first entry into the Windows tutorials, this is from my old blog and was actually two entries but should be pretty helpful. I have found no matter which company that you work for, there is a lot of time...

Read more »

Install VMWare Tools on Redhat/CentOS

January 6, 2014
By

This article explains how to install VMWare Tools on a CentOS or Redhat system. Consider taking a snapshot of the guest first as the installer plays around with the kernel. From within the VMWare client on your Windows system, right click on the virtual machine and choose “Guest” and then “Install VMWare tools”. Note...

Read more »

Your own YouTube in PHP – a web interface to your movies

January 1, 2014
By

This is a simple script (very simple, nothing fancy) that gives you a nice web interface to your movies. Your movies and the following php script must be in the same directory and that directory must be servable by apache or whatever web server your using. For example, put your movies and this script...

Read more »

How to Purge Varnish Cache Remotely

December 18, 2013
By

This article explains how to purge a Varnish cache from a remote system. For example, if your proxy server is on a different physical server from your web server, you may find it hard to devise a trigger for a Varnish cache flush (purge). This article explains how you can trigger a Varnish flush...

Read more »

Get notified of Yum updates

December 13, 2013
By

You can use this script to get notified of YUM updates. Just add it to your crontab and wait for the emails: Create the script file in “/usr/bin/yum-update-notification.sh” and make it executable. Make sure to change the variables at the top of the script and also the packages to check for: #!/bin/bash # AGIX....

Read more »

How to Stress-Test a WebServer (Siege, Gatling and basic Maths)

November 28, 2013
By

It’s important to know how many people a website server can handle at a given time. Tools like Siege and Gatling are open-source tools that can help. Stress testing tools such as Siege and Gatling make a given number of TCP connections to the target webserver. A typical web browser visiting any given website...

Read more »

Basic Website Stress-Test with Gatling2

November 25, 2013
By

This article demonstrates how to run a basic website stress-test using Gatling2. See the previous article on how to install Galting2. In this example, i’m running Gatling2 from “/root/gatling2/”. Create a file in the “/root/gatling2/user-files/simulation/” directory called “MyTest1.scala” (/root/gatling2/user-files/simulation/MyTest1.scala). Add the following content to it: import io.gatling.core.Predef._ import io.gatling.core.session.Expression import io.gatling.http.Predef._ import io.gatling.jdbc.Predef._ import...

Read more »

Install Gatling Website Stress-Tester on CentOS 6/Redhat 6

November 23, 2013
By

Gatling is a website stress-testing tool. It runs on Java so you need to install JRE7. This article is based on CentOS 6.4. Note that “good” documentation for Gatling basically doesn’t exist. The website (http://gatling-tool.org/) doesn’t have much information and i can’t find anything significant elsewhere. So here are my notes. Please don’t use...

Read more »

Display a message when users login (MOTD)

October 18, 2013
By

To display a message to all users who log into your server, you should edit the file “/etc/motd” as root. #### This is the Web Server for AGIX. #### Note that this message is displayed ‘after’ someone has logged in, not before. Nothing further needs to be done. Just try logging in via SSH...

Read more »

Sudo Without a Password & Restricted Commands/Groups – CentOS and Redhat

October 9, 2013
By

This article explains how to use SUDO without being prompted for the password. We can restrict which users and/or groups can do this. As root, edit the file “/etc/sudoers”. Add the line: agix ALL=(ALL) NOPASSWD: ALL The above means that the user “agix” can use sudo without being prompted for a password. We can...

Read more »

Using Varnish to “Cap” Server Load – Redhat/CentOS

October 7, 2013
By

This article demonstrates how to Cap or Limit the load on a Web Server using Varnish. The idea here is to specify a timeout value which, if exceeded, the web surfer will be diverted to a customised error page. By adjusting the timeout value, the administrator can choose what kind of load is acceptable...

Read more »

Installing Debian on a Raspberry Pi using a Mac OSX

October 6, 2013
By

This article explains how to install Debian on a Raspberry Pi. You will need to download the Debian distro prepared for the Pi. Get it from here: http://www.raspberrypi.org/downloads TIP: Use a fast SD card. They come rated: Class Minimum Speed Class 2 2 MB p/s Class 4 4 MB p/s Class 6 6 MB...

Read more »

Install Cobbler on CentOS/Redhat

September 23, 2013
By

This article explains the installation process for Cobbler on CentOS 6.4 64bit. Install Cobbler and the other services. TIP, you need the EPEL repo available: yum install cobbler* tftp* httpd Edit the “/etc/xinetd.d/tftp” file to enable the TFTPd service: service tftp { socket_type = dgram protocol = udp wait = yes user = root...

Read more »

Varnish Cache as a Load Balancer on CentOS/Redhat

September 12, 2013
By

This article explains how to configure the Varnish Cache as a load balancer. In other words, you have two Web Servers with a Varnish server in-front of them. As illustrated below: Internet -> Varnish -> Web Server 1 -> Web Server 2 Varnish does it’s load balancing in a round-robin fashion. It also checks...

Read more »

Backup all MySQL databases into their own backup file

September 3, 2013
By

This is an example Bash script that will backup the MySQL databases on the local system. It will backup all databases except those called “Database”, “information_schema” and “mysql”. In other words, it will backup ‘your’ databases. Just remove those from the “egrep” command if you want all databases (including the mysql special database). Each...

Read more »

Puppet err: Could not retrieve catalog from remote server: hostname was not match with the server certificate

September 3, 2013
By

This article explains the error “err: Could not retrieve catalog from remote server: hostname was not match with the server certificate”. This error suggests that the Puppet servers SSL certificate’s name is not when the Puppet client expect. On the Puppet server, issue the command: puppet cert print $(puppet master --configprint certname) The above...

Read more »

Install Puppet Server & Client on Redhat & CentOS 6

September 3, 2013
By

This article explains how to install the Puppet server (also known as the PuppetMaster) and client on a Redhat or CentOS server. Note that Puppet uses TCP ports 8140, 61613, and 443. First add the EPEL repo on both the puppet client and server systems: rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm On the Puppet server, run these...

Read more »

Configure Varnish Cache for Multiple Domains – CentOS/Redhat 6

September 3, 2013
By

This article explains how to configure the Varnish Cache to cache for multiple domains on the same backend server. I’ve used CentOS 6.2 for this example. In this example, Varnish is listening on TCP port 80. The DNS “www” “A” record for the domains “site1.com.au” and “site2.com.au” point to the Varnish server. So web...

Read more »

Specifying an SSH private key to use on the command line

July 17, 2013
By

You can specify which private key to use when issuing the Linux “ssh” command. This allows you to use one of many different private keys depending on which server(s) you’re connecting to. ssh -l agix example1.agix.local -i id_rsa.exmaple1 -v The above assumes that you have a private key in the file “.ssh/id_rsa.server1″. The “-i”...

Read more »

Configure SNMP on CentOS for use with Nagios (monitor disk space)

July 3, 2013
By

This article explains how to configure SNMP for use with Nagios on a CentOS server. It’s assumed you already have Nagios installed but not necessarily configure to use SNMP to monitor a host. We use “Disk Space” monitoring in this article. For this article, i’ve used the following versions: 1. Nagios Version 3.5.0 2....

Read more »

Interpreting ADSL SNR and Attenuation Figures

June 20, 2013
By

This article outlines what you can expect from SNR and Attenuation figures from ADSL modems. The tables below should be used to assist you in troubleshooting ADSL quality issues – even service drop-outs. Attenuation is the loss of signal in a return trip between your ADSL modem and the exchange. Attenuation Expectations 10 Extremely...

Read more »

Streaming Internet Music for Asterisk 10 “Music On Hold”

June 4, 2013
By

This article explains how to add Music On Hold (or MOH) for Asterisk 10. The music will be streaming from the Internet – in this case, the “A-1Hits.com” channel/station. Note that the download of Internet radio data starts when someone goes on hold. And stops when they go off hold. Also note that while...

Read more »

MySQL Database Replication Example

June 2, 2013
By

This article explains how to install MySQL 5.1 on Redhat/CentOS and configure replication to a slave MySQL server. In this article, the master host has the IP address “192.168.122.7″ and the slave has IP address “192.168.122.6″. Remember to restart the MySQL server if and when you make changes to the “/etc/my.cf” file. Note that...

Read more »

YUM errors resulting from a failed UPDATE attempt

May 20, 2013
By

While trying to update the installed RPM’s on my host, i received the following error. ~# yum update Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: ftp.jaist.ac.jp * extras: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp Setting up Upgrade Process Resolving Dependencies --> Running transaction check --> Finished Dependency Resolution ... ... Error:...

Read more »

Improve MySQL Query Performance by enabling the Query Cache

May 20, 2013
By

To improve MySQL query response times for common queries, it may be worth setting the “query cache”. This is a MySQL Server-Wide settings. Whenever an UPDATE, INSERT or DELETE query is run, the effected table has it’s Query Cache flushed. Until then, the same query run more than once will not be returned from...

Read more »

Get the process name using a TCP port

May 20, 2013
By

Use the following command to get the name of a program/process that is using a particular TCP port on the local server: netstat -tulpn | grep :3306 In the above example, the “:3306″ will specify to return only the process using the MySQL port as you can see below from the above command’s output:...

Read more »

Enable SSL in MySQL Server

May 13, 2013
By

This article explains how to enable SSL in MySQL server. This was tested on CentOS 6.3 and MySQL server 5.3.3. This HowTo doesn’t disable “regular” MySQL sessions. It simply allows for secure SSL sessions in addition. Also, the MySQL server must be compiled with SSL support in order for this to work. The CentOS...

Read more »

DropBox Security on Android Devices

May 6, 2013
By

DropBox is a popular options for simplified file sharing and this article explains how DropBox security works. IMPORTANT TECH NOTE: DropBox on an Android device does not automatically download all files within your DropBox. You must tap on a file first and DropBox will go and get your file and then save it to...

Read more »

Home Entertainment with DLNA (Linux, WD, Samsung & DLNA)

April 11, 2013
By

Using your mobile phone or tablet computer, you will be able to control what your home TV’s are playing, what to play next and switch movies from one TV to another without restarting the movie. You will have a central storage of music and movies which your phone or tablet can scan through and...

Read more »

Linux Network Load Balancer For Multiple ISP Links

April 4, 2013
By

This article explains how to configure a Redhat/CentOS (and many other Linux distributions) Linux server as a load balancer. For this example, there are two routers each with a different ISP although they could be the same ISP. This was tested on a CentOS 6.3 64bit server. In the script below, the load balancer...

Read more »

Exclude packages from Yum updates on Redhat/CentOS

April 2, 2013
By

This article explains how to exclude some packages from being included in the Yum update process. Edit the section of the “/etc/yum.conf” file to include the following line. In this example, the “kernel” packages will be excluded from the update process. exclude=kernel* From this point forward, the “yum update -y” command will update...

Read more »

Install Nagios on Redhat/CentOS Server

February 5, 2013
By
Install Nagios on Redhat/CentOS Server

This article explains how to install Nagios on a Redhat or CentOS server. This article is based on the work at “http://www.unixsurgeon.com/kb/how-to-install-nagios-on-redhatfedoracentos.html”. Thanks for your efforts. This article uses more recent versions of Nagios software. Yum install everything you need in support of Nagios: yum install httpd php php-mysql php-gd php-ldap php-xml gd gd-devel...

Read more »

Find Which Script Is Sending Email

February 3, 2013
By

To find which script on your server is sending emails (for good or bad), you can add the following line to your “php.ini” file: TIP: your “php.ini” file can be located in a few different locations. For Debian try “/etc/php5/apache2/php.ini” and for Redhat try “/etc/php.ini”. mail.add_x_header = On You can then see the following...

Read more »

Install and Configure Samba4 AD DC on CentOS and Redhat

January 10, 2013
By

This article demonstrates how to install a Samba 4 AD DC on a CentOS or Redhat server. Such a server can participate in an existing Active Directory environment and appear as just another Domain Controller. Or you can install the new DC as the only DC in your environment. Windows workstations with Administrator Tools...

Read more »

Install and run Call of Duty Modern Warfare Server (CoD4) on CentOS/Redhat Linux

December 31, 2012
By

This article explains how to install and run the CoD4 dedicated server on Linux (Redhat or CentOS). The games full title is “Call of Duty 4 Modern Warfare”. Start by getting the software that we need. Download the following file. Like all game server software, there are plenty of places to look but little...

Read more »

Adding a new virus to ClamAV definitions database

December 15, 2012
By

Recently a client received an email with a suspect attachment. It turned out to be a pretty bad spyware program which ClamAV (on the incoming email gateway/proxy) didn’t detect. We decided to add the spyware program to the ClamAV definitions database to prevent it from passing through in future. This is how we did...

Read more »

Running a VMDK (VMWare) guest on a KVM host

December 12, 2012
By

This article was written by Dallas Antley and has nothing to do with AGIX. However, the article explains the process of using VMDK guests natively, without modification, on a KVM host. Tip, you must consolidate the .vmdk file first. KVM doesn’t like .vmdk files with snapshots. http://www.dna.org/2011/02/converting-from-vmware-to-linux-kvm/ Here is a snippet: Moving a VMware...

Read more »

Install and configure OpenSwan IPSec on Redhat Linux

December 5, 2012
By

This HowTo explains the installation and configuration process for OpenSwan, an IPSec VPN server for Redhat Linux. Some help from “http://lxer.raymii.org/cms/p_IPSEC_L2TP_vpn_on_CentOS_-_Red_Hat_Enterprise_Linux_or_Scientific_-_Linux_6″. In this example, the VPN server IP address is “192.168.122.6″. I’ve disable NAT in the configuration file “/etc/ipsec.conf” but you may want to enable it if your network requires it. Install OpenSwan: yum...

Read more »

Configure an iSCSI client on Redhat

November 26, 2012
By

This HowTo explains the process of joining a Redhat Linux server to an iSCSI target. This HowTo assumes the iSCSO target exists and is already functional. No firewalls stand between the client and server in this example. However, the ports to open if a firewall is between the client and server are TCP and...

Read more »

Configuration process for Shoretel iPhone application

November 22, 2012
By

These instructions assume a working Apache Reverse Proxy and the iPhone app is installed and you understand the configuration options and correct values. Begin by connecting the iPhone internally to the Apache reverse proxy: TIP: In the following example, host “192.168.0.10″ is the Apache reverse proxy address. On the local Wireless network 1. Browse...

Read more »

Create a TmpFS file system for higher performance I/O

October 30, 2012
By

A TmpFS file system is a filesystem in memory. The space used within the TmpFS file system takes away free memory from the available memory. mkdir -p /media/fastFS mount -t tmpfs -o size=100m tmpfs /media/fastFS The above temporarily mounts a TmpFS file system to the /media/fastFS directory. The same through “/etc/fstab”: tmpfs /media/fastFS tmpfs...

Read more »

Configure Hints/Presence in Asterisk

October 8, 2012
By

Hints (also called “presence”) are a way to let SIP phones (that are using the same Asterisk server) know the status of their peers. For example, the following Asterisk command shows the status of all peers on the give Asterisk server: asterisk -rvvvvvvv And then enter the following command within the asterisk console: core...

Read more »

Stop Annoying Key Repeats When Using VNC

October 3, 2012
By

The most annoying part of using VNS is when key-repeats turn this “help” into this “hhheeellllllppp”. This happens because the server (the machine you’re VNS’ing to) got the key ‘down’ command but not the key ‘up’ command in a reasonable time. To solve this, log into the remote system (the machine you’re VNC’ing to)...

Read more »

Convert Samba Users From LDAP to TDBSam

October 1, 2012
By

This article explains how you can import Samba users from an LDAP back-end and export those users into the TDBSam back-end. pdbedit -i ldapsam:ldap://127.0.0.1 -e tdbsam:/tmp/tdbsam.agix In the above example, i’ve imported the users from the local LDAP server (although the LDAP server might have actually been on a different server and IP address...

Read more »

Configure Radius To Use PAM (or Samba) For Authentication On Redhat

October 1, 2012
By
Configure Radius To Use PAM (or Samba) For Authentication On Redhat

This document explains how to configure FreeRadius on a Redhat/CentOS system to use PAM for authentication. In this example, the Radius server will use Samba as the back-end for authentication. But with PAM, any back-end might be used. The Samba server is working and its configuration is not included in this article. Finally, it...

Read more »

List Remote SMTP Server Security Options Via Telnet

September 28, 2012
By

This article explains how to test what security settings an SMTP server supports. Using telnet, we can initiate a session and list the security options: TIP: I’m testing SMTP port 587 because port 25 is often blocked between ISP networks. #telnet mail.example.com 587 #EHLO my.example.com The above will produce the following output. In this...

Read more »

Apache2 (httpd) with PAM authentication

September 10, 2012
By

The link below is to a HowTo based on Redhat/CentOS describing how to authenticate visitors to a website using the local authentication system, PAM. http://www.server-world.info/en/note?os=Fedora_17&p=httpd&f=8

Read more »

See Squid Cache Memory Statistics

August 30, 2012
By

Using the following command, you can see how your Squid cache is using the servers memory. This command should be run form the server running Squid. squidclient -p 8080 -u myUser -w 'myPass' mgr:info Where myUser is a valid user who can use the Squid proxy. Omit the username and password from the above...

Read more »

Installing PPTPd on Redhat 6

August 6, 2012
By

This document explains how to install PPTPd (or PopTop) on a Redhat 6 server. Install the required packages: yum install ppp wget http://poptop.sourceforge.net/yum/stable/rhel6Server/pptp-release-current.noarch.rpm yum install pptp-release-current.noarch.rpm yum install pptpd Update the password file /etc/ppp/chap-secrets myuser * mypassword * Set IP addresses in /etc/pptpd.conf localip 192.168.122.11 remoteip 192.168.122.234-238,192.168.122.245 Restart PPTPd and modify the firewall to...

Read more »

Postfix, Dovecot and MacMail (Mail.app v5.2) on Redhat with SSL/TLS

August 6, 2012
By

This HowTo gives example configuration files to configure SMTP and IMAP with SSL/TLS on a Redhat server taking into account the mail client – MacMail. Create the certificates: mkdir -p /etc/postfix/ssl cd /etc/postfix/ssl touch smtpd.key chmod 600 smtpd.key openssl genrsa 1024 > smtpd.key openssl req -new -key smtpd.key -x509 -days 3650 -out smtpd.crt openssl...

Read more »

Install WordPress on a Redhat or CentOS Server

July 10, 2012
By

The link below is to a nice website for instructions on installing Wordpres which i’ve used recently. The installation should work on CentOS as well as Redhat. http://blog.adlibre.org/2010/03/10/how-to-install-wordpress-on-centos-5-in-five-minutes-flat/

Read more »

Reverse Proxy with SSL (Apache2) on Redhat 6

July 9, 2012
By

This article explains how to create a reverse proxy using Apache on a Redhat server. The reverse proxy enforces an SSL (or HTTPS) session between the web browser and the reverse proxy server. The session between the reverse proxy server and the target server is not secure in this example. First generate the SSL...

Read more »

Redhat’s new storage server – looking great

July 3, 2012
By
redhat-storage

Redhat’s new storage server is looking great. It offers a simple way to create large storage capacity by clustering commodity systems (servers and their available storage) together. It management interface appears to be quite simple. See the Redhat demonstration video here: http://www.redhat.com/promo/liberate/2222_RedHat_Storage.html

Read more »

Run commands on remote Linux systems

June 29, 2012
By

This article demonstrates how to run commands on remote Linux systems using the secure SSH protocol. In this example, we’ll execute an Apache (httpd) service reload on the remote system “192.168.1.34″. Tip: combine this capability with keyless SSH logins and you can automate centralised multiple system maintenance. ssh root@192.168.1.34 'service httpd reload' The Apache...

Read more »

Create new FTP directory with SELinux enabled

June 20, 2012
By

This tutorial demonstrates how to create new FTP directory with SELinux enabled. This tutorial is presented as a video. You can search for written FTP and SELinux tutorials using the search field to the top right of this page. We used Redhat 6 Server to create this tutorial.

Read more »

Create an LVM snapshot in Redhat within 3 minutes

June 20, 2012
By

This tutorial demonstrates how to create an LVM snapshot in Redhat within 3 minutes. This tutorial is presented as a video. You can search for written LVM tutorials using the search field to the top right of this page. We used Redhat 6 Server to create this tutorial.

Read more »

Force a RAID set to re-assemble using mdadm

June 20, 2012
By

This example is demonstrated on a CentOS 6 server. The server has 6 raid disks in a raid 5 configuration. After a reboot, the raid had just 2 out of 6 disks and thus failed. The following typical command didn’t work. I got the error: mdadm --assemble /dev/md0 /dev/sd{b,c,d,e,f,g}1 The following command “forced” it...

Read more »

How to create an encrypted partition using LUKS Crypt on Redhat 6

June 19, 2012
By

This tutorial demonstrates how to create an encrypted partition using LUKS cryptsetup. This tutorial is presented as a video. You can search for written encryption tutorials using the search field to the top right of this page. We used Redhat 6 Server to create this tutorial. The result of this tutorial is an encrypted...

Read more »

How to extend an LVM partition to include a new disk on Redhat 6

June 18, 2012
By

This tutorial demonstrates how to extend an LVM partition to include a new disk. This tutorial is presented as a video. You can search for written LVM tutorials using the search field to the top right of this page. We used Redhat 6 Server to create this tutorial.

Read more »

NFS Examples

June 18, 2012
By

NFS is a useful file sharing protocol and still very much in use today. The following are some examples of configuring an NFS server on a Redhat system. In some cases SELinux may prevent the NFS server from working as expected. You should consider this. You can turn off SELinux temporally using the command...

Read more »

Add a temporary route in Linux or a Mac

June 18, 2012
By

To add a temporary route in Linux or a Mac, you can use the command line tool “route”. However, if you want your new route entry to survive a reboot, you need to add the route command to a script executed on startup. Perhaps “/etc/rc.local” on a Linux system. Our situation: * Local network:...

Read more »

Mount an LVM partition using Knoppix

May 24, 2012
By

This article demonstrates how to mount an LVM partition using Knpooix. The assumption is that your Knoppix version is recent (i’m using 6.7) and that your host computer has an LVM2 partition that you need access to. Knoppix wont mount it automatically so you need to do the following: First, activate your logical volumes....

Read more »

Install OpenKM (with Tomcat) on CentOS

May 10, 2012
By

This Howto demonstrates how to install OpenKM with Tomcat on CentOS. Download the latest OpenKM from the following URL. Make sure to get the Linux-Tomcat version: http://sourceforge.net/projects/openkm/files/latest/download Extract the application to “/usr/local/openkm” as follows: unzip openkm-6.2.3-community-tomcat-bundle.zip mv tomcat-7.0.27 /usr/local/openkm Now you need to start OpenKM (manually): nohup /usr/local/openkm/bin/run.sh -b 0.0.0.0 & Or on system...

Read more »

RHEL/CentOS: Save space and remove Yum cache files

May 9, 2012
By

You can save space on a Redhat or CentOS server by removing the YUM cache files from “/var/cache”. The proper way to do this is with the following command: yum clean all The “yum clean” command has other options but the “all” option will be most liberal.

Read more »

Squid Proxy With AntiVirus (ClamAV)

May 6, 2012
By

This HowTo explains the process of adding antivirus support to Squid. The process involves the use of ICAP. ICAP is a means to extend the functionality of Squid (and other things) with the use of third party applications. An ICAP client (Squid in this case) sends information through to the ICAP server (SquidClamAV in...

Read more »

Fix Winbind Slow To Update AD Changes

May 1, 2012
By

Using “getent” with Winbind, you can get extended user information from Active Directory. For example, without Winbind, getent will return user information from “/etc/passwd” only (well, by default). You can see this by checking your “/etc/nsswitch.conf” file. For some background information, here is an extract of the /etc/nsswitch.conf file that doesn’t use Winbind: passwd:...

Read more »

How To Remove All Email From a Postfix Queue

May 1, 2012
By

Running the following command will remove all email stuck (or simply in) your Postfix mail queue. postsuper -d ALL You’ll see something like the following: postsuper: Deleted: 613 messages Where i’ve just removed 613 emails from the Postfix queue.

Read more »

Install OpenLDAP on Redhat/CentOS

April 17, 2012
By

This HowTo explains how to install an LDAP server on a Redhat server and use if as a source of authentication and perhaps contacts. Install the LDAP server: yum install -y openldap openldap-clients openldap-servers Start the LDAP server and have it start on system boot: service slapd restart chkconfig slapd on Next install the...

Read more »

VNC over SSH (remote desktop)

April 17, 2012
By

This article demonstrates how to run VNC (remote desktop tool) over an SSH (secure) session. This allows you to bypass firewalls preventing normal VNC communications (and where you cannot change the firewall to allow port 5901). In this example, the “workstation” is the computer that you’re sitting in front of. The “server” is the...

Read more »

PlayStation 3 Media Server on Redhat

April 17, 2012
By
PlayStation 3 Media Server on Redhat

The PlayStation 3 Media Server (PMS) allows owners of a playstation to watch movies, listen to music and browse photos that are centrally stored on a server. By using this method, other media players (such as modern TV’s, computers and purpose built media players) can use the same source of media without duplication. Installation...

Read more »

NBN Broadband Prices Compared

April 16, 2012
By
NBN Broadband Prices Compared

It’s never easy to compare prices between ISP’s because there are bundled prices, stand alone prices, contract prices, etc. Here is my best effort to get prices for the NBN as of this date. Having said that, i’ve ignored contract lengths but i have included my information sources for you to do more specific...

Read more »

Essential SeLinux Commands

March 27, 2012
By

This HowTo demonstrates the use of Selinux tools that every Linux system administrator should know. Consider reading “Getting started with Selinux” first. What are Selinux security context types? Selinux adds security contexts to files to prevent them from being used in unintended ways. For example, the file “/etc/ssh/sshd_config” has a security context type of...

Read more »