Squeezebox Setup

Adding PHP dependancies

In order to use ajax enabled web apps with PHP you need to install PHP 5.2 or later.  Unfortunately as CentOS 5 is a couple of years old now it only comes with 5.1.6.   This means that we have to go a bit out of our way to upgrade.  The CentOS testing repo has 5.2.6 in it, but that has its issues (no mcrypt for starters), so I’ve chosen to use another third party repository.  If you aren’t going to use anything that needs 5.2 then don’t install this repository – the package names will in general still stand though.  To use RoundCube webmail you do need all this though – and Roundcube is probably the best webmail out there.  Anyway to install that repo do:

[root@tranquilpc ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
warning: /var/tmp/rpm-xfer.JE0sn2: Header V4 DSA signature: NOKEY, key ID 00f97f56
Preparing…                ########################################### [100%]
1:remi-release           ########################################### [100%]

Then there are a couple of base php dependencies – the GD libraries for graphics.  So lets install them next:

Next the gd graphics library:

[root@tranquilpc ~]# yum install gd gd-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.dedipower.com
* updates: mirrors.dedipower.com
* extras: mirrors.dedipower.com
* addons: mirrors.dedipower.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package gd-devel.i386 0:2.0.33-9.4.el5_1.1 set to be updated
--> Processing Dependency: freetype-devel for package: gd-devel
--> Processing Dependency: libjpeg-devel for package: gd-devel
--> Processing Dependency: libpng-devel for package: gd-devel
--> Processing Dependency: libXpm-devel for package: gd-devel
--> Processing Dependency: libX11-devel for package: gd-devel
--> Processing Dependency: zlib-devel for package: gd-devel
--> Processing Dependency: fontconfig-devel for package: gd-devel
---> Package gd.i386 0:2.0.33-9.4.el5_1.1 set to be updated
--> Processing Dependency: pkgconfig for package: gd
--> Processing Dependency: libXpm.so.4 for package: gd
--> Running transaction check
---> Package libX11-devel.i386 0:1.0.3-9.el5 set to be updated
--> Processing Dependency: xorg-x11-proto-devel >= 7.1-2 for package: libX11-devel
--> Processing Dependency: libXau-devel for package: libX11-devel
--> Processing Dependency: libXdmcp-devel for package: libX11-devel
---> Package libpng-devel.i386 2:1.2.10-7.1.el5_3.2 set to be updated
---> Package zlib-devel.i386 0:1.2.3-3 set to be updated
---> Package pkgconfig.i386 1:0.21-2.el5 set to be updated
---> Package libXpm-devel.i386 0:3.5.5-3 set to be updated
---> Package libjpeg-devel.i386 0:6b-37 set to be updated
---> Package fontconfig-devel.i386 0:2.4.1-7.el5 set to be updated
---> Package freetype-devel.i386 0:2.2.1-21.el5_3 set to be updated
---> Package libXpm.i386 0:3.5.5-3 set to be updated
--> Running transaction check
---> Package xorg-x11-proto-devel.i386 0:7.1-9.el5.centos set to be updated
--> Processing Dependency: mesa-libGL-devel for package: xorg-x11-proto-devel
---> Package libXdmcp-devel.i386 0:1.0.1-2.1 set to be updated
---> Package libXau-devel.i386 0:1.0.1-3.1 set to be updated
--> Running transaction check
---> Package mesa-libGL-devel.i386 0:6.5.1-7.7.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================
Package                                        Arch                           Version                                           Repository

Size
===================================================================================
Installing:
gd                                             i386                           2.0.33-9.4.el5_1.1                                base                157 k
gd-devel                                       i386                           2.0.33-9.4.el5_1.1                                base                97 k
Installing for dependencies:
fontconfig-devel                               i386                           2.4.1-7.el5                                       base                168 k
freetype-devel                                 i386                           2.2.1-21.el5_3                                    updates           146 k
libX11-devel                                   i386                           1.0.3-9.el5                                       base                666 k
libXau-devel                                   i386                           1.0.1-3.1                                         base                11 k
libXdmcp-devel                                 i386                           1.0.1-2.1                                         base              7.5 k
libXpm                                         i386                           3.5.5-3                                           base                45 k
libXpm-devel                                   i386                           3.5.5-3                                           base              31 k
libjpeg-devel                                  i386                           6b-37                                             base                105 k
libpng-devel                                   i386                           2:1.2.10-7.1.el5_3.2                              updates             181 k
mesa-libGL-devel                               i386                           6.5.1-7.7.el5                                     base                466 k
pkgconfig                                      i386                           1:0.21-2.el5                                      base                59 k
xorg-x11-proto-devel                           i386                           7.1-9.el5.centos                                  base                253 k
zlib-devel                                     i386                           1.2.3-3                                           base                101 k

Transaction Summary
============================================================================================
Install     15 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 2.4 M
Is this ok [y/N]:

The next thing is that MySQL needs an upgrade.  So lets install the new version first:

[root@tranquilpc ~]# yum --enablerepo=remi upgrade *mysql*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.dedipower.com
* updates: mirrors.dedipower.com
* remi: iut-info.univ-reims.fr
* extras: mirrors.dedipower.com
* addons: mirrors.dedipower.com
Setting up Upgrade Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i386 0:5.1.35-1.el5.remi set to be updated
--> Processing Dependency: mysql-libs = 5.1.35-1.el5.remi for package: mysql
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: mysql
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16) for package: mysql
--> Processing Dependency: libmysqlclient_r.so.16 for package: mysql
--> Processing Dependency: libmysqlclient.so.16 for package: mysql
--> Processing Dependency: libmysqlclient.so.15 for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15 for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: dovecot
--> Processing Dependency: libmysqlclient_r.so.15 for package: mediatomb
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mediatomb
---> Package mysql-server.i386 0:5.1.35-1.el5.remi set to be updated
--> Running transaction check
---> Package mysqlclient15.i386 0:5.0.67-1.el5.remi set to be updated
---> Package mysql-libs.i386 0:5.1.35-1.el5.remi set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================
Package                                     Arch                               Version                                         Repository

