Redis Caching with OwnCloud

While setting up an OwnCloud server for my company, I couldn’t really find any good way to cache, and with the Ubuntu repos having an old version of Redis, meant of course it couldn’t be used for best performance and stability. I tried installing it manually from some guides I found, and trying to see OwnCloud’s documentation and was last using an Apcu and Redis (older version) combined so I stumbled upon a guide from TechandMe.se which actually resolved my issues of an old Redis, and dramatically sped up my server.

This guide is also scripted for an automated install, you can download the script here.

  1. GET RID OF APCU & MEMCACHED
    $~: sudo php5dismod apcu && sudo apt-get purge php5-apcu -y
    $~: rm /etc/php5/mods-available/apcu-cli.ini
    $~: sudo apt-get purge --auto-remove memcached -y && php5dismod memcached
  2. INSTALL NEEDED DEPENDENCIES TO PREPARE THE REDIS INSTALLATION
    $~: sudo apt-get update && sudo apt-get install build-essential -y

Continue reading “Redis Caching with OwnCloud”

Tip for OwnCloud

I was building my OwnCloud file storage on Ubuntu 14.04LTS (upgrading to 16.04.1 LTS this summer), which if you haven’t heard of definitely check out it is the most amazing cloud storage program and you control it yourself. It even offers server side encryption, and tons of options to make it how you want it for you or your company. See it at www.owncloud.org

But I was coming across an .htaccess issue that kept popping up so I modified Apache so much and it still appeared. So I finally stumbled across my fix. Move the OwnCloud data directory out of the default location. So here are the steps I took

Stop apache2

sudo service apache2 stop

Edit config file in default location

sudo nano /var/www/html/owncloud/config/config.php

Change default location to new location

(pick one, I chose /mnt/owncloud_data but put it anywhere you like)

Move the data folder to new location

sudo mv /var/www/html/owncloud/data /new/data/directory/here

if required change permissions

sudo chown -R www-data:www-data /new/data/directory/here

Restart apache2

sudo service apache2 start

Voila .htaccess issue is GONE!

Fixed Nvidia GPU settings for GNU/Linux Home Theater PC

Hello everyone, so I have a home theater PC I built myself that is running completely on GNU/Linux. So I ran into an issue at my Grandmothers house when I brought it with me, and xorg.conf would be deleted on each reboot. Plus the GPU would have significant tearing on video at 720p and 1080p. I had previously fixed the video tearing.

If you do not already have the nvidia drivers installed install them with the code below
NOTE: THIS IS FOR NVIDIA-361 THE LATEST CURRENT STABLE DRIVER, OLDER GPU’S (such as my prior Nvidia 240GT I upgraded this HTPC from) MAY NEED AN OLDER DRIVER

sudo apt-get update
sudo apt-get remove nvidia-*
sudo apt-get install nvidia-361 nvidia-settings

It appears there was a bug in the Xubuntu 14.04.3 LTS I use (also applies to Ubuntu, Kubuntu, Lubuntu, and Linux Mint I believe as well) that it kept deleting it. I am pretty sure this is due to the fact I had it installed prior, so the nvidia-xconfig needed to be called again. This is easily remedied in machines with an Nvidia GPU, and the proprietary Nvidia driver by running

sudo nvidia-xconfig

This will create a barebones xorg.conf that will get it to do basic functions. Now the additions to the xorg.conf to fix video tearing for my Nvidia 720GT (1GB DDR3 by Gigabyte if wondering)

Now here is where we need to start editing xorg.conf. So bring up your favorite editor as root. In my case I like nano in terminal, notepadqq and emacs for GUI, and open xorg.conf

sudo nano /etc/X11/xorg.conf

This should now bring up your xorg.conf. So there is one section that needs two options added and two sections at the bottom that need to be added

Look for the “Device” section, and it should look similar to this with your GPU model instead of my Nvidia 720GT 1GB DDR3. Each of the “Option” additions, are one line each.

Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce GT 720”
Option “RegistryDwords” “PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1”
Option “TripleBuffer” “True”
EndSection

Add these two sections at the bottom

Section “DRI”
Mode 0666
EndSection

Section “Extensions”
Option “Composite” “Enable”
EndSection

After this your video should be tear free. Tested on Xubuntu GNU/Linux 14.04.3 LTS w/ custom 4.1.13 amd64 kernel, Nvidia-361 drivers, to a TV with HDMI