Set root password MariaDB

MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation.

After you install MariaDB you log in using the following command:

mysql -u root -p

You may notice that you don’t get prompted for a password. In order to correct this you will need to run the following :

Step 1

SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘yourPassword’);

Step 2

UPDATE mysql.user SET plugin = ‘ ‘ WHERE user = ‘root’ AND host = ‘localhost’

Step 3

FLUSH PRIVILEGES;

Step 4

exit

Step 5

Run mysql -u root -p You will now need your password to log in.

A full video tutorial can be found here:

 

Posted in Databases, mysql | Tagged , | Leave a comment

How to check MariaDB version

“MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation”

This short MariaDB tutorial will show you how to check the version of MariaDB you are running. We are running MariaDB on CentOS 7 but the process should be much the same for other operating systems.

Step 1 

Log into your MariaDB instance, in our case we log in using the command:

mysql -u root -p

Step 2

After you log in you can see your version in the welcome text – highlighted in the screen-grab below:

Step 3

If you cannot see your version here you can also run the following command to see it:

SELECT VERSION();

A full video tutorial on the process can be found here:

 

 

Posted in CentOS, Computer Science, Databases, linux, mariadb, mysql | Leave a comment

How To Create a S3 Bucket

This AWS tutorial will show you how to create a S3 bucket on AWS.

“Amazon S3 or Amazon Simple Storage Service is a “simple storage service” offered by Amazon Web Services (AWS) that provides object storage through a web service interface. Simply, Amazon S3 provides a web interface to easily store and retrieve data safely, in any amount, at any time, from anywhere, at a low cost. Amazon S3 uses the same scalable storage infrastructure that Amazon.com uses to run its global e-commerce network.”

Step 1

Log into you AWS account click services and then s3

Step 2

In the screen that appears click create bucket

Step 3

Give your bucket a unique name (It most be unique across all of AWS) then click Create in the lower left.

Step 4

You should now see your bucket, click it to access it.

Step 5

Click upload, to add a file.

Step 6

Click add file & navigate to a file on your machine to upload.

Step 7

Click upload to upload your file.

You should now see your file in your bucket:

 

A full video tutorial can be found here:

Posted in AWS, Cloud | Tagged , , | Leave a comment

How to enable RDP on Windows server 2016

By default Windows Server 2016 disables Remote Desktop Connections (RDP) to the server. If you wish to RDP to the server you will need to enable it first. This tutorial will show you how to enable RDP on windows server 2016.

Step 1 

Click the start button and then Server Manager.

Step 2

Then click on Local server and where it says Remote Desktop click on the Disabled.

Step 3

Click to Allow remote connections to the computer and then click Apply and OK.

You will now be able to RDP into your server. A full video tutorial can be found here:

Posted in windows, windows server, windows server 2016 | Tagged , , | Leave a comment

How to Setup CentOS 7 on AWS

This tutorial will show you how to create a CentOS 7 instance on AWS. We assume that you already have you AWS account created and that you are logged in already.

Step 1

Click Services and then EC2

Step 2

Click Launch Instance

Step 3

  • Click AWS Marketplace
  • Search for CentOS
  • Select the top result – CentOS7

Step 4

Click Continue

Step 5

Select your machine type and click Next Configure Instance details. In our case we will select the t2.micro instance as it is free tier eligible.

Step 6

Change Auto-assign public IP to Enable and click Next: Add storage.

Step 7

Leave the defaults and click Next:Add Tags

Step 8

Click Next: Configure Security Group

Step 9

Click review and Launch.

Step 10

Review your settings and then click Launch.

Step 11

In the drop down menu select create a new key pair, give the key pair a name and Download the Key Pair, then click launch Instances.

Step 12

Click your instance ID to see the instance.

You should now see your instance.

Step 13

To connect to our instance we will need to convert the key we downloaded, to do so we will use putty and puttygen they can be downloaded form here: https://www.putty.org/

Open puttygen and click Load

Step 14

Navigate to where you downloaded your key, click all files, click on your key and click open.

Step 15

Now click Save Private key, when prompted click yes you want to save without a passphrase.

Step 16

Now open putty and enter your public IP into the host name or IP address field, then expand SSH on the left had side.

Step 17

Click auth and then browse, navigate to where you saved your key and select it.

Step 18

Now click open

Step 19

