Monday, August 25, 2014

raspberry pi lcd links

Links with notes useful for an ongoing project:

Saturday, August 23, 2014

Creating mysql development database

Quick & dirty way to create a localhost db for testing. Database is called db_dev and user is called db_dev_user

mysql -u root -p

mysql>CREATE SCHEMA db_dev;
Query OK, 1 row affected (0.01 sec)

mysql>CREATE USER 'db_dev_user'@'localhost' IDENTIFIED BY 'Passw0rd';
Query OK, 0 rows affected (0.01 sec)

mysql>GRANT ALL PRIVILEGES ON db_dev.* to 'db_dev_user'@'localhost';
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.01 sec)


Saturday, August 16, 2014

Automatically mount windows share on ubuntu linux

Create a file that will hold the user and password for the share. Make this file readable only by you.
nano ~/.raspcredentials

(type the following)

chmod 600 ~/.raspcredentials

Create the mount point for the share. I'll call it ~/docs but can be what you want
mkdir ~/docs

edit fstab as root. Here we will mount the /home of the share to the ~/docs folder.
Add this line to fstab

//ip_address_or_hostname/home /home/your_username/docs cifs credentials=/home/your_username/.raspcredentials,iocharset=utf8,sec=ntlm,uid=your_username,user,users 0 0

// /home/tiago/docs cifs credentials=/home/tiago/.raspcredentials,iocharset=utf8,sec=ntlm,uid=tiago,user,users 0 0

At this moment you cannot yet mount it because samba/cifs is not yet installed. This is easy to fix:
sudo apt-get install cifs-utils
As non root, to be able to mount use mount <mount_point>. In this case this is
mount ~/docs


Saturday, May 17, 2014

Building a Raspberry Pi NAS - Part 1: Setting up file storage

This post is part of a series on building a low power, low cost NAS system based on a raspberry pi. Part 1 TO DO!