Firearms workstation

Here is the firearms workstation in the shop. It is a stand up workbench designed to do more of the heavy lifting. Muzzle breaks, barrels and the like.

It has a yoga mat pad for no slip protection and a Harbor Freight dual axis vise with jaw protectors.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Firearms Light Duty / Cleaning Station

I wanted to show my light duty, sit down firearms station. This is in the Armory where it is easy to control the climate.

I made a set of drawers to help hold all my stuff.

Wanted some better light so we got a high efficiency light for overhead:

Right now the switch is a power strip. Made a real switch that I will add in the next couple days.

Thats it for now, I will update this weekend.

Forgot to show the railing! I have a Tipton Best Gun Vise, I got tired of having to clamp it down. So I routed the rail directly into the workspace!

Works good so far

As you can see from the pictures above, cant tell it is there when the mat is rolled over it.

Got the light switch hooked up

Full shot:

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Keeping it Solvent!

I wanted a solvent tank that will take care of my weapons parts as well as my shop tools. I got the Solvent Tank from Northern Tool and Equipment. Then I mixed up ‘Ed’s Red’ Bore Cleaner and poured it in. Well that was a mistake! I did not read the manual (RTFM), the pump is only for water based solvents:

I replaced the pump with this guy from Zoro.com I had to modify the top plate a bit to get it to fit:

Then I set it all in place and added some brass fittings to help keep the solvent out.

Put the wiring back together:

Added the brush and did a test run. All good!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Installing Cgit on CentOS 7

Get all the packages installed:

sudo yum install git-all httpd perl-Time-HiRes cgit composer highlight httpd-tools mariadb mariadb-server mod_ssl openssl pandoc patch php php-gd php-intl php-mysql php-tidy php-xcache php-xml python-markdown python-pygments

Set up the git user:

sudo /usr/sbin/groupadd git

sudo /usr/sbin/useradd -c "git user account" -d /srv/git -m -g git -s /bin/bash git

sudo passwd git

sudo usermod -aG git apache

sudo usermod -aG apache git

sudo usermod -aG git git

Give http a swift restart:

sudo systemctl restart httpd

Edit the cgit repo file to use cgit repos

sudo vi /etc/cgitrc

##and included like this:

include=/etc/cgitrepos

##

Create our first repo

sudo vi /etc/cgitrepos

section=Erik’s Really Cool Stuff

repo.url=erik.git

repo.path=/srv/git/erik.git

repo.desc=Erik repository

repo.owner=erik@Fuck.com

repo.readme=info/about.html

 

make the repo and set the permissions:

sudo mkdir /srv/git/erik.git/

sudo git init --bare /srv/git/erik.git

sudo chmod -R 2775 /srv/git/

sudo chown -R erik.git /srv/git/

Test it

http://yourserver.com/cgit 

git config –global user.name “Erik”

git config –global user.email

git init

git remote add origin 192.168.1.1:/srv/git/erik.git

git add .

git commit -m “Initial commit”

git push -u origin master

 

Troubleshooting:

sudo systemctl stop httpd

sudo rm -f /var/cache/cgit/*

sudo systemctl start httpd
Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Git

Client (make sure git is installed)

mkdir git

cd git

git config --global user.name "Erik" 

git config --global user.email your@email.net

ssh-copy-id 123.123.123.123

git clone ansible:/srv/git/erik.git

cd git/erik

ls

MAKE CHANGES

git add * 

git status

git commit -m "Comment" 

git push origin master

###Disk Info

##Adding Disk Space

sudo pvcreate /dev/sdc
sudo vgextend centos_katello /dev/sdc
sudo lvextend -L 49G /dev/centos_katello/var_lib_mongodb
sudo lvresize -r /dev/centos_katello/var_lib_mongodb -L 49G

#fstab example

echo "###############################################################"
echo "# Add this to /etc/fstab: #"
echo "# #NFS Shares #"
echo "# 172.16.4.20:/Backup /home/erik nfs auto 0 0 #"
echo "# 172.16.4.20:/share /mnt/share nfs auto 0 0 #"
echo "###############################################################"

###Notes:

exec ssh-agent bash

ssh-add 

ssh 123.123.123.123
Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Speed Test RRD Setup

#First we need to install speedtest-cli.

#For Ubuntu and Raspberry Pi:

sudo apt-get install python-pip
pip install speedtest-cli
sudo pip install speedtest-cli

#For CentOS and the Like:

http://www.cyberciti.biz/faq/install-speedtest-cli-on-centos-redhat-fedoa-scientific-to-measure-internetspeed/

#Make Sure you have rrdtool installed:

sudo yum install rrdtool

##Create Graphs

mkdir /etc/speedtest
cd /etc/speedtest

##Then RRDTOOL magic:

sudo rrdtool create speedtest_dl.rrd -s 1800 DS:temp:GAUGE:3600:0:125 RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460

sudo rrdtool create speedtest_ms.rrd -s 1800 DS:temp:GAUGE:3600:0:1000 RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460

sudo rrdtool create speedtest_up.rrd -s 1800 DS:temp:GAUGE:3600:0:125 RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460

##Then Create a script to run speedtest-cli, clean it up and stuff it into RRD

vi /usr/local/bin/speedtest-rrd

#! /bin/sh

#get into /tmp
cd /tmp

# get the EPOCH date
DATE=$(/bin/date +%s)

#Get the raw data
/usr/local/bin/speedtest-cli --simple > /tmp/speedtest-rrd.txt

#Clean it up and get raw Ping time in ms
RAW_MS=$(cat /tmp/speedtest-rrd.txt | grep P | sed -r 's/\s+//g'| cut -d":" -f2 | cut -d"m" -f1)

#Clean it up and get raw Download time in MiB
RAW_DL=$(cat /tmp/speedtest-rrd.txt | grep D | sed -r 's/\s+//g'| cut -d":" -f2 | cut -d"M" -f1)

#Clean it up and get raw Upload time in MiB
RAW_UP=$(cat /tmp/speedtest-rrd.txt | grep U | sed -r 's/\s+//g'| cut -d":" -f2 | cut -d"M" -f1)

#get data into rrd
cd /etc/speedtest/
rrdtool update speedtest_ms.rrd $DATE:$RAW_MS
rrdtool update speedtest_dl.rrd $DATE:$RAW_DL
rrdtool update speedtest_up.rrd $DATE:$RAW_UP

#create the daily graphs
#Ping Time
rrdtool graph /var/www/html/speedtest/speedtest_ms_day.png -s -1day DEF:speedtest_ms=speedtest_ms.rrd:temp:AVERAGE LINE1:speedtest_ms#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Download Speed
rrdtool graph /var/www/html/speedtest/speedtest_dl_day.png -s -1day DEF:speedtest_dl=speedtest_dl.rrd:temp:AVERAGE LINE1:speedtest_dl#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Upload Speed
rrdtool graph /var/www/html/speedtest/speedtest_up_day.png -s -1day DEF:speedtest_up=speedtest_up.rrd:temp:AVERAGE LINE1:speedtest_up#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#create the weekly graphs
#Ping Time
rrdtool graph /var/www/html/speedtest/speedtest_ms_week.png -s -1week DEF:speedtest_ms=speedtest_ms.rrd:temp:AVERAGE LINE1:speedtest_ms#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Download Speed
rrdtool graph /var/www/html/speedtest/speedtest_dl_week.png -s -1week DEF:speedtest_dl=speedtest_dl.rrd:temp:AVERAGE LINE1:speedtest_dl#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Upload Speed
rrdtool graph /var/www/html/speedtest/speedtest_up_week.png -s -1week DEF:speedtest_up=speedtest_up.rrd:temp:AVERAGE LINE1:speedtest_up#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#create the monthly graphs
#Ping Time
rrdtool graph /var/www/html/speedtest/speedtest_ms_month.png -s -1month DEF:speedtest_ms=speedtest_ms.rrd:temp:AVERAGE LINE1:speedtest_ms#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Download Speed
rrdtool graph /var/www/html/speedtest/speedtest_dl_month.png -s -1month DEF:speedtest_dl=speedtest_dl.rrd:temp:AVERAGE LINE1:speedtest_dl#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Upload Speed
rrdtool graph /var/www/html/speedtest/speedtest_up_month.png -s -1month DEF:speedtest_up=speedtest_up.rrd:temp:AVERAGE LINE1:speedtest_up#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#create the yearly graphs
#Ping Time
rrdtool graph /var/www/html/speedtest/speedtest_ms_year.png -s -1year DEF:speedtest_ms=speedtest_ms.rrd:temp:AVERAGE LINE1:speedtest_ms#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Download Speed
rrdtool graph /var/www/html/speedtest/speedtest_dl_year.png -s -1year DEF:speedtest_dl=speedtest_dl.rrd:temp:AVERAGE LINE1:speedtest_dl#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Upload Speed
rrdtool graph /var/www/html/speedtest/speedtest_up_year.png -s -1year DEF:speedtest_up=speedtest_up.rrd:temp:AVERAGE LINE1:speedtest_up#00CC00 -h 400 -w 600 -y1:2 --color GRID#dddddd --color MGRID#aaaaaa

#Clean up
rm /tmp/speedtest-rrd.txt

 

##Add to Cron

sudo crontab -e

#Add this to the bottom to run every 30 Minutes

*/30 * * * * /usr/local/bin/speedtest-rrd > /dev/null 2>&1

