用花生殼和lighttpd在cubieboard a10上作了個服務器,呵呵

1)安裝花生殼
php

1、安裝必要的開發包linux



[root@localhost ~]# sudo apt-get install build-essential autoconf automake
服務器



2、下載phddns-2.0.2.16556.tar.gz到某一個目錄
ui



[root@localhost ~]# wget http://download.oray.com/peanuthull/phddns-2.0.2.16556.tar.gz
spa



3、解壓全部文件
.net



[root@localhost ~]# tar zxvf phddns-2.0.2.16556.tar.gz
日誌



4、進入目錄並編譯
server


[root@localhost ~]# cd phddns-2.0.2.16556dns

[root@localhost phddns-2.0.2.16556]# aclocal進程

[root@localhost phddns-2.0.2.16556]# autoconf

[root@localhost phddns-2.0.2.16556]# automake

[root@localhost phddns-2.0.2.16556]# ./configure

[root@localhost phddns-2.0.2.16556]# make

[root@localhost phddns-2.0.2.16556]# cd src

[root@localhost src]# ls -l phddns

-rwxr-xr-x 1 root root 80968 Aug 2 11:18 phddns



5、執行編譯好的程序並配置(默認使用/etc/phlinux.conf,若是不存在這個文件則自動進入交互配置)



[root@localhost src]# ./phddns

輸入服務器地址,如無特殊狀況可以使用默認值

Enter server address(press ENTER use phlinux3.oray.net):



輸入您的Oray賬號名稱

Enter your Oray account:



對應的Oray賬號密碼

Password:



選擇幫定的網卡,如無特殊,默認便可

Network interface(s):

eth0:192.168.141.18

lo:127.0.0.1

Choose one(default eth0):



選擇日誌保存到哪一個文件

Log to use(default /var/log/phddns.log):



保存配置文件,選擇yes則直接保存到/etc/phlinux.conf,輸入other能夠指定文件

Save to configuration file (/etc/phlinux.conf)?(yes/no/other):



接下來程序將已交互模式開始運行

192.168.141.18

NIC bind success

OnStatusChanged okConnecting

OnStatusChanged okDomainListed

OnDomainRegistered skyvense22.gicp.net

OnStatusChanged okDomainsRegistered

UserType: 0

看到上面這些就表示登陸成功,這個時候能夠按ctrl+c先退出程序




6
、將phddns拷貝到你但願的位置


[root@localhost src]# cp phddns /usr/bin/



7
、之後臺模式啓動花生殼並檢查運行狀況



[root@localhost ~]# /usr/bin/phddns -c /etc/phlinux.conf -d




8、退出花生殼



查看進程ID

[root@localhost ~]# ps -A | grep phddns

13731 ? 00:00:00 phlinux

讓後臺進程退出

[root@localhost ~]# kill -9 13731



9
、將花生殼加到系統啓動時運行


[root@localhost ~]# vi /etc/rc.local

在文件的末尾加上一行:/usr/bin/phddns -c /etc/phlinux.conf -d


2)安裝lighttpd
sudo apt-get install lighttpd

vi /etc/lighttpd/lighttpd.conf

加個端口爲80
加入:
server.port                = 80

server.modules = (
        "mod_access",
        "mod_alias",
        "mod_compress",
        "mod_redirect",
#       "mod_rewrite",
)

server.port                 = 80
server.document-root        = "/var/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"


3)把你的路由器映射到你的cubieboard的ip

一切ok  

個人服務器 dading105.gicp.net


原文做者:dading_105

原文連接:http://forum.cubietech.com/forum.php?mod=viewthread&tid=1652&extra=page%3D1

相關文章
相關標籤/搜索