Opening iptables firewall ports on CentOS 7

To list existing iptable config:

sudo iptables -L

To open ports, for example, 80, 8443 and 8080:

$ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent

success

$ sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent

success

$ sudo firewall-cmd --zone=public --add-port=8443/tcp --permanent

success

 

Reload config with:

sudo firewall-cmd --reload

Done.

WLS 12c 12.1.3 on MacOS – error: CFGFWK-42057: No templates installed

The WLC 12c 12.1.3 config.sh fails to find installed domain templates after a new/clean install and attempting to create a new domain, it gives an error:

CFGFWK-42057: No templates installed

This doesn’t seem to be a common issue, but luckily this post mentions the domain templates are installed to wlserver/common/templates/wls

Selecting the ‘Create Domain using Custom Template’ option and pointing to this location, sure enough the templates are there. Selecting the wls.jar template, and continuing, I then get this:

Ugh. I’ll install on Linux instead.

Switching Java versions on Mac OS

The Java JDK install on MacOS has some interesting platform specific utilities, like

/usr/libexec/java_home

which tells you which Java version you’re currently using and where it’s installed. I have Java 9 currently installed and it tells me:

/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home

If you have multiple version installed, adding -V will list all the versions and where they’re installed:

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    9, x86_64: "Java SE 9" /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
    1.8.0_101, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home

The next logical question from here would be ‘how do I switch versions’? If you set your $PATH in a .profile or similar approach, you can eval java_home to add the current version to your path, but a neat trick discussed in one of the answers here (thanks to this SO user for this tip) uses the -v option to allow you to switch versions. Adding a couple of aliases to your .profile like this:

alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version"
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version"
alias j7="export JAVA_HOME=`/usr/libexec/java_home -v 1.7`; java -version"

… and you’ve got a quick shortcut to switching between different versions.

Planning for a homelab with an HP Proliant DL380 G7

So I got caught up with the idea of running a rack mount server at home and setting up virtualization to run a ‘bunch-o-stuff’. As you do. Having never done anything with enterprise server hardware before (although I did recently set up Proxmox virtualization on my Mac Pro), naturally I have a ton of questions:

  • Should I run ESXi or Proxmox?
  • The DL380 has 8 hot-swappable 2.5″ drive bays. What’s the minimum number of disks needed to run, and do you need to configure a RAID array? Question here. A: Yes you do need to configure a RAID array, apparently it can’t be disabled. So you need 2 disks at a minimum for RAID0 (striped) or RAID1 (mirrored). See also HP Smart Array Controller docs here.
  • What about RAID10, what I understand is a combination of 0 + 1. See article here.
  • Can you run regular laptop 2.5 disks, or do they have to be ‘midline’ or enterprise? This seems like a hotly debated question with many varying opinions. The answer is probably ‘it depends’, at least on what you’re planning to use your server for. e.g. is it doing to be running 24/7, are you going to have more than 2 drives (more may cause vibrations that regular laptop drives may not be constructed to handle). A consistent answer if you’re not going to go with the HP branded/supported disks, is that WD Red drives, intended for use in NAS appliances, will work reliably in a rack server. Everything else is YMMV. I’m going with a pair of cheap HGST 500GB drives in RAID1 to get started, and then might add a couple of WD Blacks or Reds for more storage later.
  • 10k and 15k SAS drives are new to me, I’m more familiar with SATA. This might be something I’ll check out. The 146GB capacity seems a common size, but that’s rather small if I’m going to create a bunch of VMs. They’re pretty cheap at around $30 though, so could easily pick up a few for a RAID array.

So many options 🙂