LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-13-2007, 06:39 AM   #1
kamu8recon
LQ Newbie
 
Registered: May 2007
Location: Hawaii
Distribution: Learning -Ubuntu Desktop and Server 7.04
Posts: 6

Rep: Reputation: 0
Ubuntu 7.04 server edition, web server


Hi,
First off I am brand new to linux, so patience would be greatly appreciated. I am an IT student and im playing with a theory of starting a web hosting service using ubuntu server.
Here are a few questions regarding Ubuntu server edition 7.04:

- How hard would it be to setup and configure a web server using ubuntu (i've been using windows)?

- Ubuntu Web server security, and information or tips will be appreciated.

- I use dreamweaver 8, do i have to transfer my files over to a ubuntu desktop or can I work on my windows desktop and upload my files to my linux server?

Please be very specific when explaining tasks as I have stated I am a new user to ubuntu. Thank you!
 
Old 05-13-2007, 08:24 AM   #2
vxc69
Member
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 385

Rep: Reputation: 33
Quote:
Originally Posted by kamu8recon
Hi,
- How hard would it be to setup and configure a web server using ubuntu (i've been using windows)?

- Ubuntu Web server security, and information or tips will be appreciated.

- I use dreamweaver 8, do i have to transfer my files over to a ubuntu desktop or can I work on my windows desktop and upload my files to my linux server?
I'm pressed for time here, so this won't be specific.

How hard? Well that depends on how much you are willing to RTFM. Also is this web hosting service for a LAN or do you want to provide it online? If you want to provide it online you have a lot of things to consider, like bandwidth for starters.

Security Info Tips? I think there are way too many to give of the top of your head. Here's a link though. More links.

You don't have to transfer your files to the ubuntu desktop, if you configure a FTP daemon or maybe even use Gftp you can directly transfer files from any computer to the server (given that all the computers are on a LAN). If you are dual booting then you could access the files via the windows partitions.


Hope this helps you get started,
vxc

Last edited by vxc69; 05-13-2007 at 08:26 AM.
 
Old 05-14-2007, 03:07 AM   #3
kamu8recon
LQ Newbie
 
Registered: May 2007
Location: Hawaii
Distribution: Learning -Ubuntu Desktop and Server 7.04
Posts: 6

Original Poster
Rep: Reputation: 0
thank you,
the server will be for web hosting online. rtfm?

i checked out the links and their are a lot of good things their, thank you for that.

on the last topic, if i want to add files from my dreamweaver (windows xp pro) to the server, i have to use ftp? sounds good.
 
Old 05-14-2007, 03:11 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
RTFM = read the f... manual
 
Old 05-14-2007, 04:46 AM   #5
vxc69
Member
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 385

Rep: Reputation: 33
Quote:
Originally Posted by kamu8recon
on the last topic, if i want to add files from my dreamweaver (windows xp pro) to the server, i have to use ftp?
Well you don't have to. I mean you could use a USB pen-drive or copy the files via cd/floppy/dvd, to state the obvious.

You could also setup a samba share (which is similar to windows file sharing protocol) and access that share from the XP machine.

Else, on ubuntu go to places>network servers and your windows PC's should appear. If they don't just type Alt+F2 and type in smb://#IP ADDRESS OF XP COMP#/C$ (or replace C$ with the drive letter followed by '$' sign of the dirve you want to access on your XP machine) this way you can access your XP machine through Ubuntu.


vxc

Last edited by vxc69; 05-14-2007 at 04:48 AM.
 
Old 05-14-2007, 08:21 AM   #6
inspiron_Droid
Member
 
Registered: Dec 2006
Distribution: Debian (Wheeze)
Posts: 391

Rep: Reputation: Disabled
kamo8recon:

I recomend starting off by setting up a samba serever for your LAN and then seting up apachee as appache can be a little overwelming for a linux newbie but if you can aquire the apropriate Linux apache Mysql php (lamp) package for ubuntu which should come as an option on the server version instalation cd or dvd.
 
Old 05-14-2007, 03:37 PM   #7
kamu8recon
LQ Newbie
 
Registered: May 2007
Location: Hawaii
Distribution: Learning -Ubuntu Desktop and Server 7.04
Posts: 6

Original Poster
Rep: Reputation: 0
thanks for all of your input.

hawk - i do have the server edition with lamp. what do you think would be a draw back to using apache vs samba?

vxc69 - now i know that i can simply access my xp comp from linux (how cool is that ).

billymayday - thanks for clearing that up.
 
Old 05-14-2007, 05:25 PM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Samba is for file serving (so you can transfer from Windows was the suggestion), apache is a web server, so they are quite different
 
Old 05-16-2007, 05:03 PM   #9
kamu8recon
LQ Newbie
 
Registered: May 2007
Location: Hawaii
Distribution: Learning -Ubuntu Desktop and Server 7.04
Posts: 6

Original Poster
Rep: Reputation: 0
billy,
i spent some time reading up on apache and samba. that sort of clears that part up for me thank you!
 
Old 05-16-2007, 05:28 PM   #10
digitalnerds
Member
 
Registered: May 2007
Distribution: Debian
Posts: 103

Rep: Reputation: 15
*smiles*
Wish you good luck in your hosting quest. It's good to get through it so you know what and how. I can assume that for a beginning you would only "offer" shared hosting. Even so the machine running the services must be good enough to handle quite alot of connections (a dual xeon or better?!). I would recommend a custom kernel (i myself like the monolith one without LKM's [loadable kernel modules support]), also tweaking your FD limits and also configure apache to handle a large number of simultaneous connections. There are alot of things to count. I counted several system specific ones. Now i dont count the financial issues involved or simply organization of the hosting activity. You would definitely like to have a web based control panel for your clients (many solutions out there like cpanel/plesk/ensim/alabanza/interworx) as well as a billing and re-billing system ( ubersmith/modernbill etc). However if you instead want to offer some sort of a "family like" hosting business (i know i did and i still do for various friends and such) where you wont be needing such a "professional" presence, then you just need to tweak your box and have enough bandwidth or at least estimate a reasonable amount of bw you will need for the hosted sites.
If you have any other questions please do no hesitate to PM/contact me.

Regards
Andy
 
Old 05-17-2007, 12:23 AM   #11
kamu8recon
LQ Newbie
 
Registered: May 2007
Location: Hawaii
Distribution: Learning -Ubuntu Desktop and Server 7.04
Posts: 6

Original Poster
Rep: Reputation: 0
thanks andy,
very useful information. my overall goal is to create a web hosting business for the people of my community. i live in hawaii and i am tired of seeing outside businesses taking over. so i figure id try and start a business of my own that would give back to the communities businesses. what i would like to do is create a web hosting server, as well as create web sites for people (using dreamweaver). i actually created a simple website for my brothers company www.ohanapartyrentals.com ( i did that over a year ago when i was just learning web designs). and in doing so i figured why not take it to the next level. so all these tips and advice are really helpful, thank you!

ps i check out your site, pretty nice.
 
Old 05-17-2007, 03:43 AM   #12
digitalnerds
Member
 
Registered: May 2007
Distribution: Debian
Posts: 103

Rep: Reputation: 15
You are most welcome. I respect your wish of doing something on your own and i wish you good luck. If you are decided to go on with the hosting ideea you would need some advices tunning up your box. Here you go with some tips you would like to consider for a hosting box. First of all you would need to tune FD's (file descriptors) and the number of processes. You would want to have in your /etc/security/limits.conf something like:

Code:
*      soft      nofile      8192
*      hard      nofile      8192
*      soft      nproc       8192
*      hard      nproc       8192
The first two lines (containing nofile) set the maximum number of files, including sockets, that a process is allowed to open. If a process attempts to open more files than specified, the attempt will fail.
The second two lines (containing nproc) set the maximum number of server processes that can be created with the same user ID. If the limit is reached for a particular user, no more processes will be created.
These values can be changed as needed but good enough for starters.

The apache configuration is up to you and depends on how many clients you estimate you will have. As an example the following configuration might be a good one for starters but that you would prolly change if the number of requests grows:

Code:
<IfModule prefork.c> 
   StartServers         30
   MinSpareServers      10
   MaxSpareServers     30
   ServerLimit        300
   MaxClients         300
   MaxRequestsPerChild  1000
</IfModule>
Next you would to change your tcp/ip kernel parameters. For that you would want to work with sysctl. First of all save your sysctl.conf by issuing:

Code:
sysctl -A /tmp/sysctl.bak
And edit the /etc/sysctl.conf to look similar to:

Code:
# Uncomment the next line to enable TCP/IP SYN cookies
net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.conf.default.forwarding=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.default.forwarding=1
# Disable response to broadcasts.
# You don't want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1

# Filter packets not meant for this network.
net.ipv4.conf.eth0.rp_filter=1
net.ipv4.conf.lo.rp_filter=1
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

# increase TCP max buffer size
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216

# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
net.ipv4.tcp_rmem = 4096 10000000 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

# Disabling the following parameters will prevent a hacker
# from using a spoofing attack against the IP address of the server.
net.ipv4.conf.eth0.accept_source_route=0
net.ipv4.conf.lo.accept_source_route=0
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.all.accept_source_route=0

# These commands configure the server to ignore redirects from
# machines that are listed as gateways. Redirects can be used to
# perform attacks, so we only want to allow them from trusted sources.
net.ipv4.conf.eth0.secure_redirects=1
net.ipv4.conf.lo.secure_redirects=1
net.ipv4.conf.default.secure_redirects=1
net.ipv4.conf.all.secure_redirects=1
# Don't allow ICMP redirects
net.ipv4.conf.eth0.accept_redirects=0
net.ipv4.conf.lo.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.accept_redirects=0

# If the server does not act as a router, it does not need to
# send redirects.
net.ipv4.conf.eth0.send_redirects=0
net.ipv4.conf.lo.send_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.all.send_redirects=0

# For servers that receive many connections at the same time, the
# TIME-WAIT sockets for new connections can be reused. This is useful
# in Web servers.
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_fin_timeout=30

# Move keepalive from 2hrs to 30 min. You may want to tune this up or down depending on your implementation
net.ipv4.tcp_keepalive_time=1800

# Help protect from denial-of-service (syn-flood) attack.
net.ipv4.tcp_max_syn_backlog=4096
net.ipv4.ip_conntrack_max=6553600

# don't cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save=1

#Congestion control algorithm
net.ipv4.tcp_congestion_control=bic

#Fd
fs.file-max=5049800
net.ipv4.tcp_congestion_control should be bic by default at least in Debian 4. However you may want to experience with various other algorithms like reno or htcp or vegas for lossy networks but for others than bic you may need to recompile your kernel.
After you have added the above values to systctl.conf you do not need to restart the box. You just need to simply type sysctl -p at the command prompt.

I realize this may be a bit to much for you as a beginner but it doesnt hurt to experience. Please note that i use the above values on production server slightly different from one server to another based on the needs i have on each server. Hope it helps you.

Best Regards
Andy

Last edited by digitalnerds; 05-17-2007 at 05:24 AM.
 
Old 05-18-2007, 04:27 AM   #13
kamu8recon
LQ Newbie
 
Registered: May 2007
Location: Hawaii
Distribution: Learning -Ubuntu Desktop and Server 7.04
Posts: 6

Original Poster
Rep: Reputation: 0
yea that last paragraph says it all, i read it and it looked intresting. then i was like wtf? lol. very nice info for security of the system. that is one of the things i was most hesitant about when getting linux, security. all in all very helpful.

thanks once again digitalnerd.
 
  


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
upgrade from ubuntu 6.06 to 6.10 Server Edition FunkyChicken Linux - Distributions 3 03-08-2007 02:08 AM
Setting up Ubuntu LAMP Server for local web server sewmyheadon Linux - Newbie 5 02-11-2007 02:06 PM
LXer: Review: Ubuntu Server Edition (6.06) LXer Syndicated Linux News 0 09-07-2006 06:54 PM
Ubuntu Server Edition Geminias Linux - Newbie 3 08-29-2006 06:55 AM
Can Ubuntu Server Edition configure RAID during installation? b0uncer Ubuntu 0 06-30-2006 03:30 AM


All times are GMT -5. The time now is 08:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration