fresh install but trying to duplicate an apache environment

Latest response

With my brand new server (RedHat 6.2), I think I have apache (apachectl -v == 2.2.5) already installed.  I am a bit confused as to whether httpd is the rpm or just a subset of apache.  I have a CD with apache-tomcat and apache-jasper rpm's.   Neither of those seem to be preinstalled (at least rpm -qa doesn't list them).  But I my problem is that apache looks to be installed at /var/www.  I'm trying to duplicate an existing apache webserver and need things at /usr/local/apache/htdocs/www.  I am new at this.  Should I uninstall and reinstall apache?  And what do I reinstall?  apache-tomcat? and is there some make install or ./configure that creates /usr/local/apache/htdocs/www (or whatever you want for the location with some variable definition perhaps).  Is there a location to go to with a nice set of step by step instructions?  Sorry but I'm really new to apache installs...

Responses

Please double check your "apachectl -v" output — there have been no apache 2.2.5 packages from Red Hat. For a RHEL6.2 system, I would expect to see 2.2.15.

 

The httpd binary RPM is a subset of Apache; it contains the bits necessary for regular web serving. The other binary RPMs built from the httpd source package are httpd-devel, httpd-tools, mod_ssl and httpd-debuginfo.

 

To my knowledge, we're not shipping RPMs named "apache-tomcat" or "apache-jasper"; at least, I'm not familiar with them.

 

You are correct that the httpd package defaults to using a directory structure under /var/www. In the long run, it will probably be more convenient for you to migrate to using that directory structure. In the short run, to mirror the environment you're duplicating which uses /usr/local/apache/... , it may be easier for you to use a DocumentRoot setting to serve out of that directory structure.

 

"make install" and "./configure" are commands associated with building code from a source tarball; they do not apply to binary packages.

 

/usr/local is reserved for use by you as the local system administrator. Other than an empty directory structure being provided by the "filesystem" RPM, it is not touched by Red Hat RPMs.

 

For documentation, a "yum install httpd-manual" should install the Apache httpd documentation locally. This documentation is also available from the upstream Apache httpd project, under http://httpd.apache.org/docs/2.2/ .

Sorry about the typo, yes it was 2.2.15.  I finally gave up trying to mirror what the other server had.  Right now, I am trying to use /var/www/html as my home page.  Seems there is no longer a need for the modules mod-mem-cache & mod-file-cache.  And is the ssl module installed differently?  When I was using the other server's config, it said it couldn't find mod-ssl so I did a yum install mod-ssl.  Then got past that point but then got the warning that it was already in /etc/httpd/conf.d/ssl.conf.  At this point I decided to give up creating the mirror setup. 

 

One thing, should I remove the mod-ssl I installed when I was getting errors starting httpd with the mirror config?  Also, I continually get the message from anything yum related "Unable to read consumer identity".  Should I worry about this?  Clean it up?  I found one article that said to remove the cache directory for yum, then yum clean all, and finally yum update. 

Apache isn't my specialty, but going by the upstream documentation, mod_mem_cache seems sort of obsoleted by mod_disk_cache. mod_file_cache I have no idea about, sorry.

 

Yes, "yum install mod_ssl" is the way to install mod_ssl. I suspect the warning you received was due to you having created/copied /etc/httpd/conf.d/ssl.conf beforehand already.

 

"Unable to read consumer identity" shouldn't be a cause for worry. Refer to yum commands fail with an error message for details on how to do away with it.

 

After following instructions in the link above, I still get the message.  I have the file /etc/yum/pluginconf.d/subscription-manager.conf with enabled=1.  I followed the steps that seemed to be saying that I was running both RHN Classic and Subscription Manager and should turn one off.  I chose RHN Classic.  Here's my output

 

[root@webservices2 rhn]# rm -f /etc/sysconfig/rhn/systemid
[root@webservices2 rhn]# rm -fr /var/cache/yum/*
[root@webservices2 rhn]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity

This machine has not been registered and therefore has
no access to security and other critical updates. Please
register using subscription-manager.

Cleaning repos:
Cleaning up Everything
[root@webservices2 rhn]# yum makecache
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity

This machine has not been registered and therefore has
no access to security and other critical updates. Please
register using subscription-manager.

Metadata Cache Created
 

went through and manually registered for subscription-manager, set my service-level (PREMIUM), and finally redid the rm -rf /var/cache/yum/*, yum clean all and yum makecache.  The error is gone.  However, I think I am needing to register which software repositories to use and I'm back to needing 328 updates...

[root@webservices2 rhn]# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.

Please use yum-config-manager to configure which software
repositories are used with Red Hat Subscription Management.

rhel-6-server-cf-tools-1-rpms                                 | 2.8 kB     00:00     
rhel-6-server-rhev-agent-rpms                                 | 2.8 kB     00:00     
rhel-6-server-rpms                                            | 3.7 kB     00:00     
repo id                       repo name                                        status
rhel-6-server-cf-tools-1-rpms Red Hat CloudForms Tools for RHEL 6 (RPMs)          26
rhel-6-server-rhev-agent-rpms Red Hat Enterprise Virtualization Agents for RHE    12
rhel-6-server-rpms            Red Hat Enterprise Linux 6 Server (RPMs)         8,667
repolist: 8,705
 

Hmm... I can't say I find yum-config-manager particularly friendly myself.

 

I'd double check the subscription manager status through subscription-manager-gui (System -> Administration -> Red Hat Subscription Manager) where you can see the products your system has access to. Next, I'd use gpk-repo (System -> Administration -> Add/Remove Software; System -> Software Sources) to configure the individual channels. After that, it's time for "yum check-update; yum upgrade" (or continue to use gpk-application (the Add/Remove Software GUI)).

 I can send screen shots, but System->Administration->Red Subscription Manager shows I have the product Red Hat Enterprise Server Premium with 1-2 Sockets (Up to 1 Guest) (L3 Service) Installed with subscription ending 10/31/2013.  I'm not sure what to do with Add/Remove Software; System->Software Sources.  Shows 3 check boxes for 3 rpms, cloudform tools, rhel 6, and virtualization agents.  Am I supposed to be doing something with this data?  There don't appear to be any action buttons other than show debug and development software sources.

gpk-repo (System -> Administration -> Add/Remove Software; System -> Software Sources) is used to enable or disable the repositories that your entitlements give you access to. For example, it is where you can enable the use of the Optional and Supplementary channels as well as add-on products like the Load Balancer add-on or the Scalable Filesystem add-on.

 

In all likeliness, you don't need to make changes here, but as it these settings control what repositories are available (and hence, what updates can be installed) it is a good idea to double check that these settings are set appropriately for your system.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.