`
sillycat
  • 浏览: 2551657 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Play Raspberry Pi(1)System and nodeJS/nginx

 
阅读更多
Play Raspberry Pi(1)System and nodeJS/nginx
 
Download the software from here http://www.raspberrypi.org/downloads/
I prefer to try RAPBIAN, because I usually use ubuntu system.
 
I download the file 2014-09-09-wheezy-raspbian.zip
Unzip the file and open distutil on MAC system.
 
Find the 16 GB disk and clean that with MS-DOS(FAT) format.
 
Open command line and type
> diskutil list
 
Unmount the disk first
> sudo diskutil unmount /dev/disk2s1
 
Write the file to the disk
> sudo dd if=2014-09-09-wheezy-raspbian.img of=/dev/disk2 bs=2m
 
Type the username and password, pi, raspberry.
 
I change the password and add one user for myself.
>adduser carl
 
Add sudoer
>visudo
root    ALL=(ALL:ALL) ALL
carl    ALL=(ALL:ALL) ALL
 
ctrl + X to exit.
 
Set up the static ip
> cat /etc/network/interfaces
auto lo

iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.106
gateway 192.168.0.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
 
Restart the system
> sudo reboot
 
Set up nodeJS env on raspberry pi.
 
Unzip the file and go to the working directory
> ./configure --prefix=/home/carl/tool/node-v0.10.33
>make
>make install
 
It will take a great long time to compile the source codes on that small machine. I may choose this one http://node-arm.herokuapp.com
Or I can download the arm-pi.tar.gz from some URLs like this http://nodejs.org/dist/v0.11.9/.
 
I pick up to install v0.10.28 or v0.11.11. Let me start with the latest one.
 
Some discussion about “ Illegal instruction"
 
Finally I found this version is working on my raspberry pi B+. http://nodejs.org/dist/v0.10.28/
> node -v && npm --version
v0.10.28
1.4.9
 
Set up nginx on raspberry pi
Download and try with version 1.6.2, unzip the file and try to build that
> ./configure --prefix=/home/carl/tool/nginx-1.6.2
 
Configure not pass, I need to install this first
 
This command will help
> ./configure --prefix=/home/carl/tool/nginx-1.6.2 --with-pcre=/home/carl/tool/commons/pcre-8.36
 
It does not work well with manually installing PCRE. I may use this command to install PCRE instead.
> sudo apt-get install libpcre3
> sudo apt-get install libpcre3-dev
 
Command to test the config file
> sudo sbin/nginx -t
 
Command to start
> sudo sbin/nginx
 
Command to restart
> sudo sbin/nginx -s reload
 
Command to stop
> sudo sbin/nginx -s stop
 
References:
 
 
nginx installation
 

 

 

 

分享到:
评论
2 楼 sillycat 2015-04-28  
Download the binary from here
http://node-arm.herokuapp.com/
1 楼 sillycat 2015-04-28  
Raspberry version of v0.12
http://conoroneill.net/download-compiled-version-of-nodejs-0120-stable-for-raspberry-pi-here

相关推荐

    树莓派RaspberryPi 4B+ 操作系统+Nginx安装手册

    总之,树莓派Raspberry Pi 4B+搭配Nginx服务器提供了一个经济实惠且灵活的Web服务器解决方案。通过本文的步骤,您不仅学会了如何安装操作系统,还了解了如何配置Nginx以托管和管理您的网站。随着您对树莓派和Nginx的...

    Advanced Raspberry Pi Raspbian Linux and GPIO Integration.zip

    You'll work with Linux driver information and explore the different Raspberry Pi models, including the Pi Zero, Pi Zero W, Pi 2, Pi3 B and Pi3 B+. You'll also review a variety of project examples ...

    Raspberry Pi Zero Cookbook

    Set up your Raspberry Pi Zero with the operating system, networking, and different interfaces Get a hands-on introduction to Linux, Python, and shell scripts with the Raspberry Pi Zero Become a master...

    Getting Started with Raspberry Pi Zero.pdf

    Understand how to initially download the operating system and set up Raspberry Pi Zero Find out how to control the GPIO pins of Raspberry Pi Zero to control LED circuits Get to grips with adding ...

    Raspberry Pi 4 Beginner’s Guide.pdf

    介绍Raspberry Pi 4的用户手册,值得一读。 In our opinion, you will certainly adore the Raspberry Pi 4. Ultra-small, affordable, even cheaper than most video games, you can use the Pi to build ...

    Raspberry.Pi.Computer.Architecture.Essentials.17843

    Learn about the Raspberry Pi 2 architecture and Raspbian operating system through innovative projects Book Description With the release of the Raspberry Pi 2, a new series of the popular compact ...

    Raspberry.Pi.Home.Automation.with.Arduino.2nd.Edition.178439

    Starting with an introduction to the Raspberry Pi and Arduino boards you will set up your very own home automation system through a series of exciting projects, making your life a lot easier. ...

    Raspberry Pi

    CHAPTER 1: INTRODUCTION TO RASPBERRY PI THE EVOLUTION OF RASPBERRY PI 2 THE UNIQUE FEATURES: MODEL A MODEL A+ MODEL B MODEL B+ SHOULD YOU BUY THE LATEST RASPBERRY PI 2, IF YOU HAVE PREVIOUS MODELS? ...

    ArchLinux for the Raspberry Pi:Raspberry Pi 1 / Zero的ArchLinux SD映像-开源

    Raspberry Pi的ArchLinux SD映像这是一个SD卡映像,适合在Windows下使用Win32DiskImager直接映像到SD卡。 ArchLinux停止为Raspberry Pi生成现成的SD映像,但仍在以下位置提供根文件结构的可下载tarball:...

    Raspberry Pi Cookbook.pdf

    Set up and manage your Raspberry Pi Connect the Pi to a network Work with its Linux-based operating system Use the Pi’s ready-made software Program Raspberry Pi with Python Control hardware through ...

    linux-为RaspberryPi3B构建ChromiumOS

    1. 一台Raspberry Pi 3B模型,包括电源和microSD卡。 2. 最新版本的Raspberry Pi Imager或Etcher工具,用于写入镜像文件。 3. 一个至少16GB的microSD卡,推荐32GB或更大,因为Chromium OS构建过程需要较大空间。 4. ...

    Raspberry Pi Supercomputing and Scientific Programming

    使用Raspberry Pi 进行这些活动可能会有局限性,因为它们的处理能力并不足以匹敌真正的超级计算机,但是通过使用多个 Raspberry Pi 组成集群,可以实现并行计算来提高处理速度。Raspberry Pi 集群可以执行一些计算...

    Raspberry Pi User Guide-Halfacree-Gareth

    《Raspberry Pi 用户指南》由 Gareth Halfacree 编写,是 Raspberry Pi 开发者和爱好者的宝贵资源。本文将深入解析此书的关键知识点,帮助读者更好地理解和掌握 Raspberry Pi 的功能与应用。 ### 一、Raspberry Pi ...

    Raspberry.Pi.User.Guide.4th.Edition.1119264367

    Chapter 1: Meet the Raspberry Pi Chapter 2: Getting Started with the Raspberry Pi Chapter 3: Linux System Administration Chapter 4: Troubleshooting Chapter 5: Network Configuration Chapter 6: The ...

Global site tag (gtag.js) - Google Analytics