Click Yes

Step 20

Enter centos as the username and click enter.

You will now be logged in

A full video tutorial can be found here:

Posted in AWS, CentOS, Cloud, linux | Tagged , , , | 2 Comments

How to Install Server 2016 in Virtualbox

Windows Server 2016 is a server operating system developed by Microsoft as part of the Windows NT family of operating systems, developed concurrently with Windows 10.

This tutorial will should you how to install windows server 2016 in virtual box.

Step 1

First you will need to download the windows server 2016 trail, which is available from Microsoft:

https://www.microsoft.com/en-us/cloud-platform/windows-server-trial

Step 2

Open VirtualBox and click New

Step 3

Fill out the following values:

  • Name: Windows server 2016
  • Type: Microsoft Windows
  • Version Windows 2016 (64-bit)
  • Memory size, leave at 2018 (minimum)
  • Create a virtual hard drive and click create.

Step 4

Leave the defaults and click create.

Step 5

Now right click on the virtual machine and click settings.

Step 6

Click storage, then empty and then click the cd symbol

Step 7

Navigate to where you downloaded your windows server disk and click open

Step 8

Click ok

Step 9

Click your VM and click start

Step 10

Select your language, Time and input and click next.

Step 11

Click Install Now

Step 12

Select I will activate later.

Step 13

Select Windows Server 2016 Standard (Desktop Experience) and click next.

Step 14

Accept the license agreement and click next.

Step 15

Click Custom Install Windows only

Step 16

Click Next, windows will now install.

Step 17

Once windows reboots, enter an administrator password and click Finish.

You have no install windows server 2016 in virtualbox.

A full video tutorial can be found here:

Posted in windows, windows server, windows server 2016 | Tagged , | Leave a comment

How to Trust a Certificate on Windows

If you have generated a self signed certificate on windows you may want to trust that certificate to avoid getting certificate warnings when you navigate to your URL in internet explorer or chrome. It is important to note that you should only trust a certificate if you are 100% sure of it’s origin.

Step 1

Open internet explorer as an adminsitror.

Step 2

Navigate to the URL where your self signed cert is, in our case https://localhost.

Step 3

When prompted remove click to continue to the website

Step 4

Click where it says “Certificate Error” and then view certificate.

Step 5

Click install certificate

Step 6

In the screen that appears select local machine and next

Step 7

Select “place all certificates in the following store” and click browse.

Step 8

Select Trusted Root Certificate Authorities and click ok

Step 9

Then click ok, next and finish.

Step 10

Restart internet explorer.

Step 11

Navigate to your website again, the certificate will now be trusted.

A full video tutorial can be found here:

Posted in windows, windows server, windows server 2016 | Tagged | Leave a comment

How to set up HTTPS on Tomcat

Apache Tomcat, often referred to as Tomcat Server, is an open-source Java Servlet Container developed by the Apache Software Foundation (ASF). Tomcat implements several Java EE specifications including Java Servlet, JavaServer Pages (JSP), Java EL, and WebSocket, and provides a “pure Java” HTTP web server environment in which Java code can run.

This Tomcat Tutorial will show you how to create a self signed cert that you can then use to secure Tomcat.

Step 1

Open a command prompt window and navigate to your JAVA_HOME bin folder, in our case:

C:\Program Files\Java\jre1.8.0_171\bin

Step 2

Enter the command:

keytool -genkey -alias tomcat -keyalg RSA -keystore “C:\apache-tomcat-8.5.34\conf\localhost.jks”

Note: You should update the tomcat path to match your path 

Step 3

You will then be prompted for a series of values, in our case we entered:

enter Keystore password: password
retype keystore password: password
what is your first and last name: localhost
what is the name of your orgainsation unit: IT
what is the name of your organisation: Darren
what is the name of your city: Dublin
what is the name of your state or province: Leinster
What is the two-letter country code for this unit: IE

When prompted type yes to confirm all is correct.

Next you will be asked to use the same password for <tomcat>, press enter here:

Step 4

Now open the tomcat server.xml file, in our case the file is located here:

C:\apache-tomcat-8.5.34\conf\server.xml

Step 5

Add the following block to the file:

	<Connector
		protocol="HTTP/1.1"
		port="8443" maxThreads="200"
		scheme="https" secure="true" SSLEnabled="true"
		keystoreFile="conf\localhost.jks" keystorePass="password"
		clinetAuth="false" sslProtocol="TLS" />

Step 6

Restart Tomcat.

Step 7

Navigate to https://localhost:8443.

You should first see a certificate warning, click to bypass the warning.

Step 8

You should now see Tomcat working over HTTPS

A full video tutorial can be found here:

Posted in tomcat, Uncategorized | Tagged , | Leave a comment

How to create a drop down menu in Excel

This short tutorial will show you how to create a drop down menu in Excel. The Drop down menu will allow you to ensure that only the correct data gets entered into a field.

In this example we want to ensure that the end user can only enter the following information into a selection of cells

  1. On Time
  2. Late
  3. Early
  4. Cancelled.

Step 1

Enter the the options for your drop down menu in cells in your workbook. in Our case we entered them in column M.

Step 2 

Now highlight the cells you want to have the drop down menu in and click Data.

Step 3

Click data Validation and data validation again

Step 4

In the box that appears select List

Step 5

Click into the Source menu box and then highlight the values that you want to be in your drop down menu, in our case M2 to M5. Then click ok

Step 6

Your Drop down options should now appear:

A full video tutorial ca be found here:

Posted in excel, windows | Tagged , , | Leave a comment

How to Run Wildfly on CentOS 7

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.

WildFly is free and open-source software, subject to the requirements of the GNU Lesser General Public License (LGPL), version 2.1.

This tutorial will show you how to install Wildfly on Centos 7.

Step 1

To run Wildfly you need Java, so we will download it now, run the command:

yum -y install java-1.8.0-openjdk

Confirm that it is installed correctly by running:

java -version

Step 2

Let’s get the firewall ready, there are two ports we need open, lets open them now, run the following commands:

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

Now reload the firewall to ensure the changes take effect:

sudo firewall-cmd –reload

Step 3

Now lets download wildfly, run the command:

wget http://download.jboss.org/wildfly/14.0.1.Final/wildfly-14.0.1.Final.tar.gz

Step 4

Now lets un-pack the tar file, run:

sudo tar -zxf wildfly-14.0.1.Final.tar.gz

Step 5

Now let’s edit some config files first we need to move to the relevant directory, run the command.

cd wildfly-14.0.1.Final/standalone/configuration

We need to edit the standalone.xml file.

We will use vi for this, run:

vi standalone.xml

look for the section:

<interfaces>
<interface name=”management”>
<inet-address value=”${jboss.bind.address.management:127.0.0.1}”/>
</interface>
<interface name=”public”>
<inet-address value=”${jboss.bind.address:127.0.0.1}”/>
</interface>
</interfaces>

Note the 127.0.0.1 we will change this to 0.0.0.0, the block of text should look like so:

<interfaces>
<interface name=”management”>
<inet-address value=”${jboss.bind.address.management:0.0.0.0}”/>
</interface>
<interface name=”public”>
<inet-address value=”${jboss.bind.address:0.0.0.0}”/>
</interface>
</interfaces>

Step 6

Now lets add a management user. First run:

cd wildfly-14.0.1.Final/bin

Next run the command:

./add-user.sh

You will be greeted with a series of prompts:

a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a):

  • Press enter for the default.

Enter the details of the new user to add.
Using realm ‘ManagementRealm’ as discovered from the existing property files.
Username:

  • Enter a Username

Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
– The password should be different from the username
– The password should not be one of the following restricted values {root, admin, administrator}
– The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password :

  • Enter a password.

What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]:
About to add user ‘wildfly’ for realm ‘ManagementRealm’
Is this correct yes/no

  • Type yes.

Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no?

  • Type no.

Step 7

Now we will start Wildfly, ensure that you are still in the bin directory and run the following command:

./standalone.sh

If the command is successful output should like so (You can ignore any ssl warnings):

Step 8

Lets confirm wildfly is up, open and web browser and navigate to the IP address of your CentOS server and append the port 8080 to the address, in our case it looks like so:

http://192.168.125.3:8080

You should see a screen that looks like so:

Step 9

Now let’s ensure the management interface is working, navigate to

http://192.168.125.3:9990

You should be prompted for a login, enter the username and password you set in step 6.

You should then see the Wildfly management interface.

A full video tutorial can be found here:

Posted in CentOS, Computer Science, wildfly | Tagged , , | Leave a comment