CENTOS Apache 2 + PHP 5.3 + Mysql5 installation (additional: for gallery3 prepare)
2011-03-04 17:51
429 查看
l
I
nstall apache, php,
mysql
>yum -y install httpd
php mysql mysql-server php-mysql
l
U
pgrade to php5.3
(a
bove command
just
install
s
php5.1
)
>rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-1.noarch.rpm
该命令会在
/etc/yum.repos.d/
folder
下生成一个
”webtatic.repo”
file
,作为其中一个
yum repo (
你可以通过命令
>yum repolist all
来查看你的
yum repo list
)
>yum --disablerepo=*
--enablerepo=webtatic update php
该命令是
disable
所有
repo
,然后只
enable
webtatic repo
,
and then
use yum to update php to version 5.3
l
install gd (version 2)
>yum --disablerepo=*
--enablerepo=webtatic install php-gd
Additional
Steps for gallery3
l
install php
“
mbstring
”
module
>yum --disablerepo=*
--enablerepo=webtatic install php-mbstring
l
install ffmpeg
1. C
reate a repo file for
DAG RPM repository
>vi
/etc/yum.repos.d/dag.repo
2. A
dd following codes to
dag.repo file
[dag]
name=DAG RPM Repository
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
3.
check if ffmpeg exists
>yum search ffmpeg
4. install ffmpeg
>yum install ffmpeg
if following error occurs:
Public key for
ffmpeg-libpostproc-0.6.1-1.el5.rf.i386.rpm is not installed
then run
>rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
run following again
>yum install ffmpeg
ffmpeg-devel ffmpeg-libpostproc
l
install ffmpeg-php
1. Download the
latestet ffmpeg-php from http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/
>wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download
2. Extract the archive
> tar -xjf
ffmpeg-php-X.x.x.tbz2
3.
>
cd ffmpeg-php-X.x.x/
4. >phpize
5. >./configure
6. >make
这时会出错:
....error
'PIX_FMT_RGBA32' undeclared...
解决方法:
Goto the the ffmpeg-php-0.x.0 directory and
edit the ffmpeg_frame.c file
>vi ffmpeg_frame.c
replace every instance
of
‘
PIX_FMT_RGBA32
′
with
‘
PIX_FMT_RGB32
′
in the file by executing
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
OR
replace “PIX_FMT_RGBA32
″
“PIX_FMT_RGB32
″
— ffmpeg_frame.c
Save the file and compile ‘ffmpeg-php’
again using the following steps
>make clean
>./configure
>make
7. >make install
Above installation will
copy
the ffmpeg.so module in php default module location.
8.
edit php.ini file to
enable ffmpeg-php support in it by using ffmpeg.so module.
>vi /etc/php.ini
and append following line
extension=ffmpeg.so
9.
Restart apache service
to take effect of php.ini
>/etc/init.d/httpd
restart
10.
Run following command
to ffmpeg module listing in php.
>
php -m | grep ffmpeg
You should be able to see ffmpeg module in
phpinfo() page.
Test it out using
ffmpeg -i videofilename.extension
For more about ffmpeg-php functions –
documentation
http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_movie.php
I
nstall apache, php,
mysql
>yum -y install httpd
php mysql mysql-server php-mysql
l
U
pgrade to php5.3
(a
bove command
just
install
s
php5.1
)
>rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-1.noarch.rpm
该命令会在
/etc/yum.repos.d/
folder
下生成一个
”webtatic.repo”
file
,作为其中一个
yum repo (
你可以通过命令
>yum repolist all
来查看你的
yum repo list
)
>yum --disablerepo=*
--enablerepo=webtatic update php
该命令是
disable
所有
repo
,然后只
enable
webtatic repo
,
and then
use yum to update php to version 5.3
l
install gd (version 2)
>yum --disablerepo=*
--enablerepo=webtatic install php-gd
Additional
Steps for gallery3
l
install php
“
mbstring
”
module
>yum --disablerepo=*
--enablerepo=webtatic install php-mbstring
l
install ffmpeg
1. C
reate a repo file for
DAG RPM repository
>vi
/etc/yum.repos.d/dag.repo
2. A
dd following codes to
dag.repo file
[dag]
name=DAG RPM Repository
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
3.
check if ffmpeg exists
>yum search ffmpeg
4. install ffmpeg
>yum install ffmpeg
if following error occurs:
Public key for
ffmpeg-libpostproc-0.6.1-1.el5.rf.i386.rpm is not installed
then run
>rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
run following again
>yum install ffmpeg
ffmpeg-devel ffmpeg-libpostproc
l
install ffmpeg-php
1. Download the
latestet ffmpeg-php from http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/
>wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download
2. Extract the archive
> tar -xjf
ffmpeg-php-X.x.x.tbz2
3.
>
cd ffmpeg-php-X.x.x/
4. >phpize
5. >./configure
6. >make
这时会出错:
....error
'PIX_FMT_RGBA32' undeclared...
解决方法:
Goto the the ffmpeg-php-0.x.0 directory and
edit the ffmpeg_frame.c file
>vi ffmpeg_frame.c
replace every instance
of
‘
PIX_FMT_RGBA32
′
with
‘
PIX_FMT_RGB32
′
in the file by executing
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
OR
replace “PIX_FMT_RGBA32
″
“PIX_FMT_RGB32
″
— ffmpeg_frame.c
Save the file and compile ‘ffmpeg-php’
again using the following steps
>make clean
>./configure
>make
7. >make install
Above installation will
copy
the ffmpeg.so module in php default module location.
8.
edit php.ini file to
enable ffmpeg-php support in it by using ffmpeg.so module.
>vi /etc/php.ini
and append following line
extension=ffmpeg.so
9.
Restart apache service
to take effect of php.ini
>/etc/init.d/httpd
restart
10.
Run following command
to ffmpeg module listing in php.
>
php -m | grep ffmpeg
You should be able to see ffmpeg module in
phpinfo() page.
Test it out using
ffmpeg -i videofilename.extension
For more about ffmpeg-php functions –
documentation
http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_movie.php
相关文章推荐
- CentOS 5.3上安装Apache+php+Mysql+phpMyAdmin
- CentOS 5.3上yum安装Apache+php+Mysql+phpMyAdmin
- Centos for php+mysql+apache
- CentOS 5.3上yum安装Apache+php+Mysql+phpMyAdmin
- CentOs5.3 安装apache+tomcat+php+mysql
- CentOS 5.5搭建Apache+PHP5.2x+MySQL5+Zend3(yum安装)
- centos 6.2 ubuntu 12.04 上安装apache(httpd2.4) nginx1.2 php5.3.10 mysql5.3
- CentOS 5.3上安装Apache+php+Mysql+phpMyAdmin
- 搭建Linux(centos5.3)+Apache2+Mysql5+Php5+zabbix1.8.5系统环境实现网络状况监控
- centOs5.3 安装apache+tomcat+php+mysql
- CentOS 5.3上用yum快速安装Apache+php+Mysql+phpMyAdmin
- CentOS5.3搭建LAMP(Linux, Apache, MySQL, PHP)Web服务器
- 【CentOS】Apache多虚拟主机多版本PHP(5.3+5.6+N)共存运行配置全过程
- CentOS 5.3上安装Apache+php+Mysql+phpMyAdmin
- 飞飞实验室:CentOS 5.3快速搭建Apache+PHP5+MySQL完美Web服务器(LAMP)
- linux服务器安装(centos5.3 apache php mysql)
- centOs5.3 安装apache+tomcat+php+mysql
- CentOS 5.3上安装Apache+php+Mysql+phpMyAdmin
- CentOS 5.3上yum安装Apache+php+Mysql+phpMyAdmin
- centos7源码安装apache+mysql+php搭建LAMP