Difference between revisions of "Raspberry first setup"

From Hobbywiki
Jump to: navigation, search
(piface setup)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Computerguides]]
 
[[Category:Computerguides]]
 +
==basic webserver setup with python/php2.7/apache2==
 
*apt-get update
 
*apt-get update
 
*apt-get install vim
 
*apt-get install vim
Line 13: Line 14:
 
*apt-get install apache2 php5 libapache2-mod-php5
 
*apt-get install apache2 php5 libapache2-mod-php5
 
*sudo apt-get install mysql-server mysql-client php5-mysql
 
*sudo apt-get install mysql-server mysql-client php5-mysql
*apt-get install vsftpd
+
 
  vi /etc/vsftpd.conf
+
*apt-get install python-mysqldb
      anonymous_enable=YES to anonymous_enable=NO
+
 
 +
*apt-get install phpmyadmin
 +
 
 +
==piface setup==
 +
Piface software is already installed on latest raspbian image, in addition you need the following:
 +
apt-get install python-dev git
 +
  git clone https://github.com/thomasmacpherson/piface.git
 +
cd piface/python
 +
python setup.py install
 +
../scripts/spidev-setup
 +
 
 +
 
 +
*Edit /etc/modprobe.d/raspi-blacklist.conf
 +
*Disable the following by adding # infront of
 +
**blacklist spi-bcm2708
 +
**blacklist i2c-bcm2708
 +
*Reboot
 +
 
 +
 
 +
*chown -R www-data:www-data /dev/spidev0.0
 +
*chmod -R 755 /dev/spidev0.0
 +
 
 +
===wiringPI===
 +
*http://wiringpi.com/download-and-install/
 +
 
 +
==permission==
 +
In order for www-data to use necessary resources for python, gpio etc do the following as root:
 +
*sudo visudo
 +
*add the following under "# User privilege specification"
 +
*www-data ALL=NOPASSWD: /dev/mem, /var/www/piface/isr.py, /usr/bin/python, /tmp/isr.pid, /bin/kill, /bin/cat
 +
Ctrl-X

Latest revision as of 19:38, 19 March 2014

basic webserver setup with python/php2.7/apache2

  • apt-get update
  • apt-get install vim

Edit /etc/network/interfaces

iface eth0 inet static
       address 192.0.2.7
       netmask 255.255.255.0
       gateway 192.0.2.254
reboot
  • apt-get install apache2 php5 libapache2-mod-php5
  • sudo apt-get install mysql-server mysql-client php5-mysql
  • apt-get install python-mysqldb
  • apt-get install phpmyadmin

piface setup

Piface software is already installed on latest raspbian image, in addition you need the following:

apt-get install python-dev git
git clone https://github.com/thomasmacpherson/piface.git
cd piface/python
python setup.py install
../scripts/spidev-setup


  • Edit /etc/modprobe.d/raspi-blacklist.conf
  • Disable the following by adding # infront of
    • blacklist spi-bcm2708
    • blacklist i2c-bcm2708
  • Reboot


  • chown -R www-data:www-data /dev/spidev0.0
  • chmod -R 755 /dev/spidev0.0

wiringPI

permission

In order for www-data to use necessary resources for python, gpio etc do the following as root:

  • sudo visudo
  • add the following under "# User privilege specification"
  • www-data ALL=NOPASSWD: /dev/mem, /var/www/piface/isr.py, /usr/bin/python, /tmp/isr.pid, /bin/kill, /bin/cat

Ctrl-X