PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Nov 19, 2017 6:59 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Feb 19, 2015 5:14 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Hi,

I am about to try to install on a machine running CentOS 5 the following software and versions that were installed on my windows machine by Xampp (Apache 2.4.9, MySql 5.6.16, PHP 5.5.11, PhpMyAdmin 4.1.12). I am wondering if these versions will run on CentOS 5 or if I have to move them back to something along the line of (Apache 2.0, MySql 5.0, PHP 5.5.0, PhpMyAdmin 4.0.0). I said PHP version 5.5.0 since this version ensures that my "password_verify" command works. Normally I would do Google searches for "whatever system requirements" but it is not working. Is there an easy way to figure this out. I am pretty sure I am going to be running my starter VSP setup without any panel (pure bash and whatever else will fit that I need). Related to the above I was reading this page (2 pages in total) which uses yum to install everything.
https://www.howtoforge.com/installing-a ... s-5.3-lamp
At the end of the tutorial people responded and almost every single one said it worked perfectly (sounds good to me). However, is there any way to find out what versions are going to be installed or to control them when using yum?

I also need to learn about this comment I read on a forum.
Quote:
Something you should always do when installing from source is to use checkinstall. What does checkinstall do? It makes the installation and thus uninstillation much easier by using your systems package management syste. I twill be able to automatically generate an RPM or YUM package that can be uninstalled later by calling for example yum uninstall httpd
. However, the underlined when installing from source makes me question if this applies to an install that has been done with yum.

I am thinking doing an image of the XEN VPS might be wise with a practice run to return it before I install. I read that "In Linux everything is a file. So there is no need for an image here.". I assume this means I just FTP the whole thing out to my home windows machine and FTP it back (I would need to learn to do this). Someone said "I would suggest to use rsync to replicate your file systems.". Another mentioned vzdump but I am not sure if it works for XEN VPS running on CentOS 5.

Does anyone have any thoughts or suggestions for reading material that covers off these objectives and concerns,

Thanks,
John


Top
 Profile  
 
PostPosted: Thu Feb 19, 2015 5:26 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
CentOS 5 is old. Any reason you're targeting that? CentOS 7 is current.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Thu Feb 19, 2015 8:14 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13443
Location: New York, NY, US
Follow the instructions at that link for yum install mysql httpd php. Installing from source is only necessary if you need very fine-grained control of the configuration of those pieces of software. 99.9% of the time the packages are fine -- and much, much easier to maintain.

And yes, upgrade to CentOS 7.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 6:03 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Thanks guys. It will make things a lot easier for me. I will see what versions I get and adjust my PHP code if needed.

Quote:
CentOS 5 is old. Any reason you're targeting that? CentOS 7 is current.


The reason is basically all about "keeping start-up costs low" and paying for VSP hosting month by month is part of it so I can quickly upgrade to more recent or more costly services if my website becomes popular faster than expected (members will be paying for this where as I am paying for the current level and the next level maybe for as much as a year or two). It is cheaper than buying a book and you learn more because it is hands on with immediate application of what you learn. My next level of upgrade comes in with two VSP web host providers offering CentOS 6 (one offers both). I am not sure about CentOS 7.

So I guess I need to learn how one yum targets CentOS 5 and another targets CentOS 6 and another targets CentOS 7 so I can just do it when I need it rather than have to Google to figure it out under pressure. That is another reason to start at the lowest end possible. It will give me a few upgrade experiences during a time when membership is very low and the pressure is not so great (saving me having to spend time reading all those angry emails - LOL). In other words I will have an upgrade in place within 7 days rather than 4 weeks (less emails helping to make it faster too).


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 7:22 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
Yum works the same across all distributions that use it.
Syntax: [ Download ] [ Hide ]
$ yum search foo
$ yum install foo

