Convert Desktop PC to Linux Network Storage&Home Web Ser

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

I have an old desktop pc that I dont really use now because I do everything on my laptop so I can carry it around with me. So my plan is to use it as a Network Storage. I have five computers in my house and they're all networked. But there is no one place to store data. I aslo want this computer to be a Home Web Server. This is one reason why I'm posting this here. Most web servers are linux. So whats the best free linux that will run Apache and PHP. I would want to be able to explore my server with an ip. Can this be done on a network?
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

yes. lol

posts like these are usually answered with a "try them and find one you like" answer, but heck - give this distro a try: CentOS

you may also be interested in looking at the desktop infrastructure part of the page for Solaris
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

Oh god no! Not Solaris! Anything but that -- well, ok not "anything".

So, as predicted, here is the ubiquitous "try them all" message.

Try them all -- they are ALL free (except the enterprise class versions) -- and decide for yourself which you prefer.

From a basic file-serving perspective, you are not going to see a great deal of difference, just try to pick one that does NOT boot into a GUI. If you have old hardware, you want to use your processing to handle ATA drive I/O, not put pretty graphics on a screen you will never need to look at. Boot into CLI, and run Samba for your CIFS sharing. That seems to be the easiest to install and configure.

Cheers.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

Daemonguy wrote:
Oh god no! Not Solaris! Anything but that -- well, ok not "anything".

*shrug* i've never tried it myself. i was going to install it one night but i fell asleep while it was preparing the installer and it was just being slow as dirt which is not fitting for my pc so i hit the reboot button :]


you may want to go to this site: http://www.zegeniestudios.net/ldc/
and see what that spits out for you, just for sh*ts and giggles, lol.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

I went to CentOS and went to the download page. How long does it take to download these :shock: theres like 100 individual files (or more) did I hit a wrong link or is this the price one pays for a free OS, or is this CentOS way of making you buy the cd? lol
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

sigh... lol, go to http://www.centos.org, in the menu hover over "download" and click on "mirrors". click on the "CentOS 4 ISOs" link. its rather large and right in front of you, you can't miss it. next, you select your cpu architecture. it sounds like you're running a pc so its probably either going to be i386 or x86_64 and unless you have an Athlon64 cpu, you're going to want i386. so you click the link for i386 (it's the 4th link down starting at "Parent Directory" ;)). next, you should choose a mirror that is or seems close to your location. a.k.a. i'm guessing you dont live in hawaii so downloading from a mirror based in hawaii probably isn't what you want to do :] but click on one of the links for the mirrors (it's not going to matter tremendously which one you choose). i'm clicking the second link, http://mirror.cs.wisc.edu/pub/mirrors/l ... isos/i386/ and from there it brings you to the directory where the iso's and torrent files are stored for CentOS. if you want to download the ISOs directly from the server, go for it. it appears as though there is 4 disks so make sure you download all 4 ISOs. if you'd rather use the torrent files with a program such as bit torrent, bit tornado, utorrent, azureus, etc. go for it, its your choice. once you've downloaded the ISOs you're going to need to burn them to cd's. do you know how to do this?
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Im guessing its not as simple as open the burner and drop the ISO file into the cd (burning from software such as Sonic)? If it is then, Yes I can burn cds :lol:
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

you just have to burn it as a disk image. most people try to burn the iso as a data cd and it fails miserably because thats not going to be bootable :]

i've never used this "sonic" software, but do you see an option on a main menu to burn a disk image?
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Well, Im using Ubuntu. So far its good. Took me about 1 minute to work my way through the options to find where to find the Internet options but I was on the internet in 1 click so its got a Plus from me. I tried to just install the server verision but it froze on me so Im using the normal one. But it seem to be a server of it self, it has alot of network tools so Im going to be looking around and playing with it to see if i can get to to do what i want. But if you know anything about Ubuntu what you think I might need to work want to know please post,

Im now looking at how to install Apache httpd, MySQL and PHP. I found this tutorial http://www.hostlibrary.com/installing_a ... p_on_linux but im not sure how to get to a root directory. It seem that the commands they are using look like those of console.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

ubuntu uses the sudo command. so in order to install apache (if its not already), i do believe you'd open a terminal and enter:
Code: [ Select ]
sudo apt-get update
sudo apt-get install apache2
  1. sudo apt-get update
  2. sudo apt-get install apache2

to install other programs or update the software, you'd do similar. enter: apt-get in a console to see the other options you can use. but remember, in order for apt-get to be able to execute you're going to need the sudo before it (i believe every time but i disliked ubuntu so i didn't have it installed long). you will have to enter your password that you use to logon after entering the command, but i believe you only have to enter it once per console session.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Okay I got Apache installed and I think I have MySQL. I installed them through a thing called Synaptic Package Manager. I still dont have php installed though.

When I go to my networking under Administration I am given some tabs.Connections General DNS Hosts Under DNS Im given an IP 192.168.0.1 I typed this into my browser and Im propted with a User and Password for DI-624. Does anyone know what this means? Or what the ip is used for? Its not my IP because my IP is 71.115.240.26

The reason I am asking this is I want to know how to connect to my Apache through another computer.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

ahh, you have a D-Link router :]

when prompted try: Username admin, Password admin

try going to http://71.115.240.26 and see what you get. if you dont get your apache server then your router isn't forwarding port 80 to your pc. otherwise to test your server locally, go to http://localhost

synaptic is a wonderful program. i<3it :] i've used it in fedora and i like it far better than any yum gui.



mm...you'd probably also want to install mod_secure for apache. you should be able to do that through synaptic no prob., just do a search for it..
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Where would I make it forward port 80 to my computer? Would it be in my D-Link setup? If it is would you have any idea where it is?

I went looking through my D Link settings and found some other IP's and being my self, very curieus, i typed them in. 192.168.0.100 gives me my apache directory. But for all I know only on my network.

Another thing is I cant edit anything in my www folder. It says im not the owner. Do you know where the settings to change this are? If you dont I'll go back home to the programers forum and ask there :lol:

Im on vacation from answer questions to asking them.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

SpooF wrote:
Where would I make it forward port 80 to my computer? Would it be in my D-Link setup? If it is would you have any idea where it is?

AnarchY SI wrote:
ahh, you have a D-Link router :]

when prompted try: Username admin, Password admin
lol you remember that 192.168.0.1 that you found where you needed a username and password? all d-link routers have that, i'm pretty sure the defaults are admin & admin. i do believe thats what mine was until i changed it. but thats where you would want to go for port forwarding, placing your pc in the demilitarized zone (not recommended, lol), etc.

yes, your ip behind your router is 192.168.0.100. so is mine. my dad is 192.168.0.102 and my mom is 192.168.0.103 lol. if you have any other computers on your network, they will follow a similarly ascending order of ip addresses assigned automatically via dhcp.

you can't edit anything in your www folder because it's not lying - you're not the owner. that folder is owned by root. therefore if you wanted to copy a file from /home/spoof/Desktop to /var/www/html (i'm making these up, kinda, thats the path to my html folder but it may not necessarily be on your pc as i'm running FC5) then you would have to do:
Code: [ Select ]
sudo cp /home/spoof/Desktop/index.html /var/www/html/

or to copy every file

sudo cp -a /home/spoof/Desktop/* /var/www/html/
  1. sudo cp /home/spoof/Desktop/index.html /var/www/html/
  2. or to copy every file
  3. sudo cp -a /home/spoof/Desktop/* /var/www/html/
get it? :)
of course you could always make your user the owner of the folder but that is HIGHLY NOT recommended as if someone hacked your server but didn't get root privileges, they would have access to your html folder so they could deface the balls out of your site :]


one more thing - if you want your url to be more visually esthetic than http://abunchofnumbers lol i'd suggest heading over to http://www.dyndns.com/ and signing up for a free subdomain. all you do is create an account, enter your ip, choose whatever you want for your http://thisisyou.thisisthem.com and save (thats what i did, http://willc0de4food.is-a-geek.com ^_^ i love that..haha)
whenever you have a problem with access privileges, try re-entering the command with the word "sudo" in front of it and see what happens..



mm...another idea i just had for editing your website, you could go like: sudo gedit
and then gedit will open BUT it will have root privileges so therefore you have read-write access to anything on your hard drive :] just dont get TOO curious and modify something.. lol
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Awesome, you have all the answers lol. I found that site when I was looking about how to do some stuff,lifehacker.com, This site is AMAZING It has everything about anything related to computers. Anyways.

I found -
DMZ (Demilitarized Zone) is used to allow a single computer on the LAN to be exposed to the Internet.

Is this the same as Port forwarding?



If Ozzu says im online them my computer is on. Can you test

travislperson.is-a-geek.com
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

the demilitarized zone is not the same as port forwarding. the demilitarized zone is basically the router shutting down its firewalling capabilities for your computer :]
but yes, right now if i go to your site it tells me i'm forbidden which tells me either A: you have files in your root www directory but none of them are index.html or index.php (assuming you have php working with apache, otherwise scratch that) or B: your httpd.conf is setup to deny, allow access (deny by default) so therefore no one can go to any page your hosting. those are the only two possibilities coming to mind.
but if you'd rather forward the port instead of leaving your computer unprotected by your router, go to http://192.168.0.1 and login as it appears you've done before. click the advanced tab at the top, and then on the left click on firewall. click the radio button for "Enabled", give it a name (http would be logical), click the radio button for "Allow", first interface: WAN, source ip range just enter: * in the IP Range Start edit box. second interface: LAN, source ip enter your IP behind the network (192.168.0.100), port 80, schedule: always, unless you want it otherwise. click apply and take yourself out of the demilitarized zone, then go to http://travislperson.is-a-geek.com and make sure you're still able to go to your site. you may want to reboot just for the fun of it. lol
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

The forbidden is because I made a file index.html but it had no permissions. I changed that though now. So far I can copy files, cp, but I cant remove files from the www folder. I would solve this if I would connect through ftp I think. Im going try host name Travislperson.is-a-geek.net
username travis
password [my computer password i use for sudo commands]
port 80 and 21
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

sudo rm -f /var/www/html/file_you_dont_want.ext
sudo rm -f /var/www/html/*.ext
sudo rm -rf /var/www/html/folder_you_dont_want
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Daemonguy wrote:
Oh god no! Not Solaris! Anything but that

Sounds like a case for good ol SCO!

Just kidding.

So, are you using CentOS for this or Ubuntu? It just seemed like you were downloading CentOS and then, quite suddenly, you said "OK, I'm running Ubuntu now"

You won't be able to FTP in and change any of those files for 2 reasons: 1. root can't FTP into the machine - or shouldn't be able to anyway. 2. Your regular user doesn't own the files. If you want remote access to your server, you should be using SSH. There are 2 Windows applications for this that are decent, WinSCP and PuTTy. WinSCP gives you an FTP-like interface and PuTTy will give you a command line. Both are free, and you can log in as root through SSH by default. Also, if you're on an internal network, you should be using that, not the domain name or external address, to connect to the box for any sort of management.

Also, you shouldn't be handing out your public IP or domain name along with your username - you should go back and edit that out of your post or choose different credentials. I realize you didn't give out your password, but having as much information as you gave would allow someone to brute force your box - especially knowing that you're completely new to Linux and wouldn't think to look in either your /var/log/messages or /var/log/secure files (tail -80 /var/log/messages).

On that note, if you don't have a *real* firewall between this server and the internet, you should take a stop by http://iptables.org and learn how to configure the on-system firewall for your server. D-Link anything does not count as a *real* firewall (maybe I'm just a purist).

Stepping back a moment, I think you should choose a more fitting distribution for this than Ubuntu. Ubuntu is made more for desktop system and if you're just going to be running a web server and samba you're not going to be using half of the system. Also, everything you're wanting to do requires that you configure it through the configuration files (there's no GUI that does the job right), so you're not going to gain anything there either.

If you go download the CentOS disc 1 ISO and burn it, that's all you should need for a minimal installation. If you want the full installation, you will need all 4 ISOs. Once installed, configuring everything else would consist of the following (as root):

1. Run
Code: [ Select ]
# yum install php-mysql

You'll find that this will install both PHP and MySQL as well as the php-mysql connector. This may even install httpd (the apache web server) but I haven't done it in a while so can't remember - if it doesn't, just do "yum install httpd"

2. Run
Code: [ Select ]
yum install samba

You'll probably want to take a look at the samba howto here for how to configure your network.

Once you've done this, you can start everything (I use restart instead of start just in case the service was already running by default):
Code: [ Select ]
# /etc/rc.d/init.d/rc.d/mysqld restart
# /etc/rc.d/init.d/rc.d/httpd restart
# /etc/rc.d/init.d/rc.d/smb restart
  1. # /etc/rc.d/init.d/rc.d/mysqld restart
  2. # /etc/rc.d/init.d/rc.d/httpd restart
  3. # /etc/rc.d/init.d/rc.d/smb restart


For each of these, the system will restart each service. Pay attention to the messages being output, you'll see something like:
Stopping service [ OK/Failed ]
Starting service [ OK ]

Anything that shows [ OK ] on the "Stopping" line means that the service was already running by default and will start again when you reboot (unless you started the service beforehand), for anything that says [ Failed ], do the following:

Open the corresponding file in /etc/rc.d/init.d and look for the following line:
Code: [ Select ]
# chkconfig: - 91 35

the two sets of numbers are unimportant here (they correspond to boot priority), but the dash means that it doesn't boot in any runlevel. You'll at least want to add runlevel 3 to this, so you'd change this to:
Code: [ Select ]
# chkconfig: 3 91 35

to add it to every runlevel (except 0, 1 and 6) you'd do this:
Code: [ Select ]
# chkconfig: 2345 91 35

To add it to just runlevels 3 and 5, you'd do this:
Code: [ Select ]
# chkconfig: 35 91 35

Once you've set them to the runlevels you want, you have to register it, you do this by running chkconfig. If you logged in as root:
Code: [ Select ]
# chkconfig service reset

If you used su to get root permissions:
Code: [ Select ]
# /sbin/chkconfig service reset

"service" here is the file name of the init script in /etc/rc.d/init.d. You can then check the service with chkconfig:
Code: [ Select ]
# chkconfig service --list


I refuse to touch Ubuntu myself (too pretty for me), but these are the steps you're going to have to take no matter which distribution you use, the only difference is going to be with the actual installation. With CentOS, you just "yum install whatever" and with Debian you would do "apt-get install whatever". You can run either of these through SSH as well. If Ubuntu does boot into X Windows, you should really either figure out how to switch it to a runlevel with a console login, or choose a different distribution.

On the issue of ownership of the web files, root should never actually own those files. If someone cracks a script there they'll be running a root script in a directory with root permissions. If it's just you who should be writing to those files, then take ownership of them. Otherwise, create a new user and give them to that user, then add yourself and whoever else should have write access to those files to that users group and finally, change the permissions of the files there so they're groups writable (664).

Post Information

  • Total Posts in this topic: 19 posts
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.