Kamis, Januari 14, 2010

Squid 3.0 On Debian Lenny

There is sample configuration for Squid 3.0

http_port 192.168.1.1:3128 transparent
icp_port 3130
acl youtube dstdomain .youtube.com
no_cache allow youtube
hierarchy_stoplist cgi-bin ? localhost .js .jsp .friendster.com
acl QUERY urlpath_regex cgi-bin \? localhost .friendster.com
no_cache deny QUERY
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_mem 6 MB
cache_dir diskd cache0 12000 28 256
cache_dir diskd cache1 12000 28 256
cache_swap_low 98
cache_swap_high 99
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
mime_table /usr/share/squid/mime.conf
pid_filename /var/run/squid.pid
client_netmask 255.255.255.0
refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
redirect_rewrites_host_header off
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localnet src 192.168.1.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 8443 563 777
acl Safe_ports port 25 80 81 110 443 563 6667 7000 777 210 119 70 21 1025-65535
acl Safe_ports port 280 6668 6669
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777

always_direct deny all
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny CONNECT
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
http_access deny all
maximum_object_size 128 MB
maximum_object_size_in_memory 8 KB
ipcache_size 4096
ipcache_low 98
ipcache_high 99
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 75
fqdncache_size 4096
shutdown_lifetime 10 seconds
cache_mgr squidku@yahoo.com
cache_effective_user proxy
cache_effective_group proxy
memory_pools off
buffered_logs off
log_icp_queries off
logfile_rotate 1
log_fqdn off
forwarded_for off
icp_hit_stale on
query_icmp on
reload_into_ims on
emulate_httpd_log off
negative_ttl 2 minutes
pipeline_prefetch on
vary_ignore_expire on
half_closed_clients off
high_page_fault_warning 2
nonhierarchical_direct on
prefer_direct off
visible_hostname squidku.net.id
unique_hostname squidku.net.id
For more configuration we can modificate the configuration above, beside implemented to Debian this configuration can apply to Ubuntu, Linuxmint and other linux distro.

For more information, just visit squid official site.

Jumat, Januari 08, 2010

SheevaPlug - a Debian home server in a wall-wart

Personally I have always been interested in unusual hardware. Coming from a background in electronics, I tend to find "standard" computer hardware rather boring and always like to experiment with stuff that is off the beaten path. So I was thrilled when I found out about the Linux-powered Marvell SheevaPlug and ordered one right away from GlobalScale Technologies for only US$99. My intended project was replacing my ageing and power-hungry home server with this tiny, power-saving device.

System-level decisions

The SheevaPlug (pictured on the left) is an ARM-based computer with a 1.2 GHz processor, 512 MB of RAM and 512 MB of Flash memory, a Gigabit Ethernet port and a USB host connector, all rolled into the tiny form factor of a wall-wart power adapter. It is offered as a development kit in the hope that developers will find cool things to do with it and jump start a new concept called "plug computing". Since its introduction, several web sites have sprung up that provide valuable information to get it up and running for a variety of applications.

Installing Linux on a device like this is nothing like the standard pop-in-a-CD-and-go install process we are accustomed to when installing Linux on a normal PC. For one thing, there is no local user interface in the form of a monitor and keyboard. There is also no CD drive, and the device has no BIOS, instead it has a powerful open-source boot-loader called U-Boot that is quite famous in embedded systems circles.

The SheevaPlug comes with a stripped-down Ubuntu already pre-installed on the Flash drive and, for many uses as a standard file or web server, this may be just fine. But I use my home server as a MythTV backend, and I was surprised to find that the pre-installed Ubuntu does not have any kernel modules installed. This caused my USB TV tuner not to be recognized. I might have been able to hack in the right modules, but since I was going to add an external USB hard drive to store network backups and recorded TV shows anyway, I decided to leave the Ubuntu installation on the Flash drive alone and install a Debian system on the USB hard drive instead.

In case someone would like to install a fresh Ubuntu, it is worth noting that the ARM edition of Ubuntu 9.10 is not compatible with the SheevaPlug processor. Ubuntu 9.10 uses the ARMv6+VFP instruction set, while the SheevaPlug processor can only handle ARMv5 instructions. As far as I know, every other distro with an ARM branch should work though, as does Ubuntu 9.04.

A quick note on running a MythTV backend on the SheevaPlug. While the SheevaPlug has a processor that is quite capable of handling many server-related workloads, it is missing a floating point unit which causes media encoding performance to be pretty poor. In my setup, I only receive over-the-air HDTV, and the incoming MPEG2 stream can be dumped straight to the hard drive without requiring extra encoding. If you were to try to make MythTV on a SheevaPlug record analog TV though, the results would likely be very poor, since the SheevaPlug doesn't have the muscle to handle the required encoding in real time. As always, use the right tool for the task. In my case, not requiring additional encoding, the SheevaPlug handles the backend tasks for both playback of recorded shows and live TV playback with time-shifting just fine.

Installation

After I had already started this project, I found out that there are different ways to install Debian on the SheevaPlug that are probably easier than what I did, but since I didn't use them, I can't comment on them here. Instead I followed the manual bootstrapping procedure described here which is probably harder, but worked well for me nonetheless. The initial step needs to be performed on a different machine that is already running Debian. I didn't follow the procedure to the letter but made some changes to customize my system. For one thing, instead of Debian "unstable", I decided to install Debian "testing". It has a kernel that is recent enough to support my TV tuner (an ATI TV Wonder 600 USB, well supported under Linux), and it is more stable than Debian's "unstable" branch.

