Install RVM and Ruby 2.1.1 (or any other version) on CentOS/Redhat

July 11, 2014
By

This article is a short HowTo for installing RVM and then Ruby on a CentOS or Redhat system. As root: curl -sSL https://get.rvm.io | bash -s stable --ruby rvm list known Now as a normal user (not root): sudo rvm install 2.1.1 You can then run the following to confirm. ruby --version

Read more »

Create a Virtual Private Cloud (VPC) in AWS with EC2s and RDS

July 9, 2014
By
Create a Virtual Private Cloud (VPC) in AWS with EC2s and RDS

This article describes each stage of creating a VPN within AWS. Amazon changes things from time to time so i won’t discuss where to click and on which links. But i will explain each stage. We’re going to create the VPC according to the diagram below. This is the simplest VPC that can contain...

Read more »

Sample Port Address Translation with Redhat/CentOS (/etc/sysconfig/iptables)

July 4, 2014
By
Sample Port Address Translation with Redhat/CentOS (/etc/sysconfig/iptables)

This is a sample iptables configuration file ‘/etc/sysconfig/iptables’ on a Redhat server where the server has a single interface and is placed in-front of other systems. In this example, this server (the one with the iptables config below) is infront of a web server at ’10.0.0.2′. *nat :PREROUTING ACCEPT :OUTPUT ACCEPT :POSTROUTING...

Read more »

Munin Email Notifications – Different emails to different people

June 26, 2014
By

Send emails to different people for different servers (nodes) with Munin. Here is an example from a working “/etc/munin/munin.conf” file: contact.web_group.command mail -s "MUNIN - ${var:group} :: ${var:host}" web_group@agix.local contact.web_group.always_send warning critical contact.db_group.command mail -s "MUNIN - ${var:group} :: ${var:host}" db_group@agix.local contact.db_group.always_send warning critical contact.itgroup.command mail -s "MUNIN - ${var:group} :: ${var:host}" itgroup@agix.local contact.itgroup.always_send...

Read more »

Munin Server – How to force emails to be sent

June 24, 2014
By

This article is a one-liner showing how to force munin server to send email alerts at an unscheduled time. This is good to test your notification configuration. Login to the munin server as root and then issue the following: su - munin --shell=/bin/bash -c "/usr/share/munin/munin-limits --contact email --force" You should still be root at...

Read more »

Troubleshooting Munin ‘munin.conf’ Config

June 24, 2014
By

This article explains an important method used to check your Munin config file. This is not checking the ‘munin-nodes’ but just the ‘munin.conf’ file. The key is to switch to the ‘munin’ user and then issue the ‘munin-update’ command. As follows: On the Munin server, login as root. Then switch to the ‘munin’ user....

Read more »

SSH Agent Forwarding & Sudo Simplified

June 22, 2014
By

This tutorial demonstrates what “SSH Agent Forwarding” is and how it works. We go further to ensure you can ‘sudo’ on the target system. This is the scenario: “You have one or more Web servers that you look after. For security reasons, these Web servers accept SSH connections only from a single Deployment server....

Read more »

Create a new MySQL user, grant permissions and set the password in one command

May 21, 2014
By

This one-liner shows how to create a new MySQL user, grant permissions and set the password: GRANT ALL PRIVILEGES ON mydb.* To 'myuser'@'%' IDENTIFIED BY 'mypassword'; Then run: FLUSH PRIVILEGES And that’s it.

Read more »

Change File Share Witness Location

May 20, 2014
By

Excuse me, do you have a moment to talk about our savior Windows Failover Clustering. Just recently I have run into the problem of needing change where my share witness is located for my WFC, if I am talking crazy you can read up on the terms here. Now after a bit of looking...

Read more »

Export a list of Full Access Permissions -Microsoft Exchange

May 12, 2014
By

The following is a command that will allow you to view all mail boxes that have the Full Access permission enabled in CSV document that you can filter and sort using Excel. This command will filter out the SELF permissions as every user should have Full Access to their own mailbox and will also...

Read more »

Exchange – Audit Full Access Permission on Mailboxes

May 5, 2014
By

Just recently I have come up against the need to see if a particular user is granting them self the Full Access permission on other users mailboxes. This user might be a new hired administrator or perhaps one that is leaving or even just a compromised account, regardless this is the best way that...

Read more »

Microsoft Disk Part

April 28, 2014
By

It is no secret that the Windows GUI does make certain things harder than they need to be, one of these things in particular is formatting drives using Disk Management. Although 90% of the time disk management will work fine you will run into cases where the partition is marked as System Reserved and...

Read more »

CPU stress test Mac

April 28, 2014
By

This one is so easy however it is not one that is mentioned very often, sometimes you will need to see how a Mac performs under load, perhaps because it is crashing or overheating any reason you can think of really. Well your OSx install comes with all the CPU stress test you need....

Read more »

Extend User Password Expiry

April 28, 2014
By

When you have users that travel for weeks at a time it is likely that you are going to encounter a point when they need to have their password extended so that it does not expire while they are overseas. In this article you will be able to reset the “Last Set Date” so...

Read more »

Mac Open Command

April 27, 2014
By

Using a Mac it is simply easier to navigate around using the command line, however what happens when you get to the file that you want and then want to open it in your favourite GUI application. well that is when you use the “Open” Command, which really is a simple as it sounds....

Read more »

Delete WIFI Network Windows 8

April 27, 2014
By

One of the issues that I have come up against just recently is users not being able to delete or “Forget” a wireless network in order to change settings or Passkeys. This issue branches from the fact that “Manage Wireless Networks” menu has been remove with Windows 8. However you can run the below...

Read more »

Managing Tomcat6 via the Web Manager tool – Redhat/CentOS

April 27, 2014
By

This article explains how to configure the web manager for Tomcat6. The web manager tool allows the administrator (or anyone with valid credentials) to start and stop individual Tomcat applications and to upload new Tomcat applications (WAR files). Make sure to install the packages: yum install tomcat6 tomcat6-admin* Edit your “conf/tomcat-users.xml” file and add...

Read more »

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. See Amazon’s documentation here. yum install mailx cyrus-sasl...

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 »

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 “ABC News Radio” 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...

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 iSCSI 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 »