Monthly Archives: May 2018

How to edit the hosts file on Windows Server 2016

Hi there,

The computer file hosts is an operating system file that maps hostnames to IP addresses. You can edit the hosts file in Windows Server 2016 to manually point a host name to an IP address.

Step 1 

Navigate to:

C:\Windows\System32\drivers\etc\

Step 2 

Edit the hosts file in a text editor of your choice. Add the ip address of the machine you want to reach press tab and then enter the name you’d like it to be reachable over.

Save and exit the file.

You will now be able to navigateto that machine via the name you set in the hosts file.

A full video tutorial can be found here:

Linux Keyboard wrong

Subscribe to Darrenoneill.eu to get a free Linux Cheat Sheet! 

This is a tip which has got be out of a few binds before. So what happens is you are called to a job to troubleshoot a issue on a Linux server. You access the terminal and the keys you are typing are not appearing on the screen. For example, when you type @ you see ” and when you type # you see \.

This is happening because the terminal is expecting input from a US keyboard and you are using a UK keyboard.

You can solve this very quickly by typing the command:

sudo loadkeys uk

When this command is run successfully you should see a screen that looks like the one below.

Your keys should now be working correctly.

A video that shows this process can be found here:

 

How to Install Wildfly on windows

“WildFly  formerly known as JBoss AS, or simply JBoss, is an application server authored by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on multiple platforms.”

In this tutorial we will be installing Wildfly on windows server 2016, however the process should be much the same on windows 10.

Installing Java

First we will download and install Java JRE. it is available from:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

And we downloaded the windows 64 bit version.

Once it downloads install it.

Downloading WildFly

Go to http://wildfly.org/downloads and click to download the Java EE7 Full & Web Distribution

When it downloads unzip it to your C drive.

Running WildFly for the first time.

Navigate to C:\wildfly-12.0.0.Final\bin and run standalone.ps1 in PowerShell

When WildFly has started you should see a screen similar to the below:

Now open a browser and navigate to http://localhost:8080 you should see the WildFly welcome screen:

 

  • Next minimise your browser and navigate back to  C:\wildfly-12.0.0.Final\bin.
  • Run add-user.ps1 with PowerShell by right clicking and selecting run with PowerShell

 

Add a management user by pressing enter at the below screen (it is the default option)

  • Enter the details of your user.
  • when asked “What groups do you want this user to belong to?” press enter
  • and then type yes to add the user for the realm ManagemntRealm

  • When asked; “Is this new user going to be used for one AS process to connect to another AS process?” type no
  • Return to the PowerShell window that has WildFly running and press ctrl+c to kill the process, the PowerShell window should close.
  • open a bowser and navigate to
    • http://localhost:9990
  • You will be promoted to log in, enter the username and password that you set and click ok.

  • You should now see the management console.

 

  • Minimise your browser and navigate back to the PowerShell window and stop wildly by running ctrl + c

Installing WildFly as a service.

  • navigate to C:\wildfly-12.0.0.Final\docs\contrib\scripts\
  • Copy the service directory to C:\wildfly-12.0.0.Final\bin

  • open up and admin CMD and navigate into C:\wildfly-12.0.0.Final\bin\service

Next run “service.bat install”

Next open windows Services, you should see WilDfly installed, you can now start it from here and set it to automatic.

a full video tutorial can be found here: