Tag Archives: howto

Bash script to generate a sitemap.xml on a WordPress instance | bash script to generate a sitemap.xml for wordpress

There are free online tool to generate sitemap.xml, but the one I used would only index 500 pages. My site www.techinterchange.com.au has more, so I decide to write a bash script which ill index the site and generate an sitemap.xml.

Its simple, ill continue to add features and make it more reliable. This is only working with WordPress atm, Ill improve with the next revision.

 

 

Having your Linux system email you! | How to write a script which emails you

Quite often you need to write scripts which need to email you urgent information, there is a very simply way to do this.

First we need to install an email server to transmit the emails.

Then insert the following into your script.

In the above example it will email a copy of your local host file, change be change for any file you want transmitted.

See this script for a working example.

How to setup Nextcloud 13 in a Docker container | how to setup nextcloud 13 on docker

I have written a script which will setup Nextcloud on a Ubuntu Docker container. Ill run through the entire process.

First we need to download the correct image into docker.

Then we need to start the container with the os.

Now we need to find the unique id of the container

Now on the host, so not the container.  Create the script.

Now paste the following into the script.

Now adjust the permissions to make it executable.

Now lets copy it over to the container

Then jump on the console.

Once your connected in, execute the script, this will install setup everything.

Once complete. Hit your web browser, navigate to https://localhost:10000/nextcloud. Should see the logon page, your credentials are Username: admin Password: password

 

How to enable SEO URLs on Opencart | how to enable SEO urls on opencart

Having SEO friendly urls is vital for google page rank.

Surprisingly it wasn’t the most straight forward process, so I created a howto for people using opencart.

Start by renaming the .htaccess file located in the Opencart root directory, its already setup and ready to go.

Then you need to enable in apache2.

and ensure the following is inserted. under your <VirtualHost *:80> section.

 

Failed to unzip Raspberry Pi Zero image on OSX | failed to unzip raspberry pi zero zip on osx

I downloaded the latest image for my Raspberry Pi Zero and it started causing problems when trying to unzip it, its happened to me before but I thought Id make a post about it to avoid other search the net for hours before finding a solution.

I downloaded the following image.

When I tried to unzip it, it was renamed to this

Then I tried to double click on that and it was renamed to this.

So I realized I was going nowhere. The fix for this problem is listed below, fire up the terminal and execute the following command.

 

 

Done, enjoy.

Solaris automount autofs home area howto | how to setup autofs home areas on solaris.

I spent a few days trying to figure out how to setup automount on Solaris.

Although its very well documented on the Solaris website, its doe not have and end to end document howto. Here it is.

This will not include the NFS server details, I already have a howto for that here.

Lets get started

 

Create a directory where our new network mountable home area will be located.

Edit the auto_master file

Ensure this line exists.

Edit the auto_home file

ensure the following exists, these are the two users we’ll be testing with.

Create the users on the local system, you can avoid having to do this if you setup LDAP/NIS. For this howto i want to keep it simple, please ensure the users are setup with the same UID as the NFS server, otherwise you will face permission problems.

Lets see if automount is working, if it is you will see the following. If nothing appears, you need to start automount (next step)

Lets start automount with verbose logging for faultfinding.

Your done, enjoy.

Solaris setup a NFS client and server | making a NFS client server environment in solaris

A quick howto for setting up NFS on a Solaris server.

This is relatively easy process, sometimes can be problematic due to firewall rules and services running on the system

Lets enable and start the services.

This will create the create and share it to the world, for this exercise I didnt specify source IP’s. You can do that later once you have everything working.

To confirm the share is now active

Ok now jumping on the client side, lets mount the share.

Lets see the mount

Done! Enjoy!

Setting up nextcloud on a Raspberry Pi 1 | how to setup nextcloud on a raspberry pi

A quick and easy way to setup the a Raspberry Pi 1 with Nextcloud.

Nextcloud is an awesome solution for your personal cloud requirements. If will provide you with the following solutions.

  • Data storage accessible via an App or Webgui
  • Share your data with the internet, based on your permissions
  • Store and play music
  • Store and share contacts and calendars
  • Backup and sync with your phone or tablet
  • and many more

Lets gets started, lets install the dependencies.

Download Nextcloud from their site.

Create the data directory and set permissions.

Restart apache

Boom, your done. Point your browser to nextcloud and start to customize.

Installing and configuring MediaWiki on Raspberry Pi 1 | Setup mediawiki on a raspberry pi 1

MediaWiki is the software used by Wikipedia run, its a fantastic way to document share.

I would recommend installing DNSMasq to allow as to use fully qualified domain names. See here.

Setting up Mediawiki is a pretty simply task, does not really require a high level of experience. Lets dig in, install software.

Once completed we start setting up the housing for MediaWiki, the following will also download the software from MediaWiki’s site and unzip it.

Then we’ll need to setup the database and user permissions.

Now we’ll begin the Mediawiki installation, easy part. Navigate to the following URL and start the point and click install.

Once connected you’ll see this.

Click on the “Set up the wiki” link, follow the instructions and enter all the information it requires. Take note, youll need the database,username and password we input earlier. Once it has finished it will let you download the LocalSettings.php file to your computer. You’ll need to upload it to the /var/www/html/wiki directory.

Lets create the DNS entries.

Insert the following line

Now restart DNSMasq

We also need to setup the virtual host in apache

Insert the following line

Restart apache.

Make sure your connected to the AP while your setting up, otherwise the setup will use the LAN IP to setup the config file.

Enjoy!