2

We recently began developing an internal site using WordPress' latest available version, version 4.4. We had originally created the VM for this server using SLES 11 SP3, but found that this OS was too outdated to get the most up-to-date software to have WordPress work as expected. So we decided to switch to CentOS 7, the latest CentOS version available.

* EDIT: I actually just noticed that SLES 11 SP3 was release 10-23-2015, I guess I was thinking of 10 SP3, which is what we USED to use all the time... Maybe that SLES version was good and I just didn't have the right repos..?

We have the VM setup and CentOS 7 was installed using the DVD-ISO from CentOS' site.

I am used to SuSE's YaST Package Manager which made package management a breeze for the most part. But, now that it's CentOS, it looks like YUM is what I use for package management, which is a command line only tool...

The problem I am having now is that the recommended software for WordPress, which I found HERE --> https://wordpress.org/about/requirements/ says I should be using these versions of the following packages:

PHP 5.6 or greater
MySQL 5.6 or greater
The mod_rewrite Apache module

However, my CentOS install has the following versions of PHP, Apache and MySQL (*I'm also not sure how to view installed Apache Modules?):

# php --version
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

# mysql --version
mysql  Ver 15.1 Distrib 5.5.44-MariaDB, for Linux (x86_64) using readline 5.1

# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 19 2015 21:43:13

And since the "Application Installer" GUI program isn't really showing me anything other then non-essential programs, it's not very helpful.

Are there any CentOS repos that I can add to get those programs updated to the newest versions?

Any thoughts or suggestions would be greatly appreciated!

Thanks in Advance,
Matt

Matt
  • 413
  • 1
  • 10
  • 16
  • Did you succeed in updating your packages ? – SamyQc Jan 13 '16 at 02:29
  • 1
    I ended up switching back to the original VM that we had started using which was SLES 11 SP3. Didn't realize it at the time, but that 11.3 version was a lot newer then I previously thought. And I was able to find the requisite repos from SuSE's downloads site... – Matt Jan 14 '16 at 16:44
  • Perfect , glad everything worked out! – SamyQc Jan 14 '16 at 16:47

1 Answers1

1

Php

Source

# Update the repository package manager
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
# Remove last version (avoid conflicts)
yum remove php-common
# Install all the required components of version 5.6
yum install php56w
yum install php56w-mysql
yum install php56w-common
yum install php56w-pdo
yum install php56w-opcache

Apache

Source

For the apache rewrite module, first of all, check if it exists as a module

ls /etc/httpd/modules | grep mod_rewrite

if it outputs mod_rewrite.so , it's because the module exists. Next thing to do is to check if the module is loaded.

grep -i LoadModule /etc/httpd/conf/httpd.conf | grep rewrite

It should outputs something like this :

LoadModule rewrite_module modules/mod_rewrite.so

  • Means that the module is loaded

OR

#LoadModule rewrite_module modules/mod_rewrite.so

Means that the module is not loaded, edit /etc/httpd/conf/httpd.conf and remove the # at the beginning of the line. Then restart apache2 service:

sudo /sbin/service httpd restart

If the line does not exists, just add it in the httpd.conf file :

LoadModule rewrite_module modules/mod_rewrite.so

Last thing to do is to check if AllowOverride is activated. Type the following command :

grep -i AllowOverride /etc/httpd/conf/httpd.conf

If it outputs AllowOverride None , change it for AllowOverride All in the httpd.conf file (/etc/httpd/conf/httpd.conf)


Hope it helped :).

Community
  • 1
  • 1
SamyQc
  • 365
  • 2
  • 10