#

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Installing LAMP

##Install Required Packages:

sudo yum install httpd mariadb-server mariadb php php-mysql mod_ssl openssl

##Start Up HTTP

sudo systemctl start httpd.service

##Setup the firewall

sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

##Test

https://web1.hohenfels.com

##Set to start on boot

sudo systemctl enable httpd.service

##Start MariaDB

sudo systemctl start mariadb

##Secure it

sudo mysql_secure_installation

##Enable to start on boot

sudo systemctl enable mariadb.service

##Test PHP

sudo vi /var/www/html/test.php
Add:
<?php phpinfo(); ?>

## Visit https://web1.hohenfels.com/test.php

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Observium on CentOS 7

##Install the required packages

sudo yum install wget.x86_64 httpd.x86_64 php.x86_64 php-mysql.x86_64 php-gd.x86_64 php-posix php-mcrypt.x86_64 php-pear.noarch net-snmp.x86_64 net-snmp-utils.x86_64 fping.x86_64 mariadb-server.x86_64 mariadb.x86_64 MySQL-python.x86_64 rrdtool.x86_64 subversion.x86_64 jwhois.x86_64 ipmitool.x86_64 graphviz.x86_64 ImageMagick.x86_64 libvirt mod_ssl openssl

##Make the required directory and go to it

sudo mkdir -p /opt/observium && cd /opt

##Lets get the install package

sudo wget http://www.observium.org/observium-community-latest.tar.gz

##Un-tar it

sudo tar zxvf observium-community-latest.tar.gz

##Setup Maria if a new install

sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo /usr/bin/mysql_secure_installation

##Get into observium

cd observium

##Copy the default configuration file and edit it for your system.

sudo cp config.php.default config.php

##edit config.php and add DB user and password you will be creating below

sudo vi config.php

$config['db_user'] = 'observium';
$config['db_pass'] = 'password';

##While you are in there add:

$config['fping'] = "/usr/sbin/fping";

##Create the Database

mysql -u root -p
<mysql root password>
mysql> CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'
 -> IDENTIFIED BY '<observium db password>';

##Setup the MySQL database and insert the default schema

sudo php includes/update/update.php

##Create the directory Observium will store its logs in:

sudo mkdir logs
sudo chown apache:apache logs

##Create the rrd directory to store RRDs in:

sudo mkdir rrd
sudo chown apache:apache rrd

##vi /etc/httpd/conf.d/observium.conf:

Alias /observium "/opt/observium/html/"
DocumentRoot "/opt/observium/html/"

<Directory "/opt/observium/html/">
 Options +FollowSymLinks
 AllowOverride All
 order allow,deny
 allow from all
 Require all granted
</Directory>

##Add a first user, use level of 10 for admin:

cd /opt/observium
sudo ./adduser.php <username> <password> <level>

sudo ./adduser.php admin password 10

##On Client

CentOS7

sudo yum install net-snmp

Ubuntu Variants

sudo apt-get install snmpd

##edit /etc/snmp/snmpd.conf

sudo vi /etc/snmp/snmpd.conf

###############################################################################
#
# snmpd.conf:
# Hohenfels/KJETT SNMP Configuration.
#
###############################################################################
agentaddress udp:161
# sec.name source community
 
com2sec Hohenfels_Network 192.168.1.0/24 LAN
com2sec Hohenfels_Network 172.16.4.0/24 DMZ
com2sec local localhost Local
 
# groupName securityModel securityName
group ReadOnlyGroup v2c Hohenfels_Network
group ReadOnlyGroup v2c local
 
 
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1
 
# group context sec.model sec.level prefix read write notif
access ReadOnlyGroup "" any noauth exact systemview none none
 
# System information
syslocation 78621
syscontact erik@mail.hohenfels.com

#This line allows Observium to detect the host OS if the distro script is installed
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

##Restart the service

Ubuntu:

sudo service snmpd restart

CentOS:

sudo firewall-cmd --zone=public --add-port=161/udp --permanent
sudo systemctl restart firewalld.service
sudo systemctl enable snmpd
sudo systemctl start snmpd

##Add a first device to monitor

sudo ./add_device.php <hostname> <community> v2c

sudo ./add_device.php server DMZ v2c

##Do an initial discovery and polling run to populate the data for the new device

sudo ./discovery.php -h all
sudo ./poller.php -h all

##Add discovery and poller to cron

sudo vi /etc/cron.d/observium

33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * root /opt/observium/poller-wrapper.py 2 >> /dev/null 2>&1

##Restart cron

sudo systemctl restart crond

##Logon using the username and password you set above.

http://server.tld/observium/

#

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather