Turn the Raspberry Pi into a Web server, you can control the Raspberry Pi by visiting the Web page, for example: Check the camera \ Turn on the light and so on.The thought of Linux Web
Python is used for simple WEB control of Raspberry Pi, and python Raspberry Pi web
First, we will show you the effect. I feel very satisfied. Please continue to read the full text:
Knowledge used: Python Bottle HTML Javascript JQ
Simple implementation of Raspberry Pi WEB control, Raspberry Pi web
Final Effect
#! /Usr/bin/env python3from bottle import get, post, run, request, template @ get ("/") def index (): return template ("index ") @ post ("/cmd") def
In my previous article, I talked about how to build a high-availability system: Two Raspberry Pi deploy the GlusterFS cluster file system, and it becomes a fault-tolerant file server. In this article, we will build another Fault-Tolerant Service Based on this high-availability system: Build a simple Web server cluster.
Maybe you have not read my previous article
Use Raspberry Pi to build your own web server (I) install LAMP and raspberry lamp1. Adjust pi GPU memoryOccupiedSize
As a web server, you do not need to output video signals. Therefore, reduce GPU memory usage to maximize
Use Raspberry Pi to build your own web server (2) set up Apache and raspberry apache
1. Obtain the Server IP Address:
1 ifconfig
2. Change the local hosts file
If you want to enter a domain name in your browser to access your server, you need to change the hosts file in your computer.
Linux:
1 sudo vim /etc/hosts
Wind
For students to do a smart home tutorial: The use of Raspberry Pi as a server, we through the method of accessing the server, control the high and low level of the I/O port of the Raspberry Pi, I/O port connected on the relay (to achieve low voltage control high voltage), relay you can be arbitrarily connected to the h
The first thing we think of about Linux Web servers is:Apache + MySql + Php.
Apache: is the world's first Web server software to use.
Can run on almost all widely used computer platforms, and is the most popular Web server-side software because of its widespread use across platforms and security.
MySQL: is a relational database management system
) {});});
Yes, just the three lines of code ...
1th, 2 line to all the buttons (button) bound a click of the event, the third line calls the jquery post method to send This.id (the ID of the clicked button), sent to "/cmd" This path, at this time, our Python code of the second route to work, Received the ID of the clicked button on the webpage, and printed out the "pressed button: XXX"
Of course, here are a few if statements to judge, you can follow the actual needs to do some real control, wel
1,apache Introduction:Apache is the world's first-ranking Web Server software . It can run on almost all of the widely used computers platform Because of its cross-platform and security is widely used, is the most popular Web server-side software. For more information, see: " Baidu Encyclopedia- Apache" " Wikipedia -apache HTTP Server "2, install Apache to
Linux+raspberry Pi+python* * For students to do a smart home tutorial:Using Raspberry Pi As a server, we have access to the server method, control the Raspberry Pi I/O port high and low level, I/O port on the relay (to achieve low
the following two lines of code:http. Handle ("/", HTTP. Fileserver (http. Dir ("HTML")))http. Listenandserve ("0.0.0.0:8080", nil)Step 4: The target environment is modified to CROSS-ARM6, according to "Ctrl+b" compiled, the generated execution file is the source directory "Test", no suffixStep 5: Copy "Test" to your arm Development Board (Raspberry Pi Raspberrypi, Orange pie Orangepi), and authorize: sudo
Kinda want to get started Raspberry Pi, then do a small Web server, put in the school intranet.
Have you ever done anything like that?
Reply content:
Kinda want to get started Raspberry Pi, then do a small Web server, put in
This blog will show you how to install three different text-based Web browsers on Raspberry Pi. The original article can be found here or at the bottom of this article. Most Web browsers run a little hard on the small school, or consume a lot of resources, so an alternative solution is to use a
Use a command line-based Web browser in Linux/Raspberry Pi
This article will show you how to install three different text-based Web browsers on Raspberry Pi. Most Web browsers run a li
This article describes how to use Python to easily implement Raspberry Pi's WEB control. If you need it, you can refer to it to show you the effect. I feel very satisfied. Please continue to read the full text:
Knowledge used: Python Bottle HTML Javascript JQuery Bootstrap AJAX, of course, linux
I'm going, so many ...... Let me start ......
First paste the final source code:
#! /Usr/bin/env python3from
input
sudo raspi-config
Copy CodeThen select Change_locale, and select ZH_CN in the default locale for the system environment:. UTF-8, after the configuration is complete, enter the command
sudo reboot
Copy CodeRestart complete can be connected to the VNC after the use of Chinese display and Chinese input method, switch Chinese input method is the same ctrl+space5. Q: How do I install Google's Open source browser Chromium on Rasp
Use Raspberry Pi to build your own web server (I) install LAMP1. Adjust the GPU memory usage of pi as the web server, and do not need to output video signals. Therefore, reduce the GPU memory usage as much as possible to maximize pi
privileges.)Then install the image using the DD commandsudo dd bs=1m if=2016-05-27-raspbian-jessie.img of=/dev/rdisk2At this point the burn card is complete. Insert the card into the Raspberry Pi and plug it into the power supply to boot normally.Read a lot of online tutorials, it seems that before the Raspberry Pi 3
open source gather to do live:-) stream image no problem, but the voice, but also want to do. 9. Plug in the webcam will be all over the scene when the image stream to the Internet. can stream webcam to the Internet to share with the landscape or small animals. 10. The Thunder God's Hammer 3 on the Raspberry Pi to capture the source according to the following Web
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.