Upload
kentaro-hatori
View
1.991
Download
9
Embed Size (px)
DESCRIPTION
Pogoplug mobile POGO-V4-A1-01でSDカードからArchLinuxを起動できるようにnandを書き換えるuBootをPogoplug自体にインストール/設定。SDカードにはArchLinuxとともにownCloud + nginx + sqliteをインストール/設定。
Citation preview
1
Pogoplug mobilePogoplug mobileででopen pogoopen pogoにに挑戦してみた挑戦してみた
20142014年年22月月1515日日
はとちゃん(羽鳥健太郎)はとちゃん(羽鳥健太郎)[email protected]@hatochan.dyndns.org
2
はじめに
● 最近は、会社などで資料をUSBメモリでお持ち帰りすることは禁止されている
● メールで送ろうと思っても画像を多用したプレゼン資料は大きすぎて送れない
● メジャーなパブリック・クラウドの利用も禁止されている
● DropBox、GoogleDrive、SkyDriveなどのパブリック・クラウドを利用したドライブ容量の無償はちょい不満
● プラベート・クラウドを利用したドライブってないのかなぁと探してみたら...
3
Pogoplug mobilePogoplug mobile
● USBUSBで外付けで外付けHDDHDDを接続してパブリッを接続してパブリック・クラウド化ク・クラウド化
● PogoPogoからもからも5GB5GBのの無償ドライブを提供無償ドライブを提供
● 川越ソフマップで川越ソフマップで7,9807,980円(現在は円(現在は5,9805,980円)なのに円)なのにAmazonAmazonではでは2,6502,650円円!!!!
4
Pogoplug mobilePogoplug mobilePOGO-V4-A1-01POGO-V4-A1-01
● ARMv5teARMv5te● Marvell Kirkwood Marvell Kirkwood
800MHz800MHz● RAMRAM::128MB128MB● NANDNAND::128MB128MB● Full SD x 1Full SD x 1● USB x 1USB x 1● Gigabit x 1Gigabit x 1
5
Open pogoOpen pogoに移行に移行
● ネットワークを接続して電源を入れて、ネットワークを接続して電源を入れて、PogoplugPogoplugサイトでアクティベイトするとサイトでアクティベイトするとすぐに利用可能すぐに利用可能
● ユーザレポートでは、使用頻度が増えるととユーザレポートでは、使用頻度が増えるとともに遅くなるという報告がもに遅くなるという報告が
● かならずかならずPogoplugPogoplugサイトがフロントエンドサイトがフロントエンドになるので、構造的問題がになるので、構造的問題が......
● しかも会社からアクセスできなくなったしかも会社からアクセスできなくなった● こうなったら、こうなったら、Pogoplug mobilePogoplug mobileををopen open
pogopogoに移行して触接利用できるようにに移行して触接利用できるように
6
Open pogoOpen pogoの移行手順の移行手順
1.1.PogoplugPogoplugサイトでサイトでsshsshの利用を可能にの利用を可能に
2.2.uBbootuBbootをインストールをインストール
3.3.uBbootuBboot環境の設定環境の設定
4.4.ArchLinuxArchLinuxのインストールのインストール
5.5.ArchLinuxArchLinuxの設定の設定
6.6.ownCloudownCloudのインストールのインストール
7.7.イントラネットでの利用イントラネットでの利用
8.8.インターネットでの利用インターネットでの利用
7
Pogpplug mobilePogpplug mobileででsshssh
1.1.my.pogoplug.commy.pogoplug.comにログインにログイン
2.2.右上の設定右上の設定&&アカウントアイコンをクリックアカウントアイコンをクリック
3.3.メニュータブを選択メニュータブを選択
4.4.このこのPogoplugPogoplug機器への機器へのSSHSSHアクセスを有アクセスを有効にする をチェック効にする をチェック
5.5.適当にパスワードを設定適当にパスワードを設定
6.6.Linux PogoplugLinux Pogoplugににrootrootででsshssh接続接続
8
Open pogoOpen pogo構成図構成図
システム領域Arch Linux
(KISS: Keep It Simple, Stupic)
データ領域IO DATA製外付HDD 2TB
9
この後の作業は通常のこの後の作業は通常のPogoplugPogoplugに戻れなくなるので要注意に戻れなくなるので要注意
10
uBootuBootのインストールのインストール
1.1.必要なファイルをダウンロード必要なファイルをダウンロード
SDSDブート用ブート用uBootuBoot
https://www.dropbox.com/sh/nwt2kbvethttps://www.dropbox.com/sh/nwt2kbvetvgvroo/sm-vgvroo/sm-hZ0B4jU/Kirkwood/uboot/Pogoplug4SerihZ0B4jU/Kirkwood/uboot/Pogoplug4Serieses::uboot.nandpogoV4-MMC-mtdparts-uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb.tar.gznoSATA.kwb.tar.gz
uBootuBoot環境設定環境設定
http://download.doozan.com/uboot/files/http://download.doozan.com/uboot/files/environment/uboot.environmentenvironment/uboot.environment
11
2.2.SBSBブート用ブート用uBootuBootを書き込みを書き込み
# flash_erase /dev/mtd0 0 4# flash_erase /dev/mtd0 0 4
Erase Total 4 UnitsErase Total 4 Units
Performing Flash Erase of length 131072 Performing Flash Erase of length 131072 at offset 0x60000 doneat offset 0x60000 done
# nandwrite /dev/mtd0 # nandwrite /dev/mtd0 uboot.nandpogoV4-MMC-mtdparts-uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb noSATA.kwb
Writing data to block 0 at offset 0x0Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000Writing data to block 3 at offset 0x60000
12
3.3.uBootuBoot環境設定を書き込み環境設定を書き込み
# /usr/sbin/flash_erase /dev/mtd0 # /usr/sbin/flash_erase /dev/mtd0 0xc0000 10xc0000 1
Erase Total 1 UnitsErase Total 1 Units
Performing Flash Erase of length 131072 Performing Flash Erase of length 131072 at offset 0xc0000 doneat offset 0xc0000 done
# /usr/sbin/nandwrite -s 786432 # /usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.environment /dev/mtd0 uboot.environment
Writing data to block 6 at offset 0xc0000Writing data to block 6 at offset 0xc0000
13
uBootuBoot環境の設定環境の設定
1.1.MTDMTDの調整の調整
# fw_setenv mtdparts # fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafboot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'e),112M(root)'
# fw_printenv mtdparts# fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:2M(u-mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafboot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)e),112M(root)
14
2.2.ncnc(ネットコンソール)の設定(ネットコンソール)の設定
# fw_setenv serverip 192.168.0.220# fw_setenv serverip 192.168.0.220
# fw_setenv ipaddr 192.168.0.230# fw_setenv ipaddr 192.168.0.230
# fw_setenv if_netconsole 'ping $serverip'# fw_setenv if_netconsole 'ping $serverip'
# fw_setenv start_netconsole 'setenv ncip # fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10 ; setenv stdin $serverip; setenv bootdelay 10 ; setenv stdin nc; setenv stdout nc; setenv stderr nc; nc; setenv stdout nc; setenv stderr nc; version;'version;'
# fw_setenv preboot 'run if_netconsole # fw_setenv preboot 'run if_netconsole start_netconsole'start_netconsole'
3.3.再起動して再起動してncncサーバサーバ(192.168.0.220)(192.168.0.220)からからPogoPogoのコンソールを表示のコンソールを表示
$ nc -l -u -p 6666 &$ nc -l -u -p 6666 &
$ nc -u 192.168.0.230 666$ nc -u 192.168.0.230 666
15
SDSDカードを挿入していないときの起動画面カードを挿入していないときの起動画面U-Boot 2011.12 (Apr 08 2012 - 19:03:41)U-Boot 2011.12 (Apr 08 2012 - 19:03:41)
Cloud Engines-Pogoplug v4/Mobile:MMC versionCloud Engines-Pogoplug v4/Mobile:MMC version
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 0 Hit any key to stop autoboot: 0
(Re)start USB...(Re)start USB...
USB: Register 10011 NbrPorts 1USB: Register 10011 NbrPorts 1
USB EHCI 1.00USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) foundscanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) foundscanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported** Block device usb 0 not supported
16
** Invalid boot device **** Invalid boot device **
incorrect device type in dataincorrect device type in data
Partition data not found!Partition data not found!
** Block device usb 0 not supported** Block device usb 0 not supported
(途中略)(途中略)
** Block device usb 0 not supported** Block device usb 0 not supported
Wrong Image Format for bootm commandWrong Image Format for bootm command
ERROR: can't get kernel image!ERROR: can't get kernel image!
stopping USB..stopping USB..
No MMC card foundNo MMC card found
No MMC card foundNo MMC card found
** Bad partition 1 **** Bad partition 1 **
** Bad partition 1 **** Bad partition 1 **
Wrong Image Format for bootm commandWrong Image Format for bootm command
ERROR: can't get kernel image!ERROR: can't get kernel image!
17
4.4.printenvprintenvででuBOOTuBOOT環境を確認環境を確認Pogov4> printenvPogov4> printenv
printenvprintenv
arcNumber=3960arcNumber=3960
baudrate=115200baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:2M(u-rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run mmc_bootcmdrun usb_bootcmd; usb stop; run mmc_bootcmd
bootdelay=10bootdelay=10
ceboardver=PPV4A1ceboardver=PPV4A1
console=ttyS0,115200console=ttyS0,115200
ethact=egiga0ethact=egiga0
ethaddr=00:25:31:05:8a:59ethaddr=00:25:31:05:8a:59
force_rescue=0force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi/rescueme.txt 1; then run rescue_bootcmd; fi
18
if_netconsole=ping $serveripif_netconsole=ping $serverip
ipaddr=192.168.0.230ipaddr=192.168.0.230
led_error=orange blinkingled_error=orange blinking
led_exit=green offled_exit=green off
led_init=green blinkingled_init=green blinking
machid=F78machid=F78
mainlineLinux=yesmainlineLinux=yes
mmc_boot=mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 mmc_boot=mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd ; then /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd ; then bootm 0x800000 0x1100000 ; else bootm 0x800000; fibootm 0x800000 0x1100000 ; else bootm 0x800000; fi
mmc_bootcmd=mmc init; mmc init; run mmc_set_bootargs; run mmc_bootcmd=mmc init; mmc init; run mmc_set_bootargs; run mmc_bootmmc_boot
mmc_root=/dev/mmcblk0p1mmc_root=/dev/mmcblk0p1
mmc_rootdelay=10mmc_rootdelay=10
mmc_rootfstype=ext3mmc_rootfstype=ext3
mmc_set_bootargs=setenv bootargs console=$console mmc_set_bootargs=setenv bootargs console=$console root=$mmc_root rootdelay=$mmc_rootdelay root=$mmc_root rootdelay=$mmc_rootdelay rootfstype=$mmc_rootfstype $mtdpartsrootfstype=$mmc_rootfstype $mtdparts
mtddevname=uImage2mtddevname=uImage2
mtddevnum=2mtddevnum=2
19
mtdids=nand0=orion_nandmtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
ncip=192.168.0.220ncip=192.168.0.220
partition=nand0,2partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb ; then go pogo_bootcmd=if fsload uboot-original-mtd0.kwb ; then go 0x800200; fi0x800200; fi
preboot=run if_netconsole start_netconsolepreboot=run if_netconsole start_netconsole
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000 ; rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000 ; bootm 0x800000; else run pogo_bootcmd; fibootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=0rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params$rescue_custom_params
serverip=192.168.0.220serverip=192.168.0.220
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=ncstderr=nc
stdin=ncstdin=nc
stdout=ncstdout=nc
20
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd ; then bootm 0x800000 ubifsload 0x1100000 /boot/uInitrd ; then bootm 0x800000 0x1100000; fi0x1100000; fi
ubifs_mtd=3ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params$ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd ; then bootm 0x800000 0x1100000 ; else 0x1100000 /boot/uInitrd ; then bootm 0x800000 0x1100000 ; else bootm 0x800000; fibootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_bootusb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1usb_device=0:1
usb_init=run usb_scanusb_init=run usb_scan
usb_root=/dev/sda1usb_root=/dev/sda1
usb_rootdelay=10usb_rootdelay=10
usb_rootfstype=ext3usb_rootfstype=ext3
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1 ; then usb_scan_done=1; echo $usb 0x800000 /boot/uImage 1 ; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; doneusb_root /dev/$dev; fi; done
21
usb_scan_1=usb=0:1 dev=sda1usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params$usb_custom_params
Environment size: 3252/131068 bytesEnvironment size: 3252/131068 bytes
22
5.5.setenvsetenvで環境変数を修正で環境変数を修正((記述方法は記述方法はfw_setenvfw_setenvと同じと同じ))
6.6.saveenvsaveenvで環境変数を保存で環境変数を保存
23
ArchLinuxArchLinuxのインストールのインストール
1.1.PogoplugPogoplug用用Arch LinuxArch Linuxをダウンロードをダウンロード
http://archlinuxarm.org/developers/downhttp://archlinuxarm.org/developers/downloadsloads::
ARMv5 Kirkwood platforms (3.1.10)ARMv5 Kirkwood platforms (3.1.10)
ArchLinuxARM-armv5te-latest.tar.gzArchLinuxARM-armv5te-latest.tar.gz
※ ※ 僕の場合、僕の場合、11月リリース版のネットワーク月リリース版のネットワークの不具合での不具合で33週間ほどハマったので注意週間ほどハマったので注意
24
2.2.SDSDカードにカードにArchLinuxArchLinuxを解凍を解凍
①①LinuxLinuxパーティションの設定パーティションの設定
# fdisk /dev/sdc# fdisk /dev/sdc
②②ext3ext3ファイルフォーマットファイルフォーマット
# mkfs.ext3 /dev/sdc1# mkfs.ext3 /dev/sdc1
③③SDSDカードをマウントカードをマウント
# mount /dev/sdc1 /mnt/sdc1# mount /dev/sdc1 /mnt/sdc1
④④ArchLinuxArchLinuxを解凍を解凍
# cd /mount/sdc1# cd /mount/sdc1
# tar xvfz # tar xvfz /home/hoge/Download/ArchLinuxARM-/home/hoge/Download/ArchLinuxARM-armv5te-latest.tar.gzarmv5te-latest.tar.gz
⑤⑤ラベルを書き込みラベルを書き込み
# e2label /dev/sdc1 rootfs# e2label /dev/sdc1 rootfs
25
ArchLinuxArchLinuxの設定の設定
1.1./etc/fstab/etc/fstabの設定の設定# # # /etc/fstab: static file system information# /etc/fstab: static file system information### <file system> <dir> <type> <options> <dump> <pass># <file system> <dir> <type> <options> <dump> <pass>LABEL=rootfs / ext3 rw,noatime 0 1LABEL=rootfs / ext3 rw,noatime 0 1
2.2./etc/netctl/eth0/etc/netctl/eth0ををstaticstaticに設定に設定Description='A basic dhcp ethernet connection 'Description='A basic dhcp ethernet connection 'Interface=eth0Interface=eth0Connection=ethernetConnection=ethernetIP=staticIP=staticAddress=('192.168.0.100/24')Address=('192.168.0.100/24')Gateway='192.168.0.1'Gateway='192.168.0.1'DNS=('202.224.32.1' '202.224.32.2')DNS=('202.224.32.1' '202.224.32.2')ExecUpPost='/usr/bin/ntpd -gq || true'ExecUpPost='/usr/bin/ntpd -gq || true'
26
ownCloudownCloudのインストールのインストール
1.1.ArchLinuxArchLinuxを最新にを最新に
# pacman -Syu# pacman -Syu
2.2.パッケージをインストールパッケージをインストール
# pacman -S owncloud# pacman -S owncloud
# pacman -S php php-fpm php-sqlite# pacman -S php php-fpm php-sqlite
# pacman -S sqlite3# pacman -S sqlite3
# pacman -S nginx# pacman -S nginx
3.3.Qui's techNOLOGY Blog Qui's techNOLOGY Blog を参考に設定を参考に設定
http://blog.qnology.com/2013/03/tutoriahttp://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.htmll-pogoplug-e02-with-arch-linux.html
27
#copy owncloud files#copy owncloud filescd /srv/httpcd /srv/httpcp -R /tmp/owncloud .cp -R /tmp/owncloud .
#update owner#update ownerchown http:http /srv/http/owncloud chown http:http /srv/http/owncloud chown http:http /srv/http/owncloud/configchown http:http /srv/http/owncloud/configchown http:http /srv/http/owncloud/appschown http:http /srv/http/owncloud/apps
#uncomment out required modules#uncomment out required modulessed -i 's^;extension=gd.so^extension=gd.so^' /etc/php/php.inised -i 's^;extension=gd.so^extension=gd.so^' /etc/php/php.inised -i 's^;extension=xmlrpc.so^extension=xmlrpc.so^' /etc/php/php.inised -i 's^;extension=xmlrpc.so^extension=xmlrpc.so^' /etc/php/php.inised -i 's^;extension=zip.so^extension=zip.so^' /etc/php/php.inised -i 's^;extension=zip.so^extension=zip.so^' /etc/php/php.inised -i 's^;extension=iconv.so^extension=iconv.so^' /etc/php/php.inised -i 's^;extension=iconv.so^extension=iconv.so^' /etc/php/php.inised -i 's^;extension=sqlite3.so^extension=sqlite3.so^' /etc/php/php.inised -i 's^;extension=sqlite3.so^extension=sqlite3.so^' /etc/php/php.inised -i 's^;extension=pdo_sqlite.so^extension=pdo_sqlite.so^' sed -i 's^;extension=pdo_sqlite.so^extension=pdo_sqlite.so^' /etc/php/php.ini/etc/php/php.ini
#Maximum execution time of each script, in seconds#Maximum execution time of each script, in secondssed -i 's^max_execution_time = 30^max_execution_time = 300^' sed -i 's^max_execution_time = 30^max_execution_time = 300^' /etc/php/php.ini/etc/php/php.ini
#Maximum amount of time each script may spend parsing request #Maximum amount of time each script may spend parsing request data.data.sed -i 's^max_input_time = 60^max_input_time = 600^' sed -i 's^max_input_time = 60^max_input_time = 600^' /etc/php/php.ini/etc/php/php.ini
28
#Maximum size of POST data that PHP will accept.#Maximum size of POST data that PHP will accept.sed -i 's^post_max_size = 8M^post_max_size = 400M^' sed -i 's^post_max_size = 8M^post_max_size = 400M^' /etc/php/php.ini/etc/php/php.ini
#Maximum amount of memory a script may consume#Maximum amount of memory a script may consumesed -i 's^memory_limit = 128M^memory_limit = 512M^' sed -i 's^memory_limit = 128M^memory_limit = 512M^' /etc/php/php.ini/etc/php/php.ini
#http://doc.owncloud.org/server/5.0/admin_manual/installation/inst#http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configurationallation_others.html#nginx-configuration
#backup config and download working nginx.conf#backup config and download working nginx.confcd /etc/nginx cd /etc/nginx mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.originalmv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.originalwget http://dl.dropbox.com/u/42238/pogoplug/nginx.confwget http://dl.dropbox.com/u/42238/pogoplug/nginx.conf
#Configure SSL#Configure SSL#http://wiki.nginx.org/HttpSslModule#http://wiki.nginx.org/HttpSslModule
#create folder to store certs#create folder to store certsmkdir -p /etc/nginx/certsmkdir -p /etc/nginx/certscd /etc/nginx/certscd /etc/nginx/certs
#Now create the server private key#Now create the server private key#you'll be asked for a passphrase#you'll be asked for a passphraseopenssl genrsa -des3 -out pogoplug.key 1024openssl genrsa -des3 -out pogoplug.key 1024
29
#Create the Certificate Signing Request (CSR):#Create the Certificate Signing Request (CSR):openssl req -new -key pogoplug.key -out pogoplug.csropenssl req -new -key pogoplug.key -out pogoplug.csr
#Remove the necessity of entering a passphrase #Remove the necessity of entering a passphrase #for starting up nginx with SSL using the above private key:#for starting up nginx with SSL using the above private key:cp pogoplug.key pogoplug.key.orgcp pogoplug.key pogoplug.key.org
openssl rsa -in pogoplug.key.org -out pogoplug.keyopenssl rsa -in pogoplug.key.org -out pogoplug.key
#sign the certificate using the above private key and CSR#sign the certificate using the above private key and CSRopenssl x509 -req -days 3650 -in pogoplug.csr -signkey openssl x509 -req -days 3650 -in pogoplug.csr -signkey pogoplug.key -out pogoplug.crtpogoplug.key -out pogoplug.crt
#start nginx and php-fpm#start nginx and php-fpmsystemctl start php-fpmsystemctl start php-fpmsystemctl start nginxsystemctl start nginx
#autostart nginx and php-fpm after reboot#autostart nginx and php-fpm after rebootsystemctl enable php-fpmsystemctl enable php-fpmsystemctl enable nginxsystemctl enable nginx
#Finish configuration via https://PogoPlugIPAddress/owncloud/ or #Finish configuration via https://PogoPlugIPAddress/owncloud/ or https://pogoplug/owncloudhttps://pogoplug/owncloud
30
参考文献参考文献
● SDSDブート用ブート用uBootuBootインストールインストール
http://forum.doozan.com/read.php?2,11663http://forum.doozan.com/read.php?2,11663
● ArchLinuxArchLinuxををSDSDブートブート
http://withdrawfrom.blogspot.jp/2013/06/pogohttp://withdrawfrom.blogspot.jp/2013/06/pogoplug-mobilesd-arch-linux.htmlplug-mobilesd-arch-linux.html
● ownCloudownCloudインストールインストール
http://blog.qnology.com/2013/03/tutorial-poghttp://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.htmloplug-e02-with-arch-linux.html
さらに不明な点は検索をしてヒントを見つけたが、そのさらに不明な点は検索をしてヒントを見つけたが、そのURLURLは失念は失念 ......。。
もし不明な点があったら、はとちゃんまで連絡をもし不明な点があったら、はとちゃんまで連絡を
31
今後の展開今後の展開
● 今回はここまで ヽ今回はここまで ヽ(^o^)(^o^)丿丿● あとはプロキシを動かして外だしにあとはプロキシを動かして外だしに● ArchLinuxArchLinuxが廃人向けということが発覚が廃人向けということが発覚● ファイルサーバは安定が第一ファイルサーバは安定が第一● ということでプラットフォームをということでプラットフォームをDebianDebianにに● まさかの横展開で来月につづくまさかの横展開で来月につづく