Size
==============================================================================================
Updating:
mysql                                       i386                               5.1.35-1.el5.remi                               remi                 17 M
mysql-server                                i386                               5.1.35-1.el5.remi                               remi                 11 M
Installing for dependencies:
mysql-libs                                  i386                               5.1.35-1.el5.remi                               remi                 2.1 M
mysqlclient15                               i386                               5.0.67-1.el5.remi                               remi                 1.3 M

Transaction Summary
================================================================================================
Install      2 Package(s)
Update       2 Package(s)
Remove       0 Package(s)

Total download size: 31 M
Is this ok [y/N]:

To actually upgrade the database you need to run two upgrade commands:

[root@tranquilpc ~]# mysql_upgrade --password=typeyourpasswordhere
[root@tranquilpc ~]# mysqlcheck --check-upgrade --fix-db-names --fix-table-names --all-databases --password=typeyourpasswordhere

The password is the root mysql password set when you installed mysql.  The first command will probably give lots of errors about tables needing to be repaired (or you can run mysqlcheck --all-databases --password=typeyourpasswordhere and see the errors again) like this:

error    : Table upgrade required. Please do "REPAIR TABLE 'albums'" or dump/reload to fix it!

The easiest way to do that is to dump and load the tables.  To do this do:

[root@tranquilpc ~]# cd
[root@tranquilpc ~]# mysqldump --all-databases --password=yourpasswordhere > dump.sql
[root@tranquilpc ~]# mysql --password=yourpasswordhere < dump.sql
[root@tranquilpc ~]# rm dump.sql
rm: remove regular file 'dump.sql'? y

This is dumping out all the databases to file, then reloading them in, then finally removing the file.  Now rechecking the database should show no errors:

[root@tranquilpc ~]# mysqlcheck --all-databases --password=yourpasswordhere
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log
Error    : You can't use locks with log tables.
status   : OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.slow_log
Error    : You can't use locks with log tables.
status   : OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
slimserver.albums                                  OK
slimserver.comments                                OK
slimserver.contributor_album                       OK
slimserver.contributor_track                       OK
slimserver.contributors                            OK
slimserver.dbix_migration                          OK
slimserver.genre_track                             OK
slimserver.genres                                  OK
slimserver.metainformation                         OK
slimserver.playlist_track                          OK
slimserver.pluginversion                           OK
slimserver.progress
note     : The storage engine for the table doesn't support check
slimserver.rescans                                 OK
slimserver.tracks                                  OK
slimserver.tracks_persistent                       OK
slimserver.unreadable_tracks                       OK
slimserver.years                                   OK

The next step is to install PHP 5.2.9 itself.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: