1 Abstract
The apache service can run on the Raspberry Pi emulator as a web server. When start the emulator, specify the TCP redirection from the host to emulator. Then the TCP port of the emulator can be accessed outside.
2 Steps to setup web server on emulator
2.1 Prepare the emulator
• Download the emulator. [2]
• Start the emulator with the command line “bin\qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda 2012-06-18-wheezy-beta.img -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2" -redir tcp:8080::80” [3]
o Suppose the machine name hosting the emulator is PiHost.
2.2 Setup Apache web server [1]
• Start the teminaterX.
• Execute "sudo apt-get update".
• Execute "sudo apt-get install apache2 php5 libapache2-mod-php5".
o It will say "Do you want to continue", just press "y" and hit Return / Enter.
• Execute "sudo groupadd www-data".
• Execute "sudo usermod -g www-data www-data" to change the user mode.
• Execute "sudo service apache2 restart" to restart the apache server.
• Access the web server in NetSurf with the URL: http://localhost/.
• Verify the web server works.
2.3 Configure the firewall
• Configure the firewall of the machine PiHost. Enable the inbound of TCP 8080.
2.4 Access the web server
• Access the web server with the URL: http://PiHost:8080/.
• Verify the web server is accessible.