Raspberry initial configuration
The config script allows to resize the partition to fill the SD card, change timezone, change RAM split and more.
While in \home\pi\ directory run
sudo raspi-config
Check firmware version
The first thing to check is if you pi has the latest firmware
uname -a
You should get a response like
Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l GNU/Linux
Updating installer package
In case you get errors when trying to install something saying package not available try to run the update first.
sudo apt-get update
Then run
sudo apt-get upgrade
to update the packages to the latest version
For more info go to https://www.raspberrypi.org/documentation/raspbian/updating.md
For more info go to https://www.raspberrypi.org/documentation/raspbian/updating.md
Installing the auto-updater for firmware
Taken from developer's webpage at https://github.com/Hexxeh/rpi-update
To download and install the updater
wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
and then run as root ( sudo su )
sudo apt-get install git-core
to install git-core and then
rpi-update
To use a different CPU/GPU RAM memory split use
rpi-update 192
this will allocate 192MB for Linux and the rest (64MB) for the GPU
Possible values are 128, 192, 224.
If a monitor will not be used it is better to use the 224MB for Linux, for XBMC use the 128MB split.
Also check http://elsmorian.com/post/23925914654/changing-raspberrypi-ram-cpu-gpu-ratio for alternative way of changing the memory split.
Setting up static IP
Use vi or nano to edit the interfaces file
sudo vi etc/network/interfaces
and change to
auto lo
iface lo inet loopback
iface eth0 inet static
address X.X.X.X <-Your IP address
netmask 255.255.255.0
gateway X.X.X.Y <- Your gateway IPto assign a dns use
sudo nano etc/resolv.conf
and enter the ip address
Change the timezone
Use
sudo dpkg-reconfigure tzdata
Installing Apache-mySQL-PHP
There is a nice guide with various information at http://www.penguintutor.com/linux/installing-lamp
Run as root
apt-get install mysql-server
apt-get install mysql-client
apt-get install php5
apt-get install php5-mysql
Using sftp to transfer files
By default raspberry pi has sftp enabled on port 22 (SSH)
This can be used to transfer files to the pi using an sftp client like winscp or filezilla.
In order to be able to upload files to a specific folder the owner of the folder must change to the desired user. this can be done using
sudo chown -R pi /var/www
For SMB access follow guide found at
http://simonthepiman.com/how_to_setup_windows_file_server.php
also check out this link
http://raspberrywebserver.com/serveradmin/share-your-raspberry-pis-files-and-folders-across-a-network.html
To setup a share use
[to_password_protected_folder]
path = /home/tom
writeable = yes
valid users = username1
[no_password_folder]
path = /home/nobody
writeable = yes
in config file
The samba password must be the same as the system password and the samba user must exist as a system user.
Install tightVNC for remote access
Follow guide here
RealVNC can also be enabled from
sudo raspi-config
--> Interface Options
Installing wxpython
First install the dependencies
$ sudo apt-get update $ sudo apt-get install dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev libgstreamer-plugins-base0.10-dev libnotify-dev freeglut3 freeglut3-dev libwebkitgtk-3.0-devDisable the desktop by going into
sudo raspi-config
--> System Options --> S5 Boot/Auto Login --> B1 Console
and then do
sudo pip3 install wxpython
for a specific version use
sudo pip3 install wxpython==4.0.4
for more info look at
https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi
For changing display resolution
https://learn.adafruit.com/adafruit-5-800x480-tft-hdmi-monitor-touchscreen-backpack/raspberry-pi-config
dtparam=audio=on
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
For Enabling the touch functionality
In /boot/config.txt
#SPI must be on
dtparam=spi=on
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
No comments:
Post a Comment