使用Pidora

Version: Pidora-2014-R3

The default userid/password for pidora is: root/raspberrypi 
Ref: http://www.raspberrypi.org/forums/viewtopic.php?f=51&t=96411

To enable Headless Mode, create a file named "headless" inside the boot file system on the Raspberry Pi's SD card. Create this "headless" file before you boot your Raspberry Pi.

If "RESIZE" is in the "headless" file, the root filesystem will be expanded to the maximum size of the sd card via the service rootfs-resize. If "SWAP"(requires the value in megabytes) exists in the "headless" file, a swap file will be created of the specified size, and then activated.
例:
IPADDR=192.168.1.105
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1= 192.168.1.1
RESIZE

SWAP=512

注:
headless文件中,配置了IPADDR, NETMASK, GATEWAY, DNS1无效果,IP依然是DHCP分配的。
只能通过路由查Pidora的IP,登陆后再修改为静态IP。
但修改静态IP后,必须删除headless文件,否则重启后IP还是会由DHCP分配。

配置静态IP
[ root@pidora ~]#  vi /etc/sysconfig/network-scripts/ifcfg-eth0 
修改前
DEVICE=eth0 
BOOTPROTO=dhcp
ONBOOT=yes 
NM_CONTROLLED=yes 

修改后
DEVICE=eth0 
BOOTPROTO=static 
IPADDR=192.168.199.101 
NETMASK=255.255.255.0 
GATEWAY=192.168.199.1 
DNS1=192.168.199.1 
ONBOOT=yes 
NM_CONTROLLED=yes 

service network restart
/etc/init.d/network restart
reboot  <- 重启之前,务必 删除headless文件


fedora18以上 关闭防火墙

systemctl stop firewalld.service // 关闭
systemctl disable firewalld.service // 开机不启动



使用ifconfig
# yum install net-tools


查看IP其他方法
# pifconfig
# ip addr show

试试Linux下的ip命令,ifconfig已经过时了
http://linux.cn/article-3144-1.html



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值