Monthly Archives: March 2015

Software: Updating ownCloud

Program Note: Always read the release notes when upgrading ownCloud or any other major software package!

I use a very old, AMD, single processor, only 1 gig of RAM, machine for my ownCloud installation. I use it, because that’s what was laying around the farm unused, when I decided that ownCloud was a system I really wanted to have!

I was delighted to find my ownCloud software showing me that the update was available:

Updating ownCloud

Updating ownCloud

The system has worked very well, and when ownCloud 8 came out, of course I wanted to upgrade!  Upgrading was not without a hiccup or two, but they were all pretty easy to fix.

First thing to do of course,  is make a backup of your server! I use an external hard drive for this purpose.

My ownCloud server is running Linux Mint 13, which is based on Ubuntu 12.04. Not a problem in itself, but it meant that the repository for 12.04 didn’t have the latest PHP engine available. I was running php5.3, but ownCloud 8 requires php5.4 or later. Of course I found this out AFTER I started the upgrade. *(I did skim the upgrade notes, but not well enough!)  when I was treated to the following web page after I did the ownCloud update via the built-in update manager:

First screen after updating ownCloud

First screen after updating ownCloud

Updating to php5.5 was pretty simple however, it was just a matter of adding the correct repository to my Software Sources, and then doing the update. In my case, I added the following repository:

http://ppa.launchpad.net/ondrej/php5/ubuntu

Then did a sudo apt-get update  – followed by sudo apt-get upgrade

at which point I now had php5.5 installed on my machine.

Next it’s important to restart your web server. Do this on most Mint systems by this command:  sudo service apache2 restart

After restarting my server, ownCloud finished doing the automatic update, and then went right to a blank window. Yes folks, I had forgotten to disable my 3rd party applications!  I knew I should have done it before I started the update, but I just plum forgot.

Not a huge problem though, just open a Terminal window inside your ./var/www/owncloud/ directory, and use the ownCloud occ tool to turn off your applications manually. In my case, it was the Calendar and Contacts applications that were causing the problem.

You need to run the commands as the www-data user, hence in the examples below, I am using the -u www-data switch when running the occ php application as in these examples:

sudo -u www-data php occ app:disable calendar

sudo -u www-data php occ app:disable contacts

…and any other 3rd party application that is preventing ownCloud from running.

A quick visit to the ownCloud application page, found the ownCloud 8 versions of Calendar and Contacts for download. Then all you need to do is expand the archives and dump them right on top of the old files in the www/apps/ directory on your ownCloud server.

Restarting my server once again, found ownCloud working smoothly and happy, just as it was before I started the upgrade process.

The only other small thing I had to take care of, was that ownCloud was reporting that my php software wasn’t using the character set that is preferred. Heading over to the php.ini file, that is found in your etc/php5/apache2/ directory, it was a simple matter to uncomment the setting, as shown:

Changing the default character set for php

Changing the default character set for php

Lessons learned:

1. Always carefully read the release notes!

2. Make sure your current server meets the minimum requirements. Usually related to php and mysql versions.

3. Download any updated 3rd party applications ahead of time so you have them ready.

Even with a few hiccups, it still only took about 30 minutes to get everything happy and running again.

 

 

Tools: Create Quick Passwords With Apg

There is a tool, already installed in your Linux Mint software that can help you create secure passwords fast. It’s called: apg

When you need a quick and secure password, say for a new web site you’re joining, apg is your go-too tool. Simply open a Terminal, and type apg

You will be greeted with a request to input up to 16 random characters on your keyboard. The program then takes that string and uses it to create a list of passwords that you can then use, as shown below:

Terminal window showing apg

Terminal window showing apg

Choose one the passwords, and then use it for the web site that you’re signing up for. (You can use your mouse to highlight the password, and copy it, to paste into the site’s password field) Your Firefox password manager can be used to remember it for you!

 

Tools: Know The Time Everywhere

Today’s software pick is a simple utility that I use a lot, both as an amateur radio operator, as well as a web site owner. That utility is called: Slashtime

Like most utilities, it’s found in your Package Manager so do your search for slashtime, then install it.

Package Manager, installing Slashtime

Package Manager, installing Slashtime

Once installed, the program will use your computer’s current time settings, to then show you a list of times around the world. This is especially useful if you do business with, or are chatting with people in far off lands. The program will show you the time difference between your current location and the city you wish information about.

Slashtime

Slashtime

Daylight, twilight and darkness in a particular location is easy to see at a glance. The software also has a built in task manager, so you can Right Click on a city name, and create an appointment for that location if you so desire.

Slashtime

Task Scheduler

Slashtime, a simple desktop utility to help you make sure you’re not trying to call someone in the middle of their night!

 

Fun: A Canada Haste Grew Lip Worm Try

Or to translate: Create Anagrams With Wordplay

There is a very old Linux Terminal program that is just plain fun to play with. It’s called Wordplay, and was written way back in 1991, and the last update was in 1996.

What Wordplay does is take any input string, and automatically create all the possible anagrams that it can.

Start by heading over to your Package Manager, and searching for and then installing Wordplay:

Package Manager installing Wordplay

Package Manager installing Wordplay

Next,  open a Terminal window and simply type: wordplay

This will give you a listing of the variables available when running the program. Take note that a when inputting a complete sentence like I did above, that tens of thousands of results are possible. They will over-flow the memory buffer of your Terminal program. This will end up only displaying the last several hundred.

The easy way to solve this problem is to pipe the results to a text file, as shown in this example:

Running Wordplay in Terminal

Running Wordplay in Terminal

If things get out of hand,  you can always type a [CTL]+C to stop the program execution.

A snippet of my text editor, showing close to half a million output choices before I stopped it running!

Wordplay output

Wordplay output

Yes, you can limit the results in the configuration when you run the program though!

 

 

Learning: Bash Scripting Is Your Friend

Linux is a very powerful operating system. and if you’re not using it, you really should be!

That said, once you get your new Linux machine up and running, consider learning how it actually runs!

By learning Bash, or shell scripting, you open up tons of new doors into your computer. You can use scripting to do all kinds of useful things. I use scripts to prune system logs, update multiple machines on my network at once, and lots more.

The best place to learn Bash, is the wonderful Internet source: Advanced Bash-Scripting Guide

You can use the web site above, or from your Package Manager, you can do a quick search for, and then install: abs-guide

Package Manager, installing abs-guide

Package Manager, installing abs-guide

The author of this great tutorial, assumes that you have no experience at all with shell scripting. The site or software will take you step by step in how to write simple, and later more complex shell scripts.

Go at your own pace, understand the current lesson, then click Next  at the bottom of each page and keep going! The site has dozens and dozens of Bash scripts, that you are free to use, modify, and enjoy.