2015年10月

CentOS7安装备忘

进入图形界面

sudo systemctl isolate graphical.target

开机进入Xfce

sudo systemctl set-default graphical.target

Docker Image 重命名

docker tag repository/centos:latest centos:latest

安装日文环境

yum install -y ibus-kkc vlgothic-*
localectl set-locale LANG=ja_JP.UTF-8
source /etc/locale.conf
echo $LANG

vi ~/.bash_profile
最終行に追記

LANG=ja_JP.UTF-8
export LANG

source ~/.bash_profile
echo $LANG

突然无法发声

alsactl init

升级nginx到1.8

vim /etc/yum.repos.d/nginx.repo

  # nginx.repo
  [nginx]
  name=nginx repo
  baseurl=http://nginx.org/packages/centos/7/$basearch/
  gpgcheck=0
  enabled=1

yum update nginx

下载淘宝视频

确定视频的分享地址

http://cloud.video.taobao.com/play/u/{uid}/e/1/t/1/p/1/{vid}.swf

获取视频的分段信息

http://cloud.video.taobao.com/videoapi/info.php?vid={vid}

返回xml中提取

  1. (视频地址) video_url
  2. (视频类型) type
  3. (初始位置) init_len
  4. (传输速率) bitrate
  5. (视频长度) length

从video_url中提取id

拼装请求(<20971519)

http://vodcdn.video.taobao.com/oss/ali-video/{id}.flv/start_0/end_{length-1}/1.flv