FMS安装
1. 修改密码
# passwd root
# ElighT2013-08-20
# ElighT2013-08-20
2. 系统升级
# yum update
3. 挂载数据盘
查看目前机器上有几块硬盘
# fdisk -l
显示有2块硬盘:
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00073f45
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 2611 20970496 83 Linux
Disk /dev/xvdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
用fdisk /dev/xvdb进行分区
# fdisk /dev/xvdb
输入m 可以得到帮助信息:
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
输入n 添加一个新的分区
n
出现
Command action:
e extended
p primary partition (1-4)
输入e为创建扩展分区,输入p为创建主分区,这里我们选择p
p
primary partition (1-4)
输入了1
First Cylinder(1-1014,default 1): 1//第一个主分区起始的磁盘块数,可以选择默认值
Last cylindet, +cylinders or +size{K,M,G} (1-13054, default 13053)
默认
这样我们就创建完一个分区,如果要创建更多分区可以照上面的步骤继续创建。所有分区创建完后用w保存分区。
Command (m for help): w
The partition table has been altered!
重启服务器:# reboot
可以用#fdisk -l 命令检查刚刚所建分区:
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00073f45
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 2611 20970496 83 Linux
Disk /dev/xvdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa13a731c
Device Boot Start End Blocks Id System
/dev/xvdb1 1 13054 104856223+ 83 Linux
对要挂载的分区进行格式化,用如下命令将新建的分区格式化为ext3
# mkfs -t ext3 -c /dev/xvdb1
挂载分区到opt目录
# mount /dev/xvdb /opt
用df命令进行查看
df -lh
出现下列信息:
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 20G 1.6G 18G 9% /
tmpfs 939M 0 939M 0% /dev/shm
/dev/xvdb 99G 188M 94G 1% /opt
为了在每次系统启动时自动挂载新分区,需要修改/etc/fstab文件来进行自动挂载
# vi /etc/fstab
在文件的末位加入如下一行:
/dev/xvdb1 /opt ext3 defaults 1 2
4. 安装httpd服务
# yum install httpd
开机自动启动httpd服务
# chkconfig httpd on
5. 安装FMS4.5.6
# yum install compat-libcap1
# cd tmp
从官网直接下载FlashMediaServer4.5_x64.tar.gz到tmp目录下:
# wget -c http://download.macromedia.com/pub/flashmediaserver/updates/4_5_6/Linux_Release_x64/FlashMediaServer4.5_x64.tar.gz
解压:
# gunzip FlashMediaServer4.5_x64.tar.gz
# tar -xf FlashMediaServer4.5_x64.tar
# rm -rf FlashMediaServer4.5_x64.tar
通过vi 修改3个文件:
# cd FMS_4_5_6_r5012
# vi adminserver
显示行号:Shift & :,输入set nu
32行后加:
cd_check "CentOS release 6" /etc/redhat-release centos-6-i686
95行后加:
centos-6-i686)
;;
# vi installFMS
显示行号:Shift & :,输入set nu
191行后加:
cd_check "CentOS release 6" /etc/redhat-release centos-6-i686
333行后加:
centos-6-i686)
;;
# vi server
显示行号:Shift & :,输入set nu
33行后加:
cd_check "CentOS release 6" /etc/redhat-release centos-6-i686
96行后加:
centos-6-i686)
;;
开始安装FMS
# ./installFMS
按Enter
按Ctrl + C跳过条款显示
是否同意条款:y
提示输入serial number:1462-5864-7783-6034-8316-3718
安装目录:默认([/opt/adobe/fms,按回车键)
管理员名称:elight.fms.admin
管理员密码:ZhuXuedong20130819
用户名:默认([fms])
用户组:默认([fms])
是否安装apache:n
服务端口:1935
管理端口:默认([1111],按回车键)
是否后台运行:默认([y],按回车键)
安装完成后是否启动AMS:默认([y],按回车键)
安装是否继续:y
安装成功:
The Adobe Flash Media Server installation is complete.
编辑httpd配置文件:
# vi /etc/httpd/conf/httpd.conf
276行去掉行首#:ServerName www.example.com:80
最后行后加:
Alias /media "/opt/adobe/fms/applications/vod/media"
保存并退出httpd.conf的编辑:
Esc -> Shift + : -> 输入x,回车
启动httpd服务:
service httpd start
访问:http://112.124.12.92/fms/可以看到FMS已经正常启动。
重启系统后访问:http://112.124.12.92/fms/,FMS可以正常启动。
页面的视频并未播放,但通过http://112.124.12.92/fms/swfs/adobedemoplayer_pc.swf?src=rtmp://112.124.12.92/vod/mp4:sample2_1000kbps.f4v可以播放。
标签:fms