Category Archives: Uncategorized

Unable to open primary script

This Video will show you how to solve the error: unable to open primary script permission denied on Centos 8.

In this video i was trying to install moodle and when i went to access the site, I kept getting an error. In the Apache logs i could see the error: unable to open primary script: ‘Unable to open primary script varwwwhtmlmoodleindex.php (Permission denied)

When i delved into the error i could see that it was selinux was causing the issue.

You can disable selinux on the fly by entering: sudo setenforce 0

but to permanently disable you should edit the/etc/selinux/config file and

set selinux to disabled SELINUX=disabled

 

Java keystore tutorial: How to export a Certificate from a Java Keystore

This Java Keytool Tutorial will show you how to export a Certificate from a Java Keystore.

To begin you will first run (Note ensure that you update the relvnet commands to reflect your Keystore, alias and certificate names) :

keytool -list -keystore keystore.jks

to see what certificates reside in the java keystore.

Next you will run:

keytool -exportcert -alias domain -file domain.der -keystore keystore.jks

to export the Certificate.

Sound not working on Mac

This Mac tutorial will show you how to correct sound not working on Mac. It will show you what to check when you have no sound on Mac.

It will show you where to access the Mac Audio settings and the changes need to select your audio outputs.

As part of sound troubleshooting we will access systems preferences the audio and then change our audio output to internal.

How To Install Python 3.8 on Windows 10

Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python’s design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

This Python 3 tutorial will show you how to download and install python 3 on windows. This python tutorial will show you how to download and install python 3.8.2. You will first see how to download python 3.8.2 next you will see how to install python 3.8.2 on Windows 10.

How To Enable Root On Mac

A full blog post with all the steps listed out can be found here. Macs are built on Unix and as such, you can use the terminal to run commands. However, by default root is disabled. This video will show you how to enable root on mac so you can run commands as sudo.

  • Click the apple symbol the upper left of your screen.
  • Click System Preferences
  • In the screen that appears click Users and Groups.
  • Click login options and then click the lock to allow you to make changes.
  • In the screen that appears enter your username and password.
  • Click Join next to Network account Server.
  • Then click Open Directory Utility.
  • In the screen that appears click the lock to allow you to make changes.
  • Enter your username and password.
  • Now at the top of the screen click edit & then Enable Root User.
  • Enter your root password and then click ok.
  • You can now run commands as root from the Mac Terminal

A full video can be found here:

 

AWS User Data | How to run commands on startup Amazon Linux

Userdata on AWS allows you to run commands on start-up when you launch an EC2 instance on AWS. This is known as boot strapping your instance. In this example we will be boot strapping Amazon Linux with the Apache web server.

Step 1

First log into you AWS portal and then click services and EC2

Step 2

Next Click launch instance.

Step 3

Select Amazon Linux

Step 4

Leave the instance as mirco to get the free tier and click next Configure instance details

Step 5

Leave the defaults and scroll down to advanced details and expand it – enter the following lines into the textbox:

#!/bin/bash
yum install httpd -y
systemctl start httpd
systemctl stop firewalld
cd /var/www/html
echo "this is my test site" > index.html

The text in the code block above installs apache and adds an simple webpage that reads this is my test site. Finally click Next add storage

Step 6

Leave the defaults and click next add tags

Step 7

Give your machine a name and click Next Configure Security Group.

Step 8

Allow port 80 from 0.0.0.0/0 on the security group and click review and launch

Step 9

Click Launch

Step 10

You can proceed without a keypair as we will not log into this instance

Step 11

click your instance ID

Step 12

Wait until your instance is running and then copy it’s pubic IP or dns name

Step 13

Open a new browser and enter the pubic IP of your Linux instance into the address bar. You should now see the simple webpage we created.

A full video tutorial can be found here:

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:

How to install IIS on server 2016

Internet Information Services (IIS, formerly Internet Information Server) is an extensible web server created by Microsoft for use with the Windows NT family.[2] IIS supports HTTP, HTTP/2, HTTPS, FTP, FTPS, SMTP and NNTP. It has been an integral part of the Windows NT family since Windows NT 4.0, though it may be absent from some editions (e.g. Windows XP Home edition), and is not active by default.

This IIS web server tutorial will show you how to install IIS 10 on Windows server 2016.

step 1

Click on the start menu and then server manager

Step 2

Next click on manage and then add Roles and Features.

Step 3

Click Next

Step 4

Click Next again.

Step 5

Click next one last time.

Step 6

Scroll down and click Web Server (IIS)

Step 7

In the screen that appears click Add Features.

Step 8

Click Next.

Step 9

Click Next

Step 10

Click Next again.

Step 11

Leave the default and click next.

Step 12

Click install

You should now see a message saying Install successful. Click close to exit the installer.

A full video tutorial can be found here:

 

How to install VirtualBox on Windows Server 2016 / Windows 10

“Oracle VM VirtualBox (formerly Sun VirtualBox, Sun xVM VirtualBox and Innotek VirtualBox) is a free and open-source hypervisor for x86 computers currently being developed by Oracle Corporation. Developed initially by Innotek GmbH, it was acquired by Sun Microsystems in 2008 which was in turn acquired by Oracle in 2010.”

In this tutorial you will see how to install VirtualBox on Windows Server 2016. The process for the install will be the same for windows 1o.

Step 1

Go to https://www.virtualbox.org/wiki/Downloads and click windows hosts:

Step 2

When the download has completed go to your downloads folder and double click the VirtualBox installer :

Step 3

Click next

Step 4

Click next again

Step 5

Click Next again

Step 6

Note that your network card will briefly go off and on again, if you are happy to proceed click next

Step 7

Click install.

Step 8

Click Finish.

A full video guide can be found here: