LAMP

YDL running on the Sony Playstation 3

Moderator: billb

LAMP

Postby Quarternari » 08 Jan 2010, 00:42

Anyone know some good guides for installing Apache, PHP and MYSQL?
Or whether there is an easy way of installing PHP 5.3.x for apache and mysql?

Prefably the latest version of PHP 5.3.x since I need a php version higher than 5.2.x to run Zend Framework.

Most guides I see are using PHP 4.x which comes with mysql preconfigured with php?

I would use the distribution with YDL 6.2 but the php is only 5.1.6

Thanks in advance for any help.

Quarternari.
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Re: LAMP

Postby ppietro » 08 Jan 2010, 02:49

Quarternari wrote:Anyone know some good guides for installing Apache, PHP and MYSQL?
Or whether there is an easy way of installing PHP 5.3.x for apache and mysql?

Prefably the latest version of PHP 5.3.x since I need a php version higher than 5.2.x to run Zend Framework.

Most guides I see are using PHP 4.x which comes with mysql preconfigured with php?

I would use the distribution with YDL 6.2 but the php is only 5.1.6

Thanks in advance for any help.

Quarternari.


I don't know the answer to your question - but I will point out that any user of Red Hat Enterprise Linux (or its derivatives, CentOS, Scientific Linux, etc.) will have the same issues you're raising with version numbers, since YDL is based on Red Hat Enterprise.

If you find a solution for Red Hat Enterprise, it should work for YDL - bearing in mind that actual code will need to be compiled (or possibly re-compiled) for YDL's PowerPC core, and not the Intel x86 core of RHEL.

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: LAMP

Postby billb » 08 Jan 2010, 05:09

The IUS Community Project (http://iuscommunity.org/) has some more recent versions available that may work for YDL since they're meant for Redhat/CentOS. See here for the SRPMS:

http://dl.iuscommunity.org/pub/ius/stab ... /repoview/
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: LAMP

Postby Quarternari » 08 Jan 2010, 05:57

Thanks both for your posts.

From my understanding, I need to find a PPC version of apache, php, and mysql install via YUM on the PS3?

As an alternative, can I build the three on the PS3 via terminal commands from the tar files?

Sorry if my questions sound really stupid, Ive only played a little with linux in general.
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Re: LAMP

Postby billb » 08 Jan 2010, 19:23

Quarternari wrote:From my understanding, I need to find a PPC version of apache, php, and mysql install via YUM on the PS3?


If you're OK with the versions available to YDL via the usual software repositories, then yes you'd install via yum or "Add/Remove Software." Since you mentioned you were looking for updated versions not yet available to YDL (or Redhat/CentOS) through official sources, I suggested the IUS Community Project as an alternative to building from source tarballs.

They don't appear to be offering PPC builds so yes, you'd have to build them yourself.


Keep this in mind:

http://iuscommunity.org/faq/
"IUS is recommended for users that absolutely need newer versions of specific software than RHEL can provide."


By updating to these versions you'd lose what support (if any) you'd get from the Fixstars/YDL team. Also, I'm not familiar with all the software involved and am not sure how much you'd need to rebuild for YDL after updating. I can help you get started rebuilding from SRPM packages if you like, though.
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: LAMP

Postby Quarternari » 09 Jan 2010, 02:02

Files from SRPMs are like downloading the source code tar files from apache/php/mysql?
Is there something I have to do other than ./configure and /make?

Or are these different again, in the sense that there is a specific source for each variation of a system, in this case PPC?
Then I assume from that, from the php site, if I used the source from there, would I have to do some code editing?
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Re: LAMP

Postby ppietro » 09 Jan 2010, 02:23

Quarternari wrote:Files from SRPMs are like downloading the source code tar files from apache/php/mysql?
Is there something I have to do other than ./configure and /make?


That is correct - they are source, but you don't use ./configure and make with these. Instead, SRPMS are used to generate RPMs for your system. They're "safer" than using standard builds, since the resultant RPM registers itself in your system for Add/Remove Software. Also - they include all the necessary patches and build "tweaks" for your OS.

SRPMs are usually processor independent. Generally, they will have the term "noarch" - no architecture - in the SRPMs title. It's easiest to use the SRPMs from the base distro - when I build Firefox, I use the CentOS SRPMs, since YDL is a translation of CentOS. You might need something newer though.

Building SRPMS isn't too difficult - you create a specific series of subfolders on your hard disc in a parent folder. I use a parent folder in my home directory called rpm for this, then you manually create the subfolders - in all caps - called BUILD, RPMS, SOURCES, SPECS, SRPMS underneath rpm.

After that, create a file called .rpmmacros in your home directory (i.e. nano ~/.rpmmacros) that tells RPM where to find your build tree. Mine looks like this:

Code: Select all
%_topdir /home/paulp/rpm


Then, download the SRPM wherever you like, and build it with this command:
setarch ppc32 rpmbuild --ppc --rebuild foo.src.rpm

Where foo.src.rpm is the name of the SRPM you downloaded.

We've found that you need the setarch ppc32 and --ppc arguments to correctly build for PowerPC.

After it finishes, you can just install it with rpm -ivh newrpm.rpm
where newrpm.rpm is the resultant name of the RPM that is created.

If you need to upgrade an existing RPM, use the rpm -Uvh newrpm.rpm command

You will need to be root user to install/upgrade the RPM. (i.e. use the su command to switch to root user before issuing the rpm -Uvh.)

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: LAMP

Postby billb » 09 Jan 2010, 04:17

ppietro wrote:SRPMs are usually processor independent. Generally, they will have the term "noarch" - no architecture - in the SRPMs title.


I don't think I've seen any SRPMs with "noarch" in the title, though I have seen sites which have certain SRPMs in a "noarch" directory because when built, they generate "noarch" RPM packages. An RPM package that only installs data files, or an application that's written entirely in an interpreted language like Python, would be titled as [package name]-[version]-[release].noarch.rpm. But the SRPM package used to create the RPM would just be [package name]-[version]-[release]-src.rpm.

For example, the yum SRPM is titled as: yum-3.2.0-1.ydl.2.src.rpm

And when you build it, this RPM is created: yum-3.2.0-1.ydl.2.noarch.rpm

yum is written in Python so there's no compiling for different architectures to be done.

If a SRPM is only meant for certain architectures then it will usually have an exclusivearch tag in the .spec file, but nothing to indicate that in the filename itself.
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: LAMP

Postby Quarternari » 09 Jan 2010, 05:12

Thanks for your posts, they really help.

One last question, which I know you guys may not 100% know the answer to, but will I have to build all the LAMP packages this way, or do you think the ydl apache and mysql distribution builds will be alright?
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Re: LAMP

Postby ppietro » 09 Jan 2010, 05:19

billb wrote:I don't think I've seen any SRPMs with "noarch" in the title, though I have seen sites which have certain SRPMs in a "noarch" directory because when built, they generate "noarch" RPM packages.


Upon reflection, that sounds right, billb - I think the SRPMs just have "src" in the title. Thanks for the catch! :D

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: LAMP

Postby billb » 09 Jan 2010, 05:35

Quarternari wrote:One last question, which I know you guys may not 100% know the answer to, but will I have to build all the LAMP packages this way, or do you think the ydl apache and mysql distribution builds will be alright?


The last time I recall this topic coming up I think the guys just used yum or Add/Remove Software to install everything -- see here:

viewtopic.php?f=29&t=5139&start=0

At least for the first time I'd just try to use the packages provided by Fixstars.
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: LAMP

Postby Quarternari » 09 Jan 2010, 08:38

Invaluable help, thank you guys.
I'll update the post when I get it all together.
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Re: LAMP

Postby Quarternari » 10 Jan 2010, 06:34

After executing this line;
setarch ppc32 rpmbuild --ppc --rebuild foo.src.rpm

I get some warnings "user mockbuild does not exist - using root"
and the same for group.
should I be concerned?
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Re: LAMP

Postby ppietro » 10 Jan 2010, 06:41

Quarternari wrote:After executing this line;
setarch ppc32 rpmbuild --ppc --rebuild foo.src.rpm

I get some warnings "user mockbuild does not exist - using root"
and the same for group.
should I be concerned?


No.

Cheers,
Paul

P.S. I hope you're not actually typing foo.src.rpm. You're not - are you? That's an example filename - you don't type that - you type the name of the src.rpm you're trying to build.
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: LAMP

Postby Quarternari » 10 Jan 2010, 12:31

Haha, of course not.
Im trying to build the php 5.3.1 php rpm.
So dont worry I got that part right :]

Im getting another problem;
although I cant remember the right error message, it was about an abnormal exit.
from /var/tmp/rpm

Would this be because I didnt create the .rpmmacros file correctly?
Quarternari
ydl newbie
ydl newbie
 
Posts: 12
Joined: 06 Jan 2010, 05:23

Next

Return to Playstation 3

Who is online

Users browsing this forum: No registered users and 65 guests