LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-19-2011, 06:41 AM   #1
jtt89
LQ Newbie
 
Registered: Oct 2011
Posts: 17

Rep: Reputation: Disabled
Question Setting up LAMP on CentOS 6


I am following this tutorial,

http://www.howconfig.com/linux/how-t...ntos-6-server/

and I changed my hostname with the following commands

echo "HOSTNAME=myname.tld"
hostname "myname.tld"

I get myname when I enter hostname in the command line, but not with hostname -f (the result here is: hostname: Unknown host; I think this might be a problem)

Then when I try to run service httpd reload (after several other steps in the meantime listed on the page)
I get:

Reloading httpd: not reloading due to configuration syntax error
[FAILED]

I backed up /etc/httpd/conf/httpd.conf and reloaded it with the original version, but that does not make a difference.

Here is how my /etc/sysconfig/network looks:

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
HOSTNAME=myname.tld

(again, I run hostname "myname.tld" command, and hostname -f does not display it - thats what is different as refered to that tutorial)

Thanks for any help with this.

PS. Does it sound like a lot of headache to install LAMP on CentOS and get it to work with IE from Win7 thorugh Virtual Box?

Last edited by jtt89; 11-23-2011 at 05:15 PM.
 
Old 11-19-2011, 06:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you very clearly have been told there is a configuration error in httpd.conf yet have not shown us what is in it? How are we supposed to help you without enough information?
 
Old 11-19-2011, 06:48 AM   #3
jtt89
LQ Newbie
 
Registered: Oct 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
you very clearly have been told there is a configuration error in httpd.conf yet have not shown us what is in it? How are we supposed to help you without enough information?
I dont think it is this, because I backed it up before doing anything and then copied the original version to /etc/httpd/conf/httpd.conf; it asked me whether to overwrite and I said yes. After that service httpd reload gave me the same error. The only thing I did with it was to change:

#NameVirtualHost *:80

to

NameVirtualHost *:80

Last edited by jtt89; 11-19-2011 at 06:51 AM.
 
Old 11-19-2011, 06:58 AM   #4
jtt89
LQ Newbie
 
Registered: Oct 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
I am looking at something like this on another website (library.linode.com/lamp-guides/centos-6)

Update etc/hosts

File:/etc/hosts

127.0.0.1 localhost.localdomain localhost
12.34.56.78 plato.example.com plato

Does it mean that I need to have static ip from ISP?

Last edited by jtt89; 11-19-2011 at 07:00 AM.
 
Old 11-19-2011, 07:17 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
so you're saying apache is lying??

no, you don't need a static IP, but if you want to be remotely accessible you'll need some mechanism for managing IP changes and DNS, e.g. dyndns.
 
Old 11-20-2011, 03:59 AM   #6
jtt89
LQ Newbie
 
Registered: Oct 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
I checked again today and both hostname and hostname -f return myname.tld, which is good, at least according to the tutorial.
I also get a different error after service httpd start

Starting httpd: Syntax error on line 3 of /etc/httpd/conf.d/myname.com.conf:
<ServerAlias only used in <VirtualHost>
[FAILED]

I checked /etc/httpd/conf/httpd.conf and was not doing anything, but again, the only change that is present is

NameVirtualHost *:80

instead of:

#NameVirtualHost *:80

I guess I need to look into the entire <VirtualHost> section further...
Thanks.

Last edited by jtt89; 11-20-2011 at 04:07 AM.
 
Old 11-23-2011, 03:29 PM   #7
jtt89
LQ Newbie
 
Registered: Oct 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
I was able to conect Centos6 on Virtual Box to Windows (I am able to ping in both directions) with Host-only Adapter (for connection between the two) and NAT Adapter (to enable Linux on VB to connect to the Internet). I want to set up httpd, mysql and vsftpd servers and in the end easily connect to httpd from Windows based browser and ftp server with a Windows based client as well. I would also want to have access through SSH.

I have a general idea of the steps that are involved, but there is also a configuration that I am not sure about at this point. Lets say I follow these steps:

# yum install httpd
# yum install php php-pear php-mysql
# yum install mysql-server
# mysql_secure_installation
# yum install vsftpd
# yum install mod_ssl

Technically, I have everything installed, but what would be the next steps that I need to take (from the networking point of view, so to speak) to get it all working)?

I know I need to configure, at least Apache, and ftp server, but I am not sure how is it gonna work; like where am I gonna be uloading the sites (I know this can vary), how am I gonna know what address to use in a browser if I wanna go to a website x, y, z on that installation etc. This sounds like I need to do some kind of DNS setup and I am kind of stuck at this point.

If somebody could give me a general outline of what are the things that need to be done that would be great (I was looking at a lot of websites and I know about etc/sysconfig/network, httpd.config - not too much about it on Apache's site, hostname, hostname -f etc; but it is kind of hard to piece it all together at this point). I am gonna be looking at the books also, but they not always reflect the setup that I have too (VirtualBox).

Thank you.

Last edited by jtt89; 11-23-2011 at 06:51 PM.
 
  


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
[SOLVED] Setting up basic lamp server with CentOS 6, opinions for developer access? jraz Linux - Server 4 11-27-2011 08:42 AM
Centos LAMP + FTP thefoyer13 Linux - Newbie 5 03-13-2011 07:27 PM
How to configure network redundancy in LAMP (CentOS)? albie17 Linux - Newbie 2 01-19-2011 05:11 AM
My HOW-TO: LAMP on CentOS from Source (including Movies) utw-mephisto Linux - Newbie 13 04-09-2008 04:49 PM
Remote setup of LAMP server on CentOS 5 satimis Linux - Server 19 02-01-2008 12:42 AM


All times are GMT -5. The time now is 03:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration