推荐直接使用树莓派提供的工具,执行 raspi-config,然后选择第一项,提示选择 OK ,最终 Finish 即可。
使用 分区工具
查看分区及起始参数
1 2 3 4 5 6
# 进入fdisk fdisk /dev/mmcblk0 # 按 P 显示分区信息,并记录 Type 为Linux的分区起始柱面(122880),打印如下: Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 122879 114688 56M c W95 FAT32 (LBA) /dev/mmcblk0p2 122880 8447999 8325120 4G 83 Linux
删除 主分区(Linux分区)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# 按D 并选择删除分区2,再按P 查看分区信息,打印如下: Command (m forhelp): d Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m forhelp): p Disk /dev/mmcblk0: 28.8 GiB, 30908350464 bytes, 60367872 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xba2edfb9
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 122879 114688 56M c W95 FAT32 (LBA)
增加新分区
1 2 3 4 5 6 7 8 9 10 11
# 按N 执行新建分区,再按P 选择增加主分区,并输入起始柱面(122880),打印如下: Command (m forhelp): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 2 First sector (2048-60367871, default 2048): 122880 Last sector, +sectors or +size{K,M,G,T,P} (122880-60367871, default 60367871):
Created a new partition 2 of type'Linux' and of size 28.7 GiB.
# 首先按P 查看一下,确认分区增加无误,然后按W 执行分区操作,打印如下: Command (m forhelp): p Disk /dev/mmcblk0: 28.8 GiB, 30908350464 bytes, 60367872 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xba2edfb9
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 122879 114688 56M c W95 FAT32 (LBA) /dev/mmcblk0p2 122880 60367871 60244992 28.7G 83 Linux
Command (m forhelp): w The partition table has been altered. # 此处说明 设备忙碌,新的分区表将在下次重启生效 Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib
############################### ## nexus-2.11.4-01/bin/nexus ## ############################### # # Set the JVM executable # (modify this to absolute path if you need a Java that is not on the OS path) # 配置 jdk中 java 可执行文件的位置(其实我感觉jre就可以,没测试,有兴趣的测试一下) wrapper.java.command=/usr/local/java/jdk1.7.0_79/bin/java
1 2 3 4 5 6 7
############################################## ## nexus-2.11.4-01/bin/jsw/conf/wrapper.con ## ############################################## # # Set this to the root of the Nexus installation # 设置 nexus 主目录,就是解压后的那个 nexus目录绝对路径 NEXUS_HOME="/usr/local/java/nexus-2.11.4-01"