Web Service in RaspberryPI
i have been doing my final project at health informatics engineering ITB,, which related with web services. i used Codeigniter framework as web builder to accompany me accomplish this program. i thought i could change a paradigm that website stored at web service must have be saved in a server or PC. then, i searched whether RaspberryPi could as a web server, and run normally without lack in connection. the answer is “yes” , it could. so i decided to move my final project into PI. here this step :
- Connect your RaspberryPI to the network ,i prefer you use a wireless than switch.
this wireless will connect to mobile device or your laptops later. connect this device into ethernet card in PI through UTP Cable.
- connect your PI into display adapter (if this is your first action on PI), you can use TV or LCD . if you use TV, connect video adapter port into TV Port. if you use LCD , connect HDMI in PI into HDMI in LCD
- Network setting setting your network using DHCP, which acquired from wireless. open network setting by use nano /etc/network/interfaces
- i recommend you use remote connection such as ‘Putty’. download from this URL and install into your laptops (client) as far as you need. both use remote connection and use actually device without remote is good.
- suggest that you get IP Address on your PI 192.168.1.104 (my PI address)
- install this requirement tools : apache = sudo apt-get install apache2 , PHP = sudo apt-get install php5 , MySQL = sudo apt-get install mysql-server and PHP-MySQl = sudo apt-get install php5-mysql
- make web file in /var/www for instance just provide a service
- Create your own database :
- mysql – u root -p
- in mysql prompt , type : create database your_database_name
- create a table
I don’t discuss more about database or PHP , moreover you can follow latest post about php or mysql in sidebar.