LinuxQuestions.org
Help answer threads with 0 replies.
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 01-12-2017, 11:33 AM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
Some help with apache setup


ok so i built a basic wordpress site and want to host it on my centos7 server...im following this guide:

http://www.tldp.org/LDP/LGNET/12/server.html

for apache setup...can somebody maybe suggest a good one?
maybe on this fine site...

i came across this:

"I found this to be really disorganized, so I ended up putting mostly everything under one directory (I left the binaries in /usr/sbin):" is this absolutely necessary? or do you guys just leave things in their default location?

also this:

"And then to preserve the original Redhat file locations:"

again,is this very necessary...sorry guys just trying to setup
using best practices as i dont know squat about apache

thanks

oh just lastly,

i have bought a domain,just the domain,no hosting...how would i point DNS servers to my server?
 
Old 01-12-2017, 11:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,566

Rep: Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794Reputation: 1794
Hi,

The tutorial you're following is quite dated (1996).
You can use your favorite search engine to find a newer one, like this one that is specific for apache/wordpress on Centos 7

Regards
 
Old 01-12-2017, 12:06 PM   #3
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware, Fedora, NetBSD
Posts: 1,071

Rep: Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725
Don't overthink LAMP. It's actually quite simple to set up. On Red Hat / CentOS:

Code:
yum groupinstall web-server
This downloads and installs Apache and a few must-have PHP and Perl modules.

That's the L,A, and P in "LAMP", so now install the "M" part (MySQL, or its sister MariaDB):

Code:
yum install mariadb
Now if you navigate to your server in a web browser, you should be greeted with a CentOS-branded "it works!" message.

Proceed to setup your Wordpress as detailed in the Wordpress documentation.



DNS setup is not done on your server at all.There are a few ways to do it, but usually it's done through whatever company you bought your domain from. Login to your account and locate their control panel for setting up your domain. You want to make an A Name record for your site. This should be the domain name you purchased, pointing to the IP address of your server.

For example:

Code:
example.com.    A     93.184.216.34
Often, the domain name is abbreviated as just the at-symbol:

Code:
@    A     93.184.216.34
But interfaces differ, so do what your domain sales site tells you to.

You probably want to also create a CNAME record for the www subdomain:

Code:
www.example.com.    CNAME     example.com

Wait a bit for that to propagate. Verify it with the `host` command (you can do this on your server or from any machine running Linux):

Code:
host example.com
example.com has address 93.184.216.34
example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946
Did the right IP address show up? If so, the whole world can now type in your domain name and reach your server.

It's Apache's job, of course, to listen for incoming visits, and to route those requests to the correct site. In other words, you need to set Apache up to listen for example.com (or whatever your domain name is) and send those requests to wordpress. I believe that is covered in the Wordpress documents. If not, come back here and give us an update and maybe we can point you in the right direction, or otherwise assist you with your httpd conf.
 
Old 01-12-2017, 03:22 PM   #5
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
you guys are the best...seriously!!!
 
Old 01-14-2017, 03:12 PM   #6
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
one thing i find a bit confusing is regarding the database...

it tells you to install mariaDB (and i would prefer to use MySql
but then talks about creating an sql database

is mariaDB and mysql the same thing?
 
Old 01-14-2017, 03:23 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by sigint-ninja View Post
is mariaDB and mysql the same thing?
I treat them as the same.
 
Old 01-14-2017, 03:42 PM   #8
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
during the tutorial/setup i should have done sudo systemctl enable mariadb.service

i accidentally did:
sudo systemctl enable mariadb

and a long softlink was created

will this have any negative impact on my installation/machine?
 
Old 01-14-2017, 04:14 PM   #9
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
sorry guys lastly,

why does the tutorial restart apache this way
sudo service httpd restart

but earlier it was:
sudo systemctl httpd restart (or restart httpd...cant remember)

is there a difference?
 
Old 01-15-2017, 03:15 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,501
Blog Entries: 9

Rep: Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388Reputation: 3388
^ that's sysvinit vs systemd for you.
welcome to the present!
 
Old 01-15-2017, 05:57 AM   #11
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
ok so i followed it to a tee...everything installed etc etc
did the suggested firewall rules
my user account and password is correct

but now when i go 10.0.0.x i dont get wordpress i get

Error establishing a database connection

i have checked the credentials,i actually wrote them down
i think selinux might be doing something as a pop up was saying something about httpd

any suggestions...also lets just say i wanted to redo my credentials for sql how would i do that?

thanks for all the help so far
 
Old 01-15-2017, 06:07 AM   #12
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by sigint-ninja View Post
ok so i followed it to a tee...everything installed etc etc
did the suggested firewall rules
my user account and password is correct

but now when i go 10.0.0.x i dont get wordpress i get

Error establishing a database connection
Answer is in an earlier link I know you haven't read, thoroughly?
https://codex.wordpress.org/Installi...ase_and_a_User
 
Old 01-15-2017, 06:15 AM   #13
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
do you have to restart any services after editing wp-config.php?
 
Old 01-15-2017, 06:25 AM   #14
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
tried this:

If you've got SELinux enable and are not a SELinux expert, apply this command:

setsebool -P httpd_unified 1

didnt help
 
Old 01-15-2017, 03:29 PM   #15
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by sigint-ninja View Post
do you have to restart any services after editing wp-config.php?
Read more. a simple edit is not enough.
 
  


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
Apache Setup metallica1973 Linux - Server 4 05-08-2008 05:06 PM
Apache setup mvnetn Linux - Enterprise 4 07-16-2006 09:55 AM
Apache setup aeruzcar Linux - Networking 10 05-22-2004 06:07 PM
Apache setup help? TechSonic Linux - Newbie 7 02-23-2004 11:51 AM
Apache 2 setup fredws Mandriva 2 11-13-2003 05:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 PM.

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