Server Customisation (Optional)
On this page we detail some of the server configurations you may want to change from standard.
Creating an SSH-Key
To create an ssh key open command prompt on your local machine and:
`ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
When asked where to save it, just use the default by hitting enter.
Next you will be asked to enter a passphrase, again just hit "enter".
Check the files have been created:
- On Mac: Run
- On Windows: Run
- On Linux: Run
- On Mac: Run
You should see the following files: "id_rsa" and "id_rsa.pub" among others. Important! "id_rsa" is private, do NOT copy this anywhwere! The "id_rsa.pub" file is one you transfer to other machines.
- Set the PUBLIC_SSH_KEY variable in the settings file to "/Users/<YOUR_USERNAME>/.ssh/id_rsa.pub" for Mac and Linux users and "/c/Users/<YOUR_USERNAME>/" for Windows.
If you have not run the initial intall on the Pi yet then stop here. The SSH key will be added when the install begins. If you have already initialised the PI then run the following command:
`fab add_ssh_key -H littlesense.local`
Changing the .local Address
If you have used the NOOBs installation of Raspbian then you can find the Raspberry Pi using http://raspberrypi.local/ rather than entering the IP Address. This is nice, but maybe you want something more related with your project. To change the host name i.e. raspberrypi, do the following:
- Select "Network Options"
- Select "Hostname"
- Read the instructions and hit ok
- Enter a new hostname.
- Connect to the Pi over SSH
`sudo nano /etc/hosts`
- Change the "raspberrypi" part of the last entry (
`127.0.1.1 raspberrypi`) to the name of your choice. Make sure you conform to URL conventions; don't use spaces, etc.
`sudo nano /etc/nginx/sites-enabled/<ROOT_NAME>`where ROOT_NAME is the ROOT_NAME you specified in the settings file.
- Change any occurances of "raspberrypi" to the new name. Save and exit.
`sudo /etc/init.d/hostname.sh`to update the PI
`shutdown -r now`to reboot the Pi.
- Test your <new_name>.local in the browser once the Pi has rebooted.
Reduce GPU memory
If you have no intention of using the Raspberry Pi's desktop environment then you can reduce the amount of memory allocated to the GPU. This frees up memory for other applications and may improve preformance.
- Select "Advanced options"
- Select "Memory Split"
- Set to "16"
- Select "OK"
- Select "Finish" and the Pi may ask to reboot.