Set-up MacMini 1.4Ghz Intel Core i5 4GB (OS X El Capitan 10.11.2)
$ sudo easy_install pip
$ sudo pip install -U setuptools already installed on El Cap
$ sudo pip install pyserial
install MariaDB as that is what is installed on pew
==
- make sure Xcode is uptodate or install it (this triggered an OS install, do it)
$ xcode-select –install
- install homebrew
$ ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
- Check Homebrew
$ brew doctor
This will give you a message – “Your system is ready to brew.”
- Update Homebrew
$ brew update
- Check MariaDB version in brew repo
$ brew info mariadb
- Install MariaDB
$ brew install mariadb
Run the Database Installer (change the version number in the path to match where MariaDB was installed in previous step)
$ unset TMPDIR
$ cd /usr/local/Cellar/mariadb/10.1.13/
$ mysql_install_db
- Version first installed 10.1.13 (on 27-4-16)
- To have launchd start mariadb now and restart at login:
$ brew services start mariadb
- Start MariaDB
$ mysql.server start
- Secure the Installation
$ mysql_secure_installation
- Connect to MariaDB
Follow security questions (remove anon users, enable access as root user remotely, set up root password)
$ mysql -u root -p
- Verify MariaDB Version
$ select @@version;
===
- $ sudo pip install MySQL-python
$ sudo pip install PyMySQL
version at 27-4-16 PyMySQL 0.7.2
===
- Generate rsa key for SSH access to server:
$ ssh-keygen -t rsa - Copy public key to clipboard
$ pbcopy < ~/.ssh/id_rsa.pub
- plug in USB to serial convertor and a sensor. You may have FTDI drivers installed – check using from root dir:
$ ls /dev/cu.*
You are looking for /dev/cu.usbserial or /dev/tty.usbserial (see http://pbxbook.com/other/mac-tty.html )
If not showing up install driver at http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41 and restart. [note Macmini didn’t need driver install]
===
- Change paths in python script to be correct serial port paths, note these are in a weird order:
ser0 = serial.Serial(‘/dev/tty.usbserial’, 9600, timeout=5)
Use CoolTerm to establish which serial port is which reader: http://freeware.the-meiers.org/
===
To get up and running on the command line:
$ mysql.server start
then
$ mysql -u root -p
created nmr db on iMac and created tables using latest schema hosted on github.