Raspberry Pi Basic Configuration

Source: Internet
Author: User
Tags nameserver aliyun tightvnc

Installation system
http://sourceforge.net/projects/win32diskimager/#下载win32diskimager
https://www.raspberrypi.org/downloads/#下载Raspbian

Swipe the system image into SD card, insert pie, start, xshell using SSH connection

To open the root User:

$ sudo passwd--unlock root
$ sudo passwd root


$ su

ConfigurationYumSource
$ mv/etc/apt/sources.list/etc/apt/sources.list.bak
$ VI/etc/apt/sources.list
Debhttp://mirrors.aliyun.com/raspbian/raspbian/Wheezy main Non-free Contrib #阿里源
Deb-srchttp://mirrors.aliyun.com/raspbian/raspbian/Wheezy main Non-free Contrib
$ apt-get Update
$ apt-get Install chkconfig-y

$Raspi-config
1 Expand Filesystem
2 Change User Password
4 internationalisation Options
1 change locale changing the default language
2 change Timezone Changing the time zone
8 Advanced Options
A3 Memory Split is reserved by default to the graphical interface is 64MB, can be changed to 32MB, here set, VNC can Ignore
A6 Update

InstallationVNC
$ apt-get Install Tightvncserver-y
Set aVNCPassword:
$ vncpasswd
Enter the action password two times, and then ask if you want to set a view(view-only)password, according to their liking, generally not necessary
Boot auto Start
To set the boot up, you need to/etc/init.d/To create a file in
$ vi/etc/init.d/tightvncserver

#!/bin/sh
# # # BEGIN INIT INFO
# Provides:tightvncserver
# Required-start: $local _fs
# Required-stop: $local _fs
# Default-start:2 3 4 5
# default-stop:0 1 6
# Short-description:start/stop Tightvncserver
# # # END INIT INFO

# More details see:
# HTTP://WWW.PENGUINTUTOR.COM/LINUX/TIGHTVNC

# # Customize This entry
# Set The user variable to the name of the user to start Tightvncserver under
Export user= ' pi '
# # # END Customization Required

Eval CD ~ $USER

Case "$" in
Start
#start the command line. Customize the resolution, console number, or other parameters here.
Su $USER-C '/usr/bin/tightvncserver-depth 16-geometry 800x600:1 '
echo "Starting TightVNC server for $USER"
;;
Stop
#terminates the command line. Here the console number is consistent with the start.
Su $USER-C '/usr/bin/tightvncserver-kill:1 '
echo "Tightvncserver stopped"
;;
*)
echo "Usage:/etc/init.d/tightvncserver {start|stop}"
Exit 1
;;
Esac
Exit 0
$ chmod 755/etc/init.d/tightvncserver
$ chkconfig Tightvncserver on

Configure the Network

1. Wired connection, and set static IP
$ vi/etc/network/interfaces

Auto Lo
Iface Lo inet Loopback

Auto Eth0
Allow-hotplug eth0
Iface eth0 inet Static
Address 192.168.1.120
Gateway 192.168.1.1
Netmask 255.255.255.0

Auto Wlan0
Allow-hotplug Wlan0
Iface Wlan0 inet Manual
Wpa-conf/etc/wpa_supplicant/wpa_supplicant.conf

$ Echo ' nameserver 114.114.114.114 ' >>/etc/resolv.conf

2. Set up wireless (not successful)
$ vi/etc/wpa_supplicant/wpa_supplicant.conf
Ctrl_interface=/var/run/wpa_supplicant
Ctrl_interface_group=0
ap_scan=2

network={
Ssid="WIFIname "
Proto=wpa2
Key_mgmt=wpa-psk
Pairwise=tkip
Group=tkip
psk="WIFIPassword "
}

$ vi/etc/network/interfaces 
Auto Lo
Iface Lo inet Loopback
Iface eth0 inet DHCP.

Auto Wlan0
Iface Wlan0 inet DHCP
Pre-up Wpa_supplicant-b-dwext-iwlan0-c/etc/wpa_supplicant/wpa_supplicant.conf
Post-down Killall-q Wpa_supplicant

After the modification is complete, restart the network using the following command
$ Service Networking Restart
After success, useifconfigcommand to seeWlan0equipment, and has aIPAddress(is connected)

Set staticIP:
$ vi/etc/network/interfaces
Auto Lo
Iface Lo inet Loopback

Iface eth0 inet DHCP
Allow-hotplug Wlan0

Iface Wlan0 inet Manual
Wpa-roam/etc/wpa_supplicant/wpa_supplicant.conf
Iface default inet static
Address 192.168.1.120
Netmask 255.255.255.0
Gateway 192.168.1.1

$ Echo ' nameserver 114.114.114.114 ' >>/etc/resolv.conf

Raspberry Pi Basic Configuration

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.