etc. There's no real learning/upgrade curve there. Yum is yum. My more immediate concern would be the version of PHP you'll be stuck with. CentOS, I believe, shipped with 5.1 and later upgraded to 5.2. You may be able to find more recent versions, you may not. The big problem here, in addition to security issues (last release of 5.2 was four years ago), is that your code made just not work. Namespaces and closures weren't available until 5.3. Traits and short array syntax until 5.4. Additionally, I'd be a little concerned about a VPS offering CentOS 5. 6 is fine. 6.6 was released a few months ago. Anyway, just my two cents.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 8:28 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Thanks Celauran, I sent an email to the support people at my host company suggesting they upgrade to CentOS 6 (after I researched their VPS upgrade levels more closely finding they were all CentOS 5 and after my research told me all except one open source control panel package needed CentOS 6 to run). They thanked me for my suggestion. I was about to send them the link to this thread as supporting evidence for my earlier suggestion to them. So your suggestions may be very helpful not just to me but to others looking for a company that is very competitive in some ways but is not keeping up with the industry that well. For me it is a learn on the fly thing. I did not even know CentOS 6 and CentOS 7 existed until this week and I signed up for the service last Friday (Only a $11.24 USD one month investment so not a big loss and it makes you learn faster once you have paid it). I am probably well over 2000 Google searches this week - LOL. Your concerns about my PHP code not working has been my concern all along since even going back to PHP 5.4 causes one command to not work. For me to be able to afford the hosting companies that have VSP on CentOS 6, I need to enact some money saving Phone and Internet changes (Specifically dumping Bell internet for TechSavyy and dumping Bell/Rogers phone for Wind). I was going to delay this until I did the install and I saw how much of my PHP code broke. But after reading your response I may just do it much faster (like today). I was not going to point the domain name at my website until March 20th after testing it for at least a week (myself and 2 friends accessing it via the IP address to test it first). Never having a website before, I don't know how many people might discover it when it is out there only accessible by IP address. Even if 10 people find it over a month and the website is breaking like crazy due to a PHP 5.2 install maybe this is not good. It just occurred to me that even if I sign up with a CentOS 6 hosting company and I put my website out there tested on PHP 5.5.? it may break and I really have no way of doing a test at home unless I can roll back my home install to match it. Either that or I need to be able to get NetBeans out on the VSP so I can step the code. I was thinking I could download the database, test it at home, ship up the new pages or whatever and do it that way. Just another reason to try and get PHP 5.5.? up at the website. (thinking on the fly) Is there any way to bring PHP up to 5.5/? after a yum install of a lower version? I was trying before but I have yet to find the Yum param file to figure out how it points at the place where it gets its data for the install (most likely effecting the versions that are picked up). If I could find this and point it at a site that has a new version of PHP install which would still run on CentOS 5 that would be ideal (assuming PHP 5.5.? can run on CentOS 5).


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 9:34 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Finally found the yum param file location. Nice to have a good google hit now and then.
Google search: "change yum repository"
First Hit: https://www.google.ca/webhp?sourceid=ch ... repository
First line: The configuration file for yum and related utilities is located at /etc/yum.conf (more details in the paragraph)

So now maybe the xampp forum will be full of people who have just developed websites with the latest PHP versions asking the same question. "Where to I point yum at to get the latest PHP and will it run on CentOS 5.? under Xen VPS."


Last edited by bowlesj on Fri Feb 20, 2015 9:39 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 9:37 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
You generally don't. Your distro will handle that for you. As bug fixes and security patches come in, they will be updated in your distro's repository and available through yum. If you're stuck with a really old version of PHP due to CentOS, you can check out Rémi's repos.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 9:47 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Thanks Celauran, So do I understand this correctly? (reading the Remi FAQs now so that may answer these assuptions).
Assumption #1: "the repo takes care of the details of upgrades to PHP etc and some repos do it better than others so you can go into the yum configuration file (which I have not studied yet obviously) and change it to point to a different repo such as Remi's?"
Assumption #2: "The people at the repos are experts in the installs, they do the installs and they verify they work so they run yum in such a way as to put everything in the distribution so they can share the successful install with others via the yum utility."


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 10:12 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
CentOS especially values stability above all else. By the time a package makes its way into their repos, you can be sure it's tested and stable. The flip side to this is that CentOS packages do tend to be dated. Rémi tries to address that and does a brilliant job of it. All of PHP servers at the office use his repos and we haven't encountered any issues.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 10:27 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Thanks Celauran. Google really is amazing. After doing a quick review of the remi site FAQs I did this google search "change yum to Remi Repository" and the first hit was the remi guide below.
http://blog.famillecollet.com/pages/Config-en. Okay, so I will run the yum tutorial I mentioned in the first post, find the versions I get and if needed use remi. I think I have the command to uninstall first "yum uninstall whatever" (extracted from my very first post).


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 10:30 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
Syntax: [ Download ] [ Hide ]
$ yum remove packagename

Unless there's some aliasing I'm unaware of, uninstall won't work.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 3:43 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
If you are curious, I got the versions.
Quote:
PHP 5.1.6 (cli) (built: Nov 6 2014 12:25:33)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
=========================================
Server version: Apache/2.2.3
Server built: Sep 16 2014 11:29:05
===============================================
mysqladmin Ver 8.41 Distrib 5.0.95, for redhat-linux-gnu on i386
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version 5.0.95
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 2 hours 24 min 42 sec

Threads: 1 Questions: 11 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.001

So I guess I have to use "yum remove" to redo the php as you suggested Celauran. I won't bother installing PhpMyAdmin until I get a recent PHP.

Also the second mysql command to set the password would not work. It keeps rejecting it. Specifically this command
mysqladmin -u root -h host_name password “newpassword”
As you can see the MySql version information was given above and I had to enter the new password to get that information so it is working. I am not sure if not being able to enter the password on the second command is a big problem in my case.

All and all at least things are progressing. Time to call it a day until tomorrow,
John


Last edited by bowlesj on Fri Feb 20, 2015 4:12 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 4:10 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
Syntax: [ Download ] [ Hide ]
PHP 5.1.6
Server version 5.0.95

Oh yeah, you need to update that.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 4:13 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
A correction. I must have had a bad character in my phpinfo file. I deleted it and recreated it and now I get the proper PHP status page. So everything worked except that 2nd MySql password entry. Tomorrow I will upgrade the PHP version after a good nights sleep.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group