LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-04-2012, 03:49 AM   #1
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Rep: Reputation: Disabled
First time setting up my own home server, need help!!


Hey guys, i know you must get this a lot but i could really use your guys' help. I have been trying to set up a home server for use to host my personal website and a file server!

I have been learning HTML, CSS, and Javascript over the last few weeks and am going to start learning PHP and MySQL soon but i really want to get this server up!

I have a fresh install of CentOS on a box that i took from home, its about 2 years old and has 8GB of DDR2 RAM and i think a 2.4 Ghz processor.

I am just super confused on how to install and configure each package. I know i need Apache, PHP, and MySQl, but i as hoping to also get some software to make it a file server (if possible, my priority is a webserver), and i want to get Ruby On Rails, Python, and Perl on it so i can try out all of them and decide which ones suits me ( I plan to start with PHP and move on from there).

I know there are tutorials like the one on howtoforge called "The Perfect Server with Apache2 on CentOS" but they are all confusing because they just tell you what to do but not tell you what you are actually doing! I want to learn what i am doing when i make changes to a config file!

So i am sorry if i am asking a lot but i would really appreciate it if you guys would help me by explaining what to install, how to install it, and how to configure it and what exactly it is (at least a basic explanation that i can build on by doing my own reading).

I just don't know what to install first, I assume its apache but i dont know for sure (thats how noobish i am, haha). And I don't know where to go from there!

I am willing to read documentation but I am very new to this and huge documentation is really intimidating and often hard for me to read through and learn from.

I am glad to be a new member of this forum and I plan on being very active - helping with whatever i can (as small as it may be)!

Thank you guys so much!
 
Old 07-04-2012, 03:53 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
asking for a lot? you've not really asked much in the first place.

Firstly, Running a home server is crappy generally. I'd suggest going and getting a **FREE** instance from amazon. Your server isn't free.. it's costing electricity etc...

on a centos ssytem though, you should be able to just run "yum install php mysql-server httpd" or similar and that will install the relevant packages automagically.
 
Old 07-04-2012, 03:57 AM   #3
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
asking for a lot? you've not really asked much in the first place.

Firstly, Running a home server is crappy generally. I'd suggest going and getting a **FREE** instance from amazon. Your server isn't free.. it's costing electricity etc...

on a centos ssytem though, you should be able to just run "yum install php mysql-server httpd" or similar and that will install the relevant packages automagically.
I just dont want to make something think that i am am asking them do this work for me, i am very new and need a lot of hand-holding and i feel like that is a lot.

I know it isn't free, i am doing this for the experience. I really want to learn all this stuff hands-on. I am actually not paying for my electricity right now (subleasing an apartment at a constant rate over the summer until i move into my actual apartment in September gotta love college haha).

Anyway, Is that all i need? What about stuff like phpmyadmin, python, etc?

thanks so much for the reply, i really appreciate it!
 
Old 07-04-2012, 04:05 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
python itself is already installed. you can use modpython to run python through apache if you need. If you want phpmyasdmin, install it. I wouldn't bother personally, but it depends what you want to learn and how.
 
Old 07-04-2012, 04:12 AM   #5
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
python itself is already installed. you can use modpython to run python through apache if you need. If you want phpmyasdmin, install it. I wouldn't bother personally, but it depends what you want to learn and how.
Do you use something else besides phpmyadmin? I am not sure if i should use it, i have only heard that it is popular.

Also, i am not sure how to install it, the yum search really is not that conducive to intuitive searches, haha. Sorry if these questions are dumb...

So it is basically a standard to just do 'yum install mysql-server httpd" for web servers? And that comes with Apache, MySQl, and PHP? What else does it come with?

Once they are installed how do i go about configuring them to host my webpage (i have port 80 open), also i read some stuff about making my own SSL certificate, is that legitimate? Should i do it?
 
Old 07-04-2012, 04:26 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I don't use anything else, just mysql directly.

yes, you'd generally just install httpd etc without much thought behind it for a small server. It'll sort out all the dependencies and get you going. It comes with whatever else is required. Interesting (??!) if you did a "yum install phpmyadmin" that would install apache, mysql and php as dependencies as well as anything else phpmyadmin needs.

it's utterly legit to make a self signed cert. No browsers will trust it and you'll get a warning to click through, but it happens all the time where being signed by a formally trusted body doesn't matter. If it's for your use then it's just as secure as any commercial cert you can pay for.
 
Old 07-04-2012, 04:41 AM   #7
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Alright, i think i am gong to get started on the install tomorrow seeing as how it is 3 AM over here in California. Thanks for the info, i might ask more questions tomorrow if that is okay?
 
Old 07-04-2012, 05:13 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Sure, ask as many as you wish just so long as the credit card details are processed correctly.
 
Old 07-04-2012, 01:54 PM   #9
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
www.linuxhomenetworking.com would be something that you could read.
 
Old 07-04-2012, 05:14 PM   #10
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
I just did 'yum install php mysql-server httpd' but i am not sure on my next steps. Is how a good time to install phpmyadmin? Should i configure the other stuff first? If so how do i configure everything and secure it so it can host my websites securely?

Also i did not see python in the dependencies for the stuff i installed? How do i make sure i can use Perl, Python, and Ruby on Rails as well as PHP which i just installed?

EDIT: Also i am trying to get it set up so i can transfer files to and from it remotely, how do i do this?

Sorry, i feel like i am just asking a bunch of noobish questions, i am googling this stuff while doing this but nothing clear is coming up

EDIT: I got apache to work! Now i just need to learn to configure php and mySQL (as well as the other scripts).

Last edited by Silman; 07-04-2012 at 09:08 PM.
 
Old 07-04-2012, 11:51 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,363

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Salasi's link is good for what you want.

if you are new to Linux, this is a good tutorial (and not a bad ref anyway) http://rute.2038bug.com/index.html.gz
You don't say what version of Centos you have ie 5.x or 6.x, but you can get the Admin guides to read here http://www.linuxtopia.org/online_boo...ion_index.html.
Given that Centos is a free rebuild of RHEL, the RHEL manuals apply just as much.
 
Old 07-05-2012, 12:07 AM   #12
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Salasi's link is good for what you want.

if you are new to Linux, this is a good tutorial (and not a bad ref anyway) http://rute.2038bug.com/index.html.gz
You don't say what version of Centos you have ie 5.x or 6.x, but you can get the Admin guides to read here http://www.linuxtopia.org/online_boo...ion_index.html.
Given that Centos is a free rebuild of RHEL, the RHEL manuals apply just as much.

Thanks for the links! I am not new to linux but i am completely new to server set up and administration. I am running CentOS 6.2
 
Old 07-05-2012, 02:08 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
For file transfers sftp is your best bet. if windows is involved, run winscp on windows and connect to linux over ssh from there. SSH should already be running, which provides the sftp subsystem by default, although you may need to open up your firewall to al;low port 22 through it.
 
Old 07-05-2012, 02:17 AM   #14
Silman
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
For file transfers sftp is your best bet. if windows is involved, run winscp on windows and connect to linux over ssh from there. SSH should already be running, which provides the sftp subsystem by default, although you may need to open up your firewall to al;low port 22 through it.
Thanks for the info! It seems we keep missing each other as i have to sleep now for work tomorrow but i am really glad you are still keeping up with my questions.

Port 22 is already open(and stays open for some reason when every other port seems down). I tried to get port 80 to work today since it was causing me some trouble by closing on its own when i told it to open but i think i have it now.

You should be able to access my server at: www.silmanserver.com or http://98.244.55.49 (Snocone server is an inside joke).

So if i have followed your instructions right i now have httpd running, MySQL working php, and phpmyadmin (this one gave me trouble since i couldn't just do yum install phpmyadmin, its in a seperate repo and i had to fiddle around on google for a while to get it installed.

I think i am learning a lot but i still feel like i know nothing, haha.

tomorrow i will reserch how to install sFTP and how to use it to remotely log into my server. I have had experience with winSCP in the past so lets hope it works!

Also i have a strong feeling that my server is completely insecure since it put it on my routers DMZ and i tried to pry open a lot of its ports (some ports like 443 and 21 STILL just won't work! I have no idea why 80 is working part time and the others all fail (except for 22 which is always open)!

Anyway, whats some good software to download for server security? and where can i read about bolting down my server?

Thanks so much!
 
Old 07-05-2012, 07:02 AM   #15
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by Silman View Post

You should be able to access my server at...
I would say that you should isolate your server from the internet until you feel that you have it secured (and, as far as I can tell, that's not yet).

Now, you could isolate it with iptables (the firewall...more than you want to know is available here), anything that indirectly runs an iptables ruleset for you (there are dozens of GUI front ends for iptables, and you could build your ruleset on another computer, if you wanted to), probably arrange whatever firewalling you have on your interface device to achieve a similar effect (some modem/routers have more useful firewall approximations than others) or you could pull out the network cable until you are done setting up.

Your server currently responds to pings (a bit slowly, but hey, that could be anything). It is a target for any script kiddie who wants to try out their skills. It really doesn't matter that there is (if there is) nothing important to 'hack' on there,
  • no one will know that until they have got in, and then the game is over
  • it could still be recruited into a botnet of some kind

Quote:
Originally Posted by Silman View Post
Anyway, whats some good software to download for server security? and where can i read about bolting down my server?
There is a security sub-forum within linuxquestions, and the 'stickies' within that forum conatain all the information that you'll need (and more). But
  • you seem to be thinking of downloading software as the primary thing that will give you security - I'd argue (and I'd accept that it is just possible to make the contrary argument) that configuring the stuff that you already have correctly (iptables, the services that you want to run) are as important or more important than any 'add-ons' that you can download.
  • You can run a script that does some basic security checks. This seems to be what you are asking for, and provided that you accept the caveat above and don't get lulled into a false sense of security won't do too much harm. I've used Bastille in the past, but that went into a bit of a, err, hiatus and Gnu Tiger might be easier to recommend currently (although, that has also been through a hiatus or two itself).
  • (note that any script such as Bastille does nothing at run time and is only active at configure time, and, like a lot of things really needs to be run before anyone else gets chance to get in, so before you ever connect up to the net - running any hardening script on a box that has already had some basic utilities 'got at' by an evildoer doesn't necessarily do anything for your security, because they can cover their tracks)
  • you'll need to secure ssh (or not run ssh); many ways of approaching this, but don't assume that it is secure out of the box (see samhain for an overview)
  • You may be thinking of something like snort

Last edited by salasi; 07-05-2012 at 07:04 AM. Reason: clarification of hardening scripts
 
  


Reply



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
Setting up Home web server for the first time,Need Guidance Vardhaman Linux - Server 4 08-31-2008 02:06 PM
setting up home server brianhall Linux - General 3 05-20-2006 10:51 PM
Setting up a home server Nader1 Linux - Networking 5 12-19-2005 10:03 AM
Setting up server from home joeman3429 Linux - Networking 10 11-06-2005 03:51 AM
setting up a home network server rebelcan Linux - Networking 8 01-06-2004 08:55 PM

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

All times are GMT -5. The time now is 04:41 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
Open Source Consulting | Domain Registration