How to install lifebox on RedHat linux.
官方网站给的安装说明太简单了,而且还只是针对Fedora和Ubuntu的,太自动化了,很多细节地方都没有详细说明,关于lifebox的资料又挺少的,好像只有在几个英文的论坛里面稍微有提到一些,但是安装成功的又非常少,以至于我安装时想找个参照都找不到,不过还好,花了好大功夫终于安装成功了,不过暂时视频还无法播放,只能看到缩略图(解决中),先发到这里希望对喜欢lifebox的朋友有帮助~~~~我选择的在Redhat EL5.3下安装,所有的安装包基本上都是编译安装的,还有几个是rpm的包,有的根据自己的系统版本在安装光盘里面找的!直接下载,地址我都写上了!可以直接用!好了,不废话了,开始安装~~~
提示:安装过程中可能不会遇到一部分我写的问题,因为有的地方我把解决方法直接写到安装方法里了!
Apache、mysql安装请参照:http://gaoxingf.blog.51cto.com/612518/187953 ,有个改动的地方就是configure时的参数要添加上–enable-exif –enable-mbstring,不然后面弄相册时会出错!如下:
# ./configure –prefix=/usr/local/apache22 –enable-module=so –with-mpm=worker –enable-module=rewrite –enable-exif –enable-mbstring
PHP安装请参照:http://gaoxingf.blog.51cto.com/612518/187960 ,这个也是要把configure的参数改变一下,嘻嘻,我就偷懒引用了,因为我装这些东西都是在一台机器测试的,所以装完也没有删除!就直接用了!见谅~
改成# ./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache22/bin/apxs –with-mysql=/usr/local/mysql –enable-sockets 就是把不用的去掉一下,这样应该就可以了!
Install the required packages:
Install mediainfo
Version:mediainfo v0.7.9 or greater
Site:http://mediainfo.sourceforge.net/en/Download
#Download all 3 packages: libzen0 libmediainfo0, CLI
# wget http://downloads.sourceforge.net/zenlib/libzen0-0.4.3-1.i386.RHEL_5.rpm
# wget http://downloads.sourceforge.net/mediainfo/libmediainfo0-0.7.20-1.i386.RHEL_5.rpm
# wget http://downloads.sourceforge.net/mediainfo/mediainfo-0.7.20-1.i386.RHEL_5.rpm
# rpm -ivh libzen0-0.4.3-1.i386.RHEL_5.rpm
# rpm -ivh libmediainfo0-0.7.20-1.i386.RHEL_5.rpm
# rpm -ivh mediainfo-0.7.20-1.i386.RHEL_5.rpm
Install imagemagick
Version:imagemagick 6.3.7.9 or greater
Site: http://www.imagemagick.org/script/download.php
# wget ftp://ftp.fifi.org/pub/ImageMagick/ImageMagick-6.5.4-9.tar.gz
# tar zxvf ImageMagick-6.5.4-9.tar.gz
# cd ImageMagick-6.5.4-9
# ./configure
# make install
Install ufraw
Version:ufraw 0.13-1build2 or greater
Site: http://ufraw.sourceforge.net/Install.html
# wget http://jaist.dl.sourceforge.net/project/ufraw/ufraw/ufraw-0.15/ufraw-0.15.tar.gz
# tar zxvf ufraw-0.15.tar.gz
# cd ufraw-0.15
# ./configure
# make && make install
======ERROR=======================================================
如果出现下面这个错误信息,就到系统安装盘里找lcms的rpm包给装上就行了!或者到官网下载个装上也行!我是用的盘里面的rpm包,下载的tar包,安装完成后,还得设置PATH,比较麻烦。
checking for LCMS… configure: error: Package requirements (lcms) were not met:
# rpm -ivh lcms-1.15-1.2.2.i386.rpm
# rpm -ivh lcms-devel-1.15-1.2.2.i386.rpm
===================================================================
Enable video support
# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080907-2245.tar.bz2
# tar xvf x264-snapshot-20080907-2245.tar.bz2
# cd x264-snapshot-20080907-2245
# ./configure –disable-asm
# make
# make install
# wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
# tar zxvf faad2-2.7.tar.gz
# cd faad2-2.7
# ./configure
# make
# make check
# make install
# wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
# ./configure
# make
# make check
# make install
# wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
# tar zxvf xvidcore-1.2.2.tar.gz
# cd xvidcore/build/generic/
# ./configure
# make
# make install
Install lame-libs
# wget http://jaist.dl.sourceforge.net/project/lame/lame/3.98.2/lame-398-2.tar.gz
# cd lame-398-2
# ./configure
# make
# make install
Install ffmpeg with h264 support
# wget http://ffmpeg.org/releases/ffmpeg-checkout-snapshot.tar.bz2
# tar xvf ffmpeg-checkout-snapshot.tar.bz2
# cd ffmpeg-checkout-2009-08-10/
# ./configure
# make
# make install
# make tools/qt-faststart //Install qt-faststart
# cp tools/qt-faststart /usr/local/bin/qt-faststart
Configure the database创建数据库
# /usr/local/mysql/bin/mysql -u root –p
mysql> create database lifebox;
grant all on lifebox.* to root;
grant all on lifebox.* to root@localhost;
grant all on lifebox.* to lifeboxuser;
grant all on lifebox.* to lifeboxuser@localhost;
set password for lifeboxuser@localhost=password(‘lifeboxpw’);
Install lifebox安装Lifebox
# wget http://www.getlifebox.org/versions/lifebox-1.0.5.tar.gz
# tar zxvf lifebox-1.0.5.tar.gz
# mv lifebox-1.0.5 lifebox
# chmod -R 755 lifebox
# chown -R root:root lifebox
# mv lifebox /var/www/
# chmod -R 777 /var/www/lifebox/dump/*
# chmod -R 777 /var/www/lifebox/html/*
这里修改dump和html这两个目录的权限是因为一会setup安装配置的时候,需要往这几个目录创建配置文件和cache文件。Setup配置过程中,如果权限不够,页面会有提示,并给出需要修改的目录及命令!还满贴心的~~~哈哈~~~
Apache配置在httpd.conf中添加虚拟主机:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/lifebox/html
ServerName hostname //添写主机名或者域名
<Directory /var/www/lifebox/html>
Options FollowSymLinks
AllowOverride All
Allow from all //注意这句,官方网站的Ubuntu和Fedora安装方法里并没加这句,我开始也没加,但访问时apache提示目录没有权限~~~~所以我给加上了~~
</Directory>
</VirtualHost>
使用域名访问的话,要在C:\WINDOWS\system32\drivers\etc\hosts中添加一行:
例: 10.10.10.10 test.lifebox.com test
这个地方,太容易出错了,很多朋友安装到setup完成后,就安装不下去了,我在这也遇到了问题,就是点Launch Lifebox按钮后,打不开用户登录画面,而是不停的在setup画面循环!原因是apache编译安装时没有添加rewrite模块。
解决方法:
重新编译安装一下apache的rewrite模块后,终于看到了久韦的lifebox登录画面~~~哈哈~~~
下面开始setup吧,虚拟主机设置OK的话,直接用浏览器打开地址:http://hostname/ 就可以进入setup画面了!
Setup配置过程比较简单,基本上就是填写配置文件信息,完毕后,自动生成配置文件。配置过程中如果出现错误,页面会有提示!还满人性化的!按照提示做就可以了!篇幅太大了,我就不在这发图片了!
配置完毕后跳转到登录画面才是安装成功!