CORESERVER

Top / CORESERVER

ܼ


SSH ³ΤΥۥϿư

Ϥ

CORESERVER¤鰦ѤƤɡSSH ǤĤʤˤϥۥȾϿɬܡ̾ Web ̤ԤΤʤɡ椬ȤưŪ IP ĶʤΤǰϿƤΤʤ IP Ѥä㤦⤷ʤssh ˤϿʤΤݤ

ʤ櫓ǡץȤǥۥȾϿư롣μפϤääơõХץȤΤΤϤʸžäƤ뤫顢ҼڤФ롣

ȤߤñǡCORESERVER δ CGI ˡ桼̾ȥѥɤϿ IP ɥ쥹 GET ꤲCGI ˤ HTTPS ǥΤǡGET Υѥ᥿Ź沽롣CORESERVER ¦ HTTPD ΥˤʿʸǻĤꤽʵϤ뤱ɡϤޤ뤷ʤ

ǡ python ȤͳǤ򤪼ڤꤷ

ȥȤƤ print ʸΥȤ򳰤з̲̤ HTML 롣ǡ١ϿޤߤʸФƤܻǷ̤ǧȤʤɤˡʸΤ iconv ˤ뤳ȡ

  • ѥפ iconv Ϥ-f ʸɡ-t ʸɡ
     python hoge.py | iconv -f CP932 -t utf8
    

ȤäΤץ˽񤯥ѥɤϡValue Domain ΥѥǤϤʤ̤ǧǤ FTP ³ΤΤǤȤȤ

ȤϤ𥵡Ф cron Ͽнꡣ


SSH ³ǧڤˤ

Ϥ

ơSSH ³ɬפʥۥȾϿ򽪤Ȥ롣 SSH ǤĤʤȤȡλǧڤǻȤѥɤˤä FTP ΤƱġƥǻꤵʸʤΤǡФʤϤΤϤȤƤݡ

ʤ櫓ǡǧڤ򤹤롣

  1. 饤¦
    • Ĥ
       ssh-keygen
       # ѥե졼ϤäƤʤƤ⡣Ǥդʸɤ
      
  2. ž
    • ~/.ssh/id_dsa.pub scp Ȥ sftp Ȥǥ¦
       scp ~/.ssh/id_dsa.pub hoge@mxx.coreserver.jp:.
      
  3. ¦
    • CORESERVER SSH ǥ󤹤ʥѥǧڤǤ͡
    • Ͽ
       mkdir ~/.ssh
       chmod 700 ~/.ssh
       cat ~/id_dsa.pub >> ~/.ssh/authorized_keys
      

ǽλ

ϼ𥵡Ф CORESERVER ؤ SSH ʬǧڲĤä CORESERVER ϿǤСWindows ۥȤʤɤϿϤǤ롣


CORESERVER Υե𥵡Ф˼ưХååפ

Ϥ

䡢٤Ĥˤ͡CORESERVER ѤƤʤȤ櫓ǤϤʤǤ衣

Хååפե tar.gz ǸǤơ𥵡Ф scp Ĥ뤳Ȥͤ롣ĤǤ˥᡼褦ˤ롣

  1. CORESERVER 鼫𥵡Ф˸ǧڤǥѥե졼ʤǥǤ褦ˤ
    • μΥФȥ饤ȤδطդˤΤɤ
  2. ƤȤ˥ץȤĤ
    #!/bin/sh
    
    spath=/virtual/hoge/public_html
    sname=wiki.kurokobo.com
    tfile=$sname.$(date '+%Y%m%d-%H%M%S').tar.gz
    tsite=hoge@fuga.jp
    tpath=./Backup/coreserver
    addr=hoge@gmail.com
    
    cd $spath
    tar zcf $tfile $sname
    
    scp $tfile $tsite:$tpath 1>/dev/null 2>&1
    
    echo "$(date) : $tfile" | mail $addr -s "Message from Coreserver: Auto Backup Script"
    
    rm -rf $tfile
    
    • ~/public_html/wiki.kurokobo.com ΥХååפ
  3. cron Dz
    0 4 * * * /bin/sh /virtual/hoge/cron/backup.sh 1>/dev/null 2>&1
    

Last-modified: 2011-10-17 () 20:11:10 (2532d)