Tuesday, December 24, 2013

Back

Site was done due to unforeseen circumstances.  It's back now, better than ever. Well backend is anyways. One day I will update the front end. The big things I need to do is either get Simontek.net usmc approved,  Or, use a secondary blog somewhere that is. This blog would be very handy at work.

Tuesday, October 22, 2013

SELinux httpd settings

Getting SELinux to play nice with a webserver

chcon -R -h -t httpd_sys_content_t /path/to/directory*

Saturday, February 23, 2013

SSH Config files, and repo installs

In your .ssh folder, make a file called "config", put in it this information, change to your specs.

Host example.com
  Hostname example.com
  HostKeyAlias example
  Port 2222
  User linus






This is handy to have when you ssh into machines that have non standard ports, so with this you can now type: "ssh example" and it will insert your information that's needed for logging in. You still need the password, unless you setup keys. It works for scp as well. This is what I use it for.




Also today created a quick script for my rhel machines.


http://www.simontek.net/linux/iso/repoinstall.sh

# Created by Matthew M. Conley to add the epel, and el repo's to a build.
#
#!/bin/bash
if grep --quiet "[elrepo]" /etc/yum.repos.d/*; then
   echo "EL repo is installed"
else

rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
fi

if grep --quiet "[epel]" /etc/yum.repos.d/*; then
   echo "epel is installed"
else
rpm --import https://fedoraproject.org/keys
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
fi

 It checks to see if the el and epel repo's are installed, if not installs them. I tend to have to do this all the time, so figured just put it in a script. I still can't tell you how often on test builds that I didn't use a kickstart I have to type "sed -i 's/no/yes/' /etc/sysconfig/network-scripts/ifcfg-eth0" Which turns the ONBOOT=no to ONBOOT=yes in eth0 config file.

Saturday, February 16, 2013

LUKS unlock

So, I went to manually unlock a LVM partition, and realized I had to look it up. It took me a few pages, so I am just copying the notes, cause I will have to do this again.
I was not using a debian or fedora based system, but its handy.

cryptsetup luksOpen /dev/ 
Enter any LUKS passphrase: 
key slot 0 unlocked.
Command successful.



  1. $ sudo apt-get install lvm2
    
  2. Load the necessary module(s):
    $ sudo modprobe dm-mod
    
  3. Scan your system for LVM volumes and identify in the output the volume group name that has your Fedora volume (mine proved to be VolGroup00):
    $ sudo vgscan
    
  4. Activate the volume:
    $ sudo vgchange -ay VolGroup00
    
  5. Find the logical volume that has your Fedora root filesystem (mine proved to be LogVol00):
    $ sudo lvs
    
  6. Create a mount point for that volume:
    $ sudo mkdir /mnt/fcroot
    
  7. Mount it:
    $ sudo mount /dev/VolGroup00/LogVol00 /mnt/fcroot -o ro,user
    
  8. Copied my files.

Thursday, January 24, 2013

Finally getting around to doing stuff.

Well, I have finally Customized this a tad, Also setup blog.simontek.net to point to this site. I have been playing with the idea of putting a blog on to my site for years, and just finally thought. Eh I actually like blogger, Screw it, I am just going to continue using this.

Btw, remind me to do this, I wrote a script to install the files on a RHEL/CentOS 5/6 Fedora box, 32/64 bit, to setup cackey, with that sets up subversion to use a CAC and firefox. (so you can check your email). Wrote another one that does debian based, and OSX based systems.