Pages

Thursday, 13 November 2014

My Linux essentials

Taking the sad opportunity that my pi crashed "irreversibly" (I suspect SD corruption, almost all was good except that I lost wifi access, some services stopped starting at boot and even that I investigated almost every single directory or file that should be responsible for boot/network config I couldn't find a solution; happily I had backup of everything important + this blog :)) and I had to perform clean install I will make a list of some most basic linux tools that do not come shipped with standard raspbmc installation but I find very useful:

sudo apt-get install and then:
git
htop
mc (midnight commander)
screen
tree

The above list will grow over time, as I install, test and get addicted to more "essential" tools :)


Wednesday, 15 October 2014

ownCloud

First make sure you have your RAMP set up correctly. Then it's really simple:

1) Follow steps described here to install latest version of ownCloud using apt-get (without it, my RaspBMC downloaded and installed ownCloud 4, while the latest at the time of writing this is 7.something):

sudo apt-get install owncloud

by default main ownCloud's files should install in /var/www/owncloud/ (including config/config.php), also apache's config file pointing to that location should be placed in /etc/apache2/conf.d/owncloud.conf (editing this file should allow you to change ownCloud's default URL)

2) Create directory where all your data will be stored, and make sure it's owner is changed to the user that apache runs on:

sudo chown -R apache_user:apache_user_group directory/

should do the trick

3) Complete ownCloud setup by launching http://your-rpi-local-address/owncloud

(here I stumbled upon some problems which I managed to solve with that fix)

4) Finish by polishing your ownCloud's configuration file located in /var/www/owncloud/config/config.php and edit trusted_domain section to enable access from internet (only if it's your intention!):

'trusted_domains'=>
array (
0=>'your-internal-domain-or-ip_address',
1=>'your-external-domain-or-ip_address'
),

5) WebDAV should be enabled by default, so use it with the following URL:

internal-or-external-domain-or-ip/owncloud/remote.php/webdav

Bunch of useful links:
http://www.ebayram.net/how-to-install-owncloud-on-ubuntu-and-debian/
https://forum.owncloud.org/viewtopic.php?f=8&t=18742
http://www.instructables.com/id/Raspberry-Pi-Owncloud-dropbox-clone/step3/Configuor-php-Apache/
http://doc.owncloud.org/server/7.0/admin_manual/installation/installation_wizard.html

Friday, 28 February 2014

RAMP: raspberry pi / apache / mysql mariadb / php5 / phpmyadmin

Let's start with installing apache essentials:

sudo apt-get install apache2 apache2-doc apache2-utils

then PHP5:

sudo apt-get install libapache2-mod-php5 php5 php-pear php5-mysql php5-xcache

and finally MariaDB... but wait, it's nowhere to be found in official raspbmc repository, so since I had some problems adding it and installing from official MariaDB repo, I used this one instead. So install it by simply doing:

sudo apt-get install mariadb-server

During MariaDB installation you should be prompted to set up root password.

Frankly.... I installed this some time ago and didn't take proper notes :( Well, maybe next time I install the RAMP stack I will work on this post ;) Sorry

Wednesday, 8 January 2014

transmission

Install transmission from OSMC App Store - according to OSMC Project Leader Sam Nazarko this is the preferable way as oposed to apt-get.

After installation is completed stop daemon with:

sudo systemctl stop transmission

then edit ~/.config/transmission-daemon/settings.json (where ~ means your home directory, so it will most likely be /home/osmc).

There's a plethora of settings, nicely described here, the default ones guarantee transmission running just fine, but you propably will want to change at least:
- download-dir - where your torrents will land,
- incomplete-dir-enabled (true) & incomplete-dir - where your torrents in progress will be stored,
- rpc-authentication-required (true) rpc-usernamerpc-password - transmission's web interface credentials (as for the password - type it in plain-text form, after you restart transmission it will be encrypted)
- script-torrent-done-enabled (true) & script-torrent-done-filename - full path to a bash script that will be executed when the torrent is finished (for example for sending emails follow sending emails with msmtp post).

As transmission runs under osmc user by default (beware - only if you install it from OSMC App Store), remember to make sure that osmc user or group have read/write permissions on download-dir incomplete-dir paths.

After you are happy with your setup, save settings.json file and start transmission:

sudo systemctl start transmission

And remember that if you are ever tempted to tinker in settings.json config file - stop the daemon first, as it overwrites all settings on exit.

If you didn't make any changes to rpc-port in settings.json, the web interface will be available under osmc_local_address:9091 (if you don't know what is osmc_local_address please go to Settings-> ... )

But wait a second... isn't this the uglies web gui ever? I personally think so, that is why I like to install transmission-control - they do have an install script which you may get and run by doing the following:

cd / (go to root directory)
sudo wget --no-check-certificate https://transmission-control.googlecode.com/files/tr-control-easy-install.sh (download the install script)
sudo chmod +x tr-control-easy-install.sh (make the script executable)
sudo ./tr-control-easy-install.sh (and finally - install)

If you are lucky you should finally have a very nice web interface for transmission :)