Advertisement
Promo

Server platforms Toolkit

Build your own Linux server

Manek Dubash ZDNet.co.uk

Published: 22 Apr 2004

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

Web caching

Web caching speeds up browsing for all users, and saves download volumes by storing frequently used objects so they can be delivered to users quickly from local storage. It's part of RHL and comes with a sensibly configured configuration file (/etc/squid/squid.conf -- you can recognise it as a configuration file from its .conf extension). What's more, the configuration file, although large, is well self-documented which makes the task much easier.

Access control

Squid's default settings work fine as a basic proxy and caching server, so the main issue is to define who can have access to the cache and who can't. You'll want to provide access to nodes on the local network while denying access to anyone from the outside. Assuming your LAN uses the subnet 192.168.1.0, you would do this by adding the subnet to the access control list as follows:

http_access allow 192.168.1.0/255.255.255.0

For most small addresses outside that subnet will be refused. However, making it explicit by adding:

http_access allow localhost
http_access deny all

is good practice. We also changed the default IP port of 3128 to the more memorable 8080:

http_port 8080

Performance

Improving performance is the next step. We increased the amount of memory that Squid devotes to caching objects -- the server won't have a huge amount else to do, and we've stuffed it with memory for this reason. So we changed the default cache_mem setting as follows:

cache_mem 50 MB

Then we increased the maximum size of object Squid will save in RAM to 32MB:

maximum_object_size 32768 KB

That's probably all you need to get started.

Windows server

Known as Samba, the SMB service ships free with RHL and with most Linux distributions. Firing it up using the services module then allows you to get stuck into configuring the system. The first task is to create users in Samba, which then can then be mapped onto Linux users -- there must be an equivalent Linux user account for each Samba account. You can then create Samba-specific access permissions on top of the Linux privileges.

It's convenient for each user to have a private area and a public share for all. If you're having problems creating the right access privileges in the file system, use the chmod command. This lucid description provides a good handholding guide. Note that our shares were created on a separate mechanism from the OS, which simplifies backing up.

Once that's done, Samba's graphical interface makes configuration pretty straightforward. If you want to fine-tune your access permissions though, you're best advised to edit the smb.conf file (/etc/samba/smb.conf). For instance, you can restrict access to IP addresses in your local subnet and, better still, ensure that the shares for those in one department are completely invisible to those in another. Separating out the accounts workers' shares would be a typical example.

You can also fine-tune your password strategy -- whether or not to use encryption for example, since Windows 98 machines and below don't encrypt:

encrypt passwords = yes

You can also set password complexity:

password level = 8

decide whether the machine should be the browser master:

local master = yes

and select which machine (if any) stores passwords for security purposes:

password server = betelgeuse [password server] yes

Samba is fairly simple to set up and, once up and running, can usually be left to its own devices except when users change.

  • Email
  • Trackback
  • Clip Link
  • Print friendlyPrint with EPSON

Did you find this article useful?
216 out of 306 people found this useful


New Products

Dell Adamo XPS: a first look

Dell Adamo XPS: a first look

More details have finally emerged on Dell's ultra-thin, ultra-stylish Adamo XPS. Check out our preview and image gallery.

iPhone 3G S: a first look

iPhone 3G S: a first look

Apple's third-generation iPhone will be available on 19 June. Here are the highlights from its unveiling at the WWDC 2009 keynote.

Dell Adamo: a first look

Dell Adamo: a first look

Dell's much-anticipated Adamo, a high-end 'luxury' notebook, has finally been announced. Here's a hands-on look at a pre-production version.

View all Previews

Video icon

Video

Microsoft Futures

Windows 7: Mixed reviews from PDC attendees

As developers received their copies of Windows 7 on Tuesday, they offered varied reactions to the Microsoft operating system update More

Microsoft floats clouds on Windows Azure

At the Professional Developers Conference, Microsoft announced the Azure Services Platform, the company's cloud-computing platform More

Ozzie: Success of Azure comes down to trust

In an interview, Ray Ozzie says businesses will be taking a risk by placing core operations in Microsoft's datacentre, but that the software giant has more to lose if things go bad More


Skip Sub Navigation Links to CNET Brand Links

Help

Become part of the ZDNet community.

Newsletters