I customized /etc/hostname, /etc/network/interfaces and /etc/fstab to fit my network and system. I decided to partition the USB hard drive to have an ext3 system partition, a 1 GB swap partition and use the rest of the drive as a JFS file system that would hold network storage, backups and MythTV recordings. I chose the lesser known JFS file system because it deals well with the large files generated by MythTV and it is well know to be light on CPU usage, a marked advantage for a low-end system like this one. I decided to skip some of the read-only-root recommendations listed in the procedure since I was not using a Flash storage device but a real hard drive.

With my hard drive now set up with the first stage of the bootstrap system, it was time to hook it up to the SheevaPlug and give it a spin. Since I needed to hook up both a USB hard drive and a USB tuner, I had to add an external USB hub to split the one USB connection on the SheevaPlug into four. I do wish the manufacturer would have included a USB hub in the SheevaPlug hardware so more than just one USB connector would be available, but alas, an external hub does the trick.

The SheevaPlug has no connection for a screen, instead the initial console is accessed through a separate USB device connection that provides a virtual serial port. In fact, two virtual serial ports are provided through this connection: one provides JTAG connectivity for very low-level debugging, the other one provides a serial console at 115,200 bps. On a Linux system, these virtual serial ports can be accessed as /dev/ttyUSBx devices, and the serial console ends up being the second device. An inconvenience is that these devices only appear after the SheevaPlug is powered up, so you have to be fast in making your serial terminal connection once the devices appear to be able to stop the automatic bootloader in time.

After changing the bootloader parameters according to the directions in the procedure, I booted and reached a Bash prompt where I could run the second stage of the bootstrap process and the remaining setup. Besides the regular Debian package sources, I also added the debian-multimedia.org repository and was pleasantly surprised how well stocked their ARM repository is. Debian proper has an excellent reputation when it comes to supporting different architectures, but I hadn't expected this to extend to third-party repositories. A MythTV package for ARM was readily available, saving me the lengthy compile-cycle I had been expecting.

Still, I wasn't able to escape compiling entirely. I ran into trouble getting the USB tuner to work, although it is supposed to work just fine under Linux. The kernel always failed to load the firmware, although I had added it according to the instructions, and the kernel could find the file just fine, but then would error out trying to add a duplicate device node. Plugging the tuner in to my netbook running sidux, it worked just fine out of the box. This had me stumped for a while, but eventually I traced the problem down to a difference in how the Debian ARM and x86 kernels are configured. The ARM kernel has an option set to have the I2C device file system compiled into the kernel, while this is a module in the x86 kernel. The USB tuner uses components that connect to each other using the I2C bus, and both the I2C device file system and the TV tuner driver were trying to create device nodes for these components. I solved the issue by having APT download the kernel sources, copying the standard kernel configuration from the /boot directory, changing this troublesome option and recompiling the kernel.

I finished my system by using apt-get to install SSH, Samba, SWAT, MySQL, MythTV, rsync and probably some other stuff I forgot. How to set all these up is beyond the scope of this article and works pretty much the same as on any other Debian system, so plenty of information is available. The only thing that is unusual and that may confuse people is how to run mythtv-setup, since this is a Qt program and the SheevaPlug has no native GUI interface. The answer is that you can use ssh -X to log in to the SheevaPlug with port forwarding, and then when you run mythtv-setup, the user interface will be exported to the machine you're logging in from.

* * * * *
Conclusion


This write-up was intended as a very high-level review of my experience setting up this unusual system, and is by no means a step-by-step walkthrough. There is plenty of detailed information available online on websites such as plugcomputer.org and computingplugs.com that can prove invaluable to get things working on the SheevaPlug. As remarked before, the system is sold as a developer's kit and setting it up is definitely not for the faint of heart or for those who avoid the terminal like the plague. In the end, I had a lot of fun getting this to work and the system is working beautifully. I learned a lot in the process and am amazed yet again at how flexible Debian is as an operating system for just about any computer, even embedded systems like this one.

About the author. Patrick Van Oosterwijck is an embedded software developer who in his professional life spends most of his days designing embedded systems and writing software for micro-controllers, usually on bare-metal devices without operating systems. His interest in Linux started about six years ago and since then he has experimented with everything from SuSE and Ubuntu to Gentoo and Buildroot. The last couple of years he has worked on several projects that apply Linux to embedded systems running on x86, Blackfin and ARM processors.

taken from distro watch issue

Selasa, Januari 05, 2010

What New on Linuxmint 8 Helena

Dekstop view of linuxmint, nice look

This is Linux Mint 8, codename Helena, based and compatible with Ubuntu 9.10 Karmic Koala and its repositories.

New features

Based on Ubuntu 9.10 Karmic Koala, Linux 2.6.31, Gnome 2.28 and Xorg 7.4, Linux Mint 8 "Helena" features a lot of improvements and the latest software from the Open Source World.

Featured improvements in this release: OEM installation, possibility to ignore updates, configurable menu places, multiple selection in the Software Manager, new system tray File Uploader with support for drag and drop and mutiple files uploads.

For complete what's new on Linux Mint you can visit LinuxMint Official site.

to download the installer just click here.