日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

花生壳 Linux arm

發布時間:2023/12/10 linux 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 花生壳 Linux arm 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝和使用Linux花生殼服務

一、安裝說明(以CentOS 5為例)

1、安裝必要的開發包

[root@localhost ~]# yum install gcc gcc-c++ autoconf automake

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

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

3、解壓所有文件

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

4、進入目錄并編譯

[root@localhost ~]# cd phddns-2.0.2.16556
[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

phlinux started as daemon!

[root@localhost ~]# tail /var/log/phddns.log

2011/08/02 11:28:58.256| ExecuteUpdate OK, BeginKeepAlive!

2011/08/02 11:29:59.354| SendKeepAlive() 8208

2011/08/02 11:30:00.355| RecvKeepaliveResponse() Data comes, OPCODE:8272

2011/08/02 11:30:00.356| Keepalive response received, client ip: 116.231.123.96

2011/08/02 11:31:00.447| SendKeepAlive() 8208

2011/08/02 11:31:01.450| RecvKeepaliveResponse() Data comes, OPCODE:8272

2011/08/02 11:31:01.450| Keepalive response received, client ip: 116.231.123.96

  •  

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

二、Linux花生殼本命令行參數說明

[root@localhost ~]# /usr/bin/phlinux -h

Peanuthull Linux-core 2.0 by oray.com, copyright 2011

Peanuthull Linux-core Help

--first-run

-f, run for the first time

用于首次啟動時配置參數

--interact

-i, run as interactive mode

program will request for necessary parameters.

this mode will automatically enabled at first running,

or your configuration file has been lost.

啟動交互模式

--daemon

-d, run as a daemon

program will quit after put itself to background,

and continue running even you logout,

you can use kill -9?to terminate.

后臺模式

--config

-c, run with configuration file

program will run with the file

指定使用哪一個配置文件

--user

-u, run as the user

program will run as the user

以指定用戶啟動后臺進程

--help

-h, print this screen.

Please visit?http://www.oray.com?for detail.

  •  

三、常見問題

如何手動修改登陸的用戶名及密碼?

您可以直接編輯/etc/phlinux.conf文件,對登陸用戶名及密碼進行修改。

花生殼日志保存路徑

/var/log/phddns.log

為什么花生殼無法登陸?

花生殼使用的通信端口是TCP:6060和UDP:6060(方向:OUT),請確認防火墻沒有把這幾個通信端口封掉。

如何查看花生殼當前運行狀態?

查看日志:

[root@localhost ~]# tail /var/log/phddns.log

2011/08/02 11:28:58.256| ExecuteUpdate OK, BeginKeepAlive!

2011/08/02 11:29:59.354| SendKeepAlive() 8208

2011/08/02 11:30:00.355| RecvKeepaliveResponse() Data comes, OPCODE:8272

2011/08/02 11:30:00.356| Keepalive response received, client ip: 116.231.123.96

2011/08/02 11:31:00.447| SendKeepAlive() 8208

2011/08/02 11:31:01.450| RecvKeepaliveResponse() Data comes, OPCODE:8272

2011/08/02 11:31:01.450| Keepalive response received, client ip: 116.231.123.96

如何在其他平臺(非X86)編譯運行?

交叉編譯mips cpu版本方法:

1、安裝交叉工具并配置環境

........

2、配置參數

./configure --host=i386-linux --target=mipsel-linux --build=mipsel-linux CXX=mipsel-linux-gcc CC=mipsel-linux-gcc LD=mipsel-linux-ld

3、make

4、最后靜態鏈接下

mipsel-linux-gcc -g -O2 -o phlinux -s main.o phupdate.o PHGlobal.o PHSocket.o md5.o log.o generate.o coder.o blowfish.o bitstream.o base64.o ConvertUTF.o CCmdParser.o PhClient.o PhUpdater.o /opt/openwrt/mipsel-linux/lib/librt.a /opt/openwrt/mipsel-linux/lib/libstdc++.a //opt/openwrt/mipsel-linux/lib/libc.a

5、壓縮下(好放到路由器的小空間)

upx -o phlinux2 phlinux

總結

以上是生活随笔為你收集整理的花生壳 Linux arm的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。