LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-17-2014, 07:52 PM   #1
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Rep: Reputation: 0
vhosts... what do I need to know to configure one on CentOS 6.2


I've got a clean install of CentOS 6.2 on a non production server and I want to make it into a web hosting server without the use of cPanel, Plesk, Virtualmin or the like. No GUI interfaces are to be used. I will configure eth1:1 with a static IP of 69.28.64.162 and I want to set up thelubberline.com as a test. ssh works in and out of the server and I can ping the world and the world can ping me. Life is good and about to get better.

I am thinking that I'll need to install mysql, php and apache for starters... or do I? This is a learning environment for me so feel free to give me how you would do it or point me to a tutorial on the subject. Please, don't waste my time by recommending any of the GUIs available to do this. My object is to learn how all this fits together.
 
Old 03-17-2014, 08:01 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Here are some good how to's

http://www.howtoforge.com/howtos/linux/centos

Id' focus on the "LAMP" stack since that's a baseline (Apache/Mysql/PHP)

--C
 
1 members found this post helpful.
Old 03-17-2014, 08:02 PM   #3
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
yum install mysql

and

yum install php

went well and pretty darn quickly. However, yum install apache did not! I might have to Google that one.
 
Old 03-17-2014, 08:05 PM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by NetDoc View Post
yum install mysql

and

yum install php

went well and pretty darn quickly. However, yum install apache did not! I might have to Google that one.
oh CentOS it's httpd

Take a look at those howtos...they provide a good step by step
 
Old 03-17-2014, 09:55 PM   #5
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
Apache was already installed. Now I just have to learn how to configure and use these three.
 
Old 03-19-2014, 06:20 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
See the manuals/howtos at www.linuxtopia.org
 
1 members found this post helpful.
Old 03-19-2014, 12:21 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647

Rep: Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655
the Vhost section in the "httpd.conf" is very VERY VERY well documented
the notes in the file DO take up 98% of the file size

and read the apache docs

php and mysql are not needed for a static html text page

also 6.2 is unsupported
Cent is ONLY supporting 6.5 in the 6 series
-- upgrade ASAP !!!!! --

the version used in cent is the older Apache 2.2
-- the vhosts section
http://httpd.apache.org/docs/2.2/vhosts/

But you only need to set it if you have MORE!!! than one web site on the SAME address and port ( 80)


PS.
i recomend that NEW to Apache users BUILD ans install FROM SOURCE !!!!
-- a 100% Manual install !!!!!
for the first 6 to 12 installs

that way YOU LEARN!!!!! where the config filse are and HOW to configure them
httpd.conf
my.conf
php.ini

and how to set the folder ownership
/var/www/html dose need to be owned by the user you made called "apache"

Last edited by John VV; 03-19-2014 at 12:23 PM.
 
Old 03-19-2014, 12:34 PM   #8
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by John VV View Post
the Vhost section in the "httpd.conf" is very VERY VERY well documented
the notes in the file DO take up 98% of the file size
Where is that file located?

Quote:
Originally Posted by John VV View Post
and read the apache docs
I did, but I did not understand all of them.

Quote:
Originally Posted by John VV View Post
also 6.2 is unsupported
Cent is ONLY supporting 6.5 in the 6 series
-- upgrade ASAP !!!!! --
I tried doing a yum update, but it failed. I'll try to do that again and suss out the error messages: there were three.

Quote:
Originally Posted by John VV View Post
PS.
i recomend that NEW to Apache users BUILD ans install FROM SOURCE !!!!
-- a 100% Manual install !!!!!
for the first 6 to 12 installs

that way YOU LEARN!!!!! where the config filse are and HOW to configure them
httpd.conf
my.conf
php.ini

and how to set the folder ownership
/var/www/html dose need to be owned by the user you made called "apache"
This is great stuff... I've always wondered how one builds/installs from source. It's all a part of the learning curve and I'm in learning mode at the moment.
 
Old 03-19-2014, 12:49 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647

Rep: Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655
well the FIRST order is to install the only supported version of CentOS 6

there are two ways to set cent up
1) auto UPGRADE to the NEXT version , and pray that a small change dose NOT kill a production server
( not much of a issue for home use )

2) manual upgrade to the next version after the upgrades are CHECKED !!!!! on a non production server

to see what version you are using
Code:
cat /etc/redhat-release

if 6.2 , then
Code:
su -
yum --releasever=6.5 upgrade
the software repos for 6.2,6.3,and 6.4 have all been removed from the mirrors
they do not exist . Except in the historical archive " the vault"

the cent wiki is a good start
http://wiki.centos.org/
Warning:
however with the release of CentOS 6.0 cent is now using the redhat documentation

https://access.redhat.com/site/docum...erprise_Linux/
 
Old 03-19-2014, 01:36 PM   #10
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
OK, I get these errors when I do a yum update:

Code:
Error: Package: matahari-host-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidclient.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidclient.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-service-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidcommon.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidcommon.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-agent-lib-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidclient.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidclient.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-network-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidcommon.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidcommon.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-host-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidcommon.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidcommon.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-sysconfig-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidclient.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidclient.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-sysconfig-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidcommon.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidcommon.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-service-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidclient.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidclient.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-agent-lib-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidcommon.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidcommon.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
Error: Package: matahari-network-0.4.4-11.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
           Requires: libqpidclient.so.5()(64bit)
           Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
               libqpidclient.so.5()(64bit)
           Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (base)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
 
Old 03-19-2014, 01:40 PM   #11
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
It actually suggested that I try yum update --skip-broken and that seems to be working. I'll know after the reboot.
 
Old 03-19-2014, 01:49 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647

Rep: Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655
(@anaconda-CentOS-201112091719.x86_64/6.2)

that is the INSTALL DVD
you do NOT want it in the dvd drive
nor do you want the "installmedia.repo" in the "/etc/yum.repos.d" folder

there was a ( now long fixed) bug that sometimes in the old versions would make a royally big mistake during install and place the install dvd AS a source for updates and to install software from

to see a full list of every software repo installed and if it is on or off
Code:
su -
yum repolist all
the install media NEEDS to not be there
not just off
but not there

see the wiki page on the software repos
http://wiki.centos.org/AdditionalResources/Repositories
 
Old 03-19-2014, 02:05 PM   #13
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
There is no permanently attached DVD drive to this server. I plug in a USB DVD driver to do that. The install DVD is currently sitting behind the monitor in the cabinet rack. I'll bring a 6.5 DVD the next time I go to Orlando and throw the other one out. It's a 4.5 hour drive to the data center, so I will continue to try to suss things out from here in Key Largo.
 
Old 03-19-2014, 02:20 PM   #14
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
That did it, and now I am on "CentOS release 6.5 (Final)"
 
Old 03-19-2014, 02:23 PM   #15
NetDoc
Member
 
Registered: Sep 2007
Posts: 50

Original Poster
Rep: Reputation: 0
Here is the output from that last command you gave me:

Code:
[root@beta pjmu]# yum repolist all
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: ftp.usf.edu
 * extras: mirror.cogentco.com
 * updates: centos.mirrors.tds.net
base                                                     | 3.7 kB     00:00
extras                                                   | 3.4 kB     00:00
updates                                                  | 3.4 kB     00:00
repo id                      repo name                            status
C6.0-base                    CentOS-6.0 - Base                    disabled
C6.0-centosplus              CentOS-6.0 - CentOSPlus              disabled
C6.0-contrib                 CentOS-6.0 - Contrib                 disabled
C6.0-extras                  CentOS-6.0 - Extras                  disabled
C6.0-updates                 CentOS-6.0 - Updates                 disabled
C6.1-base                    CentOS-6.1 - Base                    disabled
C6.1-centosplus              CentOS-6.1 - CentOSPlus              disabled
C6.1-contrib                 CentOS-6.1 - Contrib                 disabled
C6.1-extras                  CentOS-6.1 - Extras                  disabled
C6.1-updates                 CentOS-6.1 - Updates                 disabled
C6.2-base                    CentOS-6.2 - Base                    disabled
C6.2-centosplus              CentOS-6.2 - CentOSPlus              disabled
C6.2-contrib                 CentOS-6.2 - Contrib                 disabled
C6.2-extras                  CentOS-6.2 - Extras                  disabled
C6.2-updates                 CentOS-6.2 - Updates                 disabled
C6.3-base                    CentOS-6.3 - Base                    disabled
C6.3-centosplus              CentOS-6.3 - CentOSPlus              disabled
C6.3-contrib                 CentOS-6.3 - Contrib                 disabled
C6.3-extras                  CentOS-6.3 - Extras                  disabled
C6.3-updates                 CentOS-6.3 - Updates                 disabled
C6.4-base                    CentOS-6.4 - Base                    disabled
C6.4-centosplus              CentOS-6.4 - CentOSPlus              disabled
C6.4-contrib                 CentOS-6.4 - Contrib                 disabled
C6.4-extras                  CentOS-6.4 - Extras                  disabled
C6.4-updates                 CentOS-6.4 - Updates                 disabled
base                         CentOS-6 - Base                      enabled: 6,367
c6-media                     CentOS-6 - Media                     disabled
centosplus                   CentOS-6 - Plus                      disabled
contrib                      CentOS-6 - Contrib                   disabled
debug                        CentOS-6 - Debuginfo                 disabled
extras                       CentOS-6 - Extras                    enabled:    14
updates                      CentOS-6 - Updates                   enabled:   654
repolist: 7,035
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure two domain name in same OS(centos) unibox Linux - Server 13 02-15-2013 11:59 AM
how to configure internet on centos 5 hit99 Linux - Desktop 1 05-04-2012 02:02 AM
CentOS 5.2 Configure Audio mortonmorton Linux - Newbie 1 09-30-2009 07:00 PM
How do I configure vhosts? jim_fields Linux - Networking 2 03-21-2009 10:16 PM
How to Configure a CentOS Webserver Ascendancy5 Linux - Server 3 11-25-2008 07:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration