tag:blogger.com,1999:blog-14225918118632997412024-03-04T23:27:01.463-08:00NSLU2 DEBIAN GUIDE SOURCEeasy debian guides for everyone...;)aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-1422591811863299741.post-6959997490155109962012-10-19T01:53:00.000-07:002012-10-22T14:01:24.318-07:00Debian Squeeze on NSLU2After a very long time, I am updating the system and installing everything all over again. Here is the list of commands from ground up for those interested and for me to reference in the future.
Installation of Debian is unpack "style" from now on. You can read the steps here. IN fact it is much faster this way. Follow the easy steps in here
<br />
<blockquote>
<a href="http://www.cyrius.com/debian/nslu2/unpack.html">http://www.cyrius.com/debian/nslu2/unpack.html</a>
</blockquote>
write the firmware to the NSLU2, and unpack the new Debian to the usb drive. One change on the new untarred Debian before you boot though, instead of DHCP use a static ip so you know where to ssh.
<br />
<blockquote>
nano /etc/network/interfaces
<br />
<blockquote>
</blockquote>
# This file describes the network interfaces available on your system<br />
# and how to activate them. For more information, see interfaces(5).<br />
# The loopback network interface<br />
auto lo<br />
iface lo inet loopback<br />
# The primary network interface<br />
allow-hotplug eth0<br />
#iface eth0 inet dhcp<br />
iface eth0 inet static<br />
address 192.168.1.77<br />
netmask 255.255.255.0<br />
network 192.168.1.0<br />
broadcast 192.168.1.255<br />
gateway 192.168.1.1</blockquote>
change the root password:
<br />
<blockquote>
passwd root
</blockquote>
regenerate the SSH key (since the private key is included in the base system on my web page) by running:
<br />
<blockquote>
rm /etc/ssh/ssh_host*<br />
dpkg-reconfigure openssh-server</blockquote>
Change your timezone and make it permanent
<br />
<blockquote>
dpkg-reconfigure tzdata
</blockquote>
or you can do this for different users
<br />
<blockquote>
tzdata <br />
</blockquote>
then accordingly, for example
<blockquote>
echo "TZ='America/New_York'; export TZ" >> /root/.profile <br />
</blockquote>
then keep on updating the clock and upgrade the system.
<br />
<blockquote>
ntpdate pool.ntp.org <br />
apt-get update<br />
apt-get dist-upgrade</blockquote>
Upgrade your locales
<br />
<blockquote>
dpkg-reconfigure locales
</blockquote>
change the hostname.
<br />
<blockquote>
/etc/hostname
</blockquote>
change the hostname and domain in the second line.
<br />
<blockquote>
/etc/hosts
</blockquote>
And some stuff from oldies, I just give the changes in here, if there is any. I guess I became lazy...
<br />
<br />
Reduce hammering on flash drive and install web server <br />
<a href="http://nslu2guide.blogspot.com/2008/12/webserver-installation.html">http://nslu2guide.blogspot.com/2008/12/webserver-installation.html</a>
<br />
<br />
<br />
Install cache for php. Give some breath space to slug<br />
<a href="http://nslu2guide.blogspot.com/2008/12/lighttpd-eaccelerator-support.html">
http://nslu2guide.blogspot.com/2008/12/lighttpd-eaccelerator-support.html
</a><br />
Project hosted on a new address:
<blockquote><a href="http://eaccelerator.net/">http://eaccelerator.net/</a></blockquote><br />
and configure like <br />
<blockquote>./configure --with-eaccelerator-shared-memory --with-php-config=/usr/bin/php-config --with-eaccelerator-userid=www-data --with-eaccelerator-content-caching
</blockquote>
<br />
<br />
<br />
You may want to read-write ntfs drives<br />
<a href="http://nslu2guide.blogspot.com/2009/01/using-ntfs-formatted-drives-in-debian.html">http://nslu2guide.blogspot.com/2009/01/using-ntfs-formatted-drives-in-debian.html</a>
<br />
<br />
<br />
Free some memory, reduce startup time etc.<br />
<a href="http://nslu2guide.blogspot.com/2009/01/free-more-memory.html">
http://nslu2guide.blogspot.com/2009/01/free-more-memory.html
</a>
<br />
<br />
<br />
Fine tune slug <br />
<a href="http://nslu2guide.blogspot.com/2009/01/fine-tuning-for-your-slug.html">
http://nslu2guide.blogspot.com/2009/01/fine-tuning-for-your-slug.html
</a>
<br />
<br />
<br />
Make slug communicate<br />
<a href="http://nslu2guide.blogspot.com/2009/01/if-you-want-to-be-able-to-send-e-mails.html">
http://nslu2guide.blogspot.com/2009/01/if-you-want-to-be-able-to-send-e-mails.html
</a><br />
instead of nail: <br />
<blockquote>apt-get install heirloom-mailx
</blockquote>
<br />
<br />
<br />
Protect your privacy <br />
<a href="http://nslu2guide.blogspot.com/2009/04/lighttpd-password-protected-folders.html">
http://nslu2guide.blogspot.com/2009/04/lighttpd-password-protected-folders.html
</a>
<br />
<br />
<br />
Take slug to another room<br />
<a href="http://nslu2guide.blogspot.com/2010/05/usb-wireless-adapter.html">
http://nslu2guide.blogspot.com/2010/05/usb-wireless-adapter.html
</a>
changes:<br />
<blockquote>deb http://ftp.de.debian.org/debian squeeze main non-free</blockquote>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com3tag:blogger.com,1999:blog-1422591811863299741.post-5096380005258430762010-05-21T22:25:00.000-07:002010-05-21T22:36:00.864-07:00Adding USB wireless adapterIf you have a Belkin USB wireless adapter you can follow this to make it work.<br /><br />lsusb listed my adapter as<br /><br /><blockquote>USB: 050D:705A Belkin Components F5D7050A Wireless Adapter</blockquote><br /><br />Then add a "non-free" component to /etc/apt/sources.list for your Debian version. <br /><br /><blockquote>deb http://ftp.us.debian.org/debian lenny main contrib non-free</blockquote><br /><br />Update the list of available packages, then install the firmware-ralink and wireless-tools packages:<br /><blockquote><br />aptitude update<br />aptitude install firmware-ralink wireless-tools</blockquote><br /><br />Necessary module is rt73usb, check if it is loaded with lsmod. If it is not loaded you can load it by writing modprobe rt73usb.<br /><br />Verify your device has an available interface:<br /><br /><blockquote>iwconfig</blockquote><br /><br />Raise the interface to activate the radio, for example:<br /><br /><blockquote>ifconfig wlan0 up</blockquote><br /><br />You can check the nearby wireless routers by writing<br /><br /><blockquote>iwlist wlan0 scan</blockquote><br /><br />Good Luckaspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-19713587170119997932010-04-27T12:27:00.000-07:002010-04-27T12:30:46.715-07:00Selling my NSLU2...Hi all,<br /><br />I decided to sell my NSLU2 for a more powerful new gadget. Asking for $50.<br />It is underclocked and has 5 usb ports (3 more added by me)<br />Everything works great, and comes with adapter and ethernet cable.<br />If interested, leave a comment :) <br />Thanks<br /><br />(Only USA shipping)aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com2tag:blogger.com,1999:blog-1422591811863299741.post-37319424557795541032010-01-24T11:54:00.001-08:002010-01-24T14:03:03.814-08:00WebCam on SlugHi all,<br />I just added an old webcam on my slug and wanted to share in here. First of all if you want to add webcam to your system go ahead and upgrade your system as explained in the previous post.<br /><br />Anyway, I upgraded my system and plugged in the webcam to one of the empty slots. Surprisingly the green webcam light was on which means it if successfully loaded. I checked lsusb<br /><blockquote>Bus 002 Device 003: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam</blockquote><br />then video port by typing ls /dev/video* and I had /dev/video0 in there. But when I tried to get some pictures it failed...<br /><br />It was automatically loading zc0301 module (check with lsmod) but I soon realized that this module bad. I had to prevent that module loading. To do so,<br />nano /etc/modprobe.d/blacklist <br />and add<br /><blockquote>blacklist zc0301</blockquote><br /><br />We need another module at this point, gspca.To load this module debian has an easy and beatiful application module-assistant. Go ahead and install it<br /><br /><blockquote>apt-get install module-assistant</blockquote><br /><br />then to install gspca module<br /><br /><blockquote>m-a auto-install gspca</blockquote><br /><br />That is it. Your webcam should be ready now. To test<br /><br /><blockquote>apt-get install streamer</blockquote><br />then<br /><blockquote>streamer -t 10 -r 2 -o foobar00.jpeg </blockquote><br /><br />should capture ten frames, two per second.<br /><br />To setup a system that captures images and put them to your webserver you can use webcam software. To install write<br /><br /><blockquote>apt-get install webcam</blockquote><br /><br />After that you should put your config file to /root/.webcamrc.<br /><blockquote>nano /root/.webcamrc</blockquote><br /><br />paste the lines below <br /><br /><blockquote><br />[grab]<br /> device = /dev/video0<br /> text = "NSLU2 webcam %Y-%m-%d %H:%M:%S (EST)"<br /># infofile =<br /> fg_red = 255<br /> fg_green = 255<br /> fg_blue = 255<br /> width = 640<br /> height = 480<br /># delay = number of seconds between snapshots<br /> delay = 30<br /> wait = 1<br /> input = ZC301-2<br /># norm = webcam<br /> rotate = 0<br /> top = 0<br /> left = 0<br /> bottom = -1<br /> right = -1<br /> quality = 100<br /> trigger = 0<br /> once = 0<br /># archive =<br />[ftp]<br /> host = 127.0.0.1<br /> user = root<br /> pass = xxxx<br /> dir = /var/www/webcam<br /> file = webcam.jpeg<br /> tmp = uploading.jpeg<br /> passive = 1<br /> debug = 0<br /> auto = 0<br /># local = 1 means just use the local directory specified above, do not use ftp or ssh<br /> local = 1<br /> ssh = 0<br /><br /></blockquote><br /><br />now if you type <br /><blockquote>webcam</blockquote><br /><br />it should start capturing images and put them to the folder you specified. There is something to mention though <br /><blockquote>input = ZC301-2</blockquote><br />this line is catchy. I guess it differs at different webcams. To learn the correct input name of your device first install v4l-conf<br /><blockquote>apt-get install v4l-conf</blockquote><br />Then,<br /><blockquote>v4l-info | grep name</blockquote><br />should give you the correct name. In my case I got<br /><blockquote>ioctl VIDIOCGTUNER: Invalid argument<br />ioctl VIDIOCGAUDIO: Invalid argument<br /> name : "Z-star Vimicro zc0301p"<br /> name : "ZC301-2"</blockquote><br /><br />and I used ZC301-2 as the input.Try and see what is yours.<br />After the setup if you want it to work automatically after restart you can set up a crontab:<br /><br /><blockquote><br /> crontab -e<br /> @reboot /usr/bin/webcam<br /></blockquote><br />I hope this helps someone...aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com22tag:blogger.com,1999:blog-1422591811863299741.post-69200707144148000462009-11-27T00:10:00.000-08:002009-11-27T00:19:32.321-08:00Upgrade SlugWell it has been some time since I installed my server. By the way it still goes as it should, no problem so for. Today, i needed to upgrade the packages on the slug, so I decided to write it in here too.<br /><br />As it noted<br /><br /><blockquote>apt-get -u upgrade</blockquote><br /><br />It's useful to run this command with the -u option. This option causes APT to show the complete list of packages which will be upgraded. Without it, you'll be upgrading blindly<br /><br />After upgrading the packages on the system we may also need to check if there is a new debian version. Type:<br /><br /><blockquote>apt-get -u dist-upgrade</blockquote><br /><blockquote><br />Reading package lists... Done<br />Building dependency tree <br />Reading state information... Done<br />Calculating upgrade... Done<br />The following NEW packages will be installed:<br /> linux-image-2.6.26-2-ixp4xx<br />The following packages will be upgraded:<br /> apache2-mpm-prefork apache2-utils apache2.2-common apt apt-utils base-files bind9-host dbus dbus-x11 dhcp3-client dhcp3-common dnsutils gnupg gpgv<br /> libapache2-mod-php5 libapr1 libaprutil1 libavcodec51 libavformat52 libavutil49 libbind9-40 libcurl3 libdbus-1-3 libdns45 libexpat1 libfreetype6<br /> libgd2-xpm libgnutls26 libisc45 libisccc40 libisccfg40 libkrb53 liblwres40 libmysqlclient15off libnewt0.52 libpam-modules libpam-runtime libpam0g<br /> libpng12-0 libpq5 libsasl2-2 libssl-dev libssl0.9.8 libvolume-id0 libvorbis0a libvorbisenc2 libvorbisfile3 libxcb-xlib0 libxcb1 libxml2<br /> linux-image-2.6-ixp4xx linux-image-2.6.26-1-ixp4xx linux-libc-dev mt-daapd mysql-common openssl php5 php5-cgi php5-common php5-dev php5-gd<br /> php5-sqlite screen tzdata udev wget whiptail x11-common<br />68 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<br />Need to get 54.6MB of archives.<br />After this operation, 33.8MB of additional disk space will be used.<br />Do you want to continue [Y/n]?<br /></blockquote><br /><br />Unfortunately that much of disk space is too much for me now. I only have 1 gb of flash as the main drive so it should wait for now. But you might need to upgrade ...<br /><br />Happy sluggingaspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-62807074910611801992009-04-05T03:27:00.000-07:002009-04-14T16:01:12.001-07:00Lighttpd password protected foldersIf you have followed these guides you should already have a Lihgttpd webserver with some funky things going on. In some cases you will want to password protect a directory. This is how it is done...<br /><br />Edit /etc/lighttpd/lighttpd.conf <br /><blockquote>nano /etc/lighttpd/lighttpd.conf</blockquote><br />Add "mod_auth" to server.modules section. It should look like...<br /><blockquote>server.modules = (<br /> "mod_access",<br /> "mod_fastcgi",<br /> "mod_alias",<br /> "mod_compress",<br /> "mod_auth",</blockquote><br /><br />Then to the end of the lighttpd.conf add <br /><blockquote><br />$HTTP["url"] =~ "^/DIRECTORY_YOU_WANT_TO_PROTECT/" {<br />auth.debug = 2<br />auth.backend = "plain"<br />auth.backend.plain.userfile = "/home/PASSWORD_FILE.pass"<br />auth.require = ( "/DIRECTORY_YOU_WANT_TO_PROTECT/" =><br />(<br />"method" => "basic",<br />"realm" => "Password protected area",<br />"require" => "user=aspedisca"<br />)<br />)</blockquote><br /><br /><br />You should create a password file at the location you entered above. This file should include a line saying. <br /><blockquote>username:secretepassword</blockquote><br />Change acording to your needs.You may add more than one user though. Make sure that the password file can be read by lighttpd.<br /><blockquote>chown lighttpd:lighttpd /home/PASSWORD_FILE.pass</blockquote><br />Also change the part saying "/DIRECTORY_YOU_WANT_TO_PROTECT/". It should be relative to your www directory. <br />Finally, restart lighttpd server:<br /><blockquote>/etc/init.d/lighttpd restart</blockquote><br /><br />Test to reach your directory by using your beloved web browser and see if it works..aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com4tag:blogger.com,1999:blog-1422591811863299741.post-88677995988749659932009-03-20T21:17:00.000-07:002009-03-20T21:51:26.529-07:00Choose the correct disk to boot...I was having some troubles while booting the device as I have two more disks attached to the slug other than the booting flash drive. It was basically looking for the wrong drive to boot so it was hanging during the boot. You can actually solve the sittuation by mounting the drives after the boot as I did before but this is a server right :)<br /><br />To avoid confusion boot without any other disk attached then find out the UUID's of your disk partitions. <span style="font-weight: bold;">fdisk -l</span> will help you to see your existing partitions. To find UUID's of your partitions write:<br /><blockquote># vol_id /dev/sda1<br /># vol_id /dev/sda2<br /># vol_id /dev/sd...<br /></blockquote><br /><br />I had a problem with my swap partition. I saw that it had no UUID. If you encounter a situation like this follow :<br /><blockquote><br /># swapoff -a<br /># mkswap /dev/sdXX<br />replace XX according to your system.I wrote mkswap /dev/sda5 for my system. Then type<br /># swapon -a <br />to make te swap partition active again...</blockquote><br /><br />Apply the vol_id /dev/sdXX for all your partitions and look for "ID_FS_UUID = ..." . The long alphanumeric string is important for us. After learning the UUID's of all your partitions modify your /etc/fstab as seen on the screenshot.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyxkrc6eJFBePdGinbwj6Qi4bIeH492_4wf3DxBwgQSzIx9PWJeCq4B_S5cS9guqbhJ_V2PV3QCvXUSvaebKMbJN31dFyR3eUg5vSUgI07dpl6p6Sa2Dg7So2p0FKc7zObUYMKhfQGZgA/s1600-h/fstab.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 115px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyxkrc6eJFBePdGinbwj6Qi4bIeH492_4wf3DxBwgQSzIx9PWJeCq4B_S5cS9guqbhJ_V2PV3QCvXUSvaebKMbJN31dFyR3eUg5vSUgI07dpl6p6Sa2Dg7So2p0FKc7zObUYMKhfQGZgA/s400/fstab.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5315495934171507522" /></a><br />Almost done. You also have to modify the kernel as it looks for the booting device before fstab. To do this simply write. (backup your existing flash vefore this. Read previous post)<br />apex-env setenv cmdline 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug root=/dev/disk/by-uuid/XXXXXX'<br /><br />change the XXXXXX section with the UUID of your root partition. For my case I wrote :<br /><blockquote>apex-env setenv cmdline 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug root=/dev/disk/by-uuid/e41f5b0d-1b1b-4e84-a2db-a70e2355c8db'</blockquote><br /><br />That is all.Plug all your drives and restart to see if it starts without any complain...aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com3tag:blogger.com,1999:blog-1422591811863299741.post-53050509526621510622009-03-14T23:15:00.000-07:002009-03-14T23:40:25.111-07:00Backup your NSLU2 flashed imageIt takes like forever to install debian on slug but it is indispensable. So, take a backup your flashed image and use it next time. Actually I still wonder why there is no preinstalled version of debian for NSLU2, like, prepare the flash disk + flash the image tada....<br />Anyway to do the trick use.<br /><br /><blockquote>cat /dev/mtdblock* > image.bin</blockquote><br /><br />To restore it next time, use either upslug2 or <a href="http://www.nslu2-linux.org/wiki/Main/SercommFirmwareUpdater">windows</a> flashing utility...<br />Cheers<br /><br />P.S. I found the trick. They already did the pre-prepared version of debian for slug. I think <a href="http://www.cyrius.com/debian/nslu2/unpack.html">manual installation</a> is way better and faster.aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com2tag:blogger.com,1999:blog-1422591811863299741.post-11714690100900294662009-02-18T14:42:00.000-08:002009-03-17T08:05:14.977-07:00FireStats - Top 40 php script - guide<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW-YqkXX_zTSo-LVK5EcBNRIODOE3PgnwoMM_HBd_5GMvW6Vetb6sugIZuMobZE5Xif-sff1-RnM0ghKpxBstrBxhLBk718otFW1L3Dzl_65HfOdpRnRwi7eA9v0FJ2_NQjOQiDqHXzbo/s1600-h/ffstats.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 84px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW-YqkXX_zTSo-LVK5EcBNRIODOE3PgnwoMM_HBd_5GMvW6Vetb6sugIZuMobZE5Xif-sff1-RnM0ghKpxBstrBxhLBk718otFW1L3Dzl_65HfOdpRnRwi7eA9v0FJ2_NQjOQiDqHXzbo/s200/ffstats.png" alt="" id="BLOGGER_PHOTO_ID_5304277051271721762" border="0" /></a><br />I have been using mt-daapd since I had the slug but I had some problems to make firestats work with it (Unfortunately, it does not have any installation procedure afaik...). If you do not know what firestats is maybe you should refer to <a href="http://forums.fireflymediaserver.org/viewtopic.php?f=9&t=7006">this link</a>. It is a very nice statistics utility for your mt-daapd server. Let us start with the guide how to make it work :)<br />First download the utility from <a href="http://www.sonichouse.pwp.blueyonder.co.uk/firestats.zip">here</a> or <a href="http://rapidshare.com/files/210316713/firestats.tar.html">here</a>. Unzip the package to a directory under /var/www.<br /><blockquote>For example: /var/www/firestats</blockquote><br />You need some packages to install if you have noe doen so...<br /><blockquote>apt-get install php5-common<br />apt-get install php5-sqlite</blockquote><br />Almost done. The script is written for unslung I guess so we need to adjust some parameters. You need to change some of the lines in functons.php. <span style="font-weight: bold;">I suppose your database is sqlite3 and the database file is "/var/cache/mt-daapd/songs3.db" </span><br />Open functions.php<br /><blockquote>nano /var/www/firestats/functions.php</blockquote><br />Find the line <blockquote><br />#$DSN="sqlite:/opt/var/mt-daapd/songs3.db"; </blockquote><br />uncomment it and change to<br /><blockquote>$DSN="sqlite:/var/cache/mt-daapd/songs3.db"; </blockquote><br />Also find the lines (total two lines)<br /><blockquote>$config['FIREFLY']['DSN'] = "sqlite:/opt/var/mt-daapd/songs3.db";</blockquote><br />and change to<br /><blockquote>$config['FIREFLY']['DSN'] = "sqlite:/var/cache/mt-daapd/songs3.db";</blockquote><br />The last thing to do, open the php.ini (/etc/php/apache/php.ini) file and add the lines below to the list of extensions.<br /><blockquote>extension=pdo.so<br />extension=sqlite.so</blockquote><br />I guess you are done. Open your webbrowser and check if it works...<br />(This guide is for firestats ver. 1.28)</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com5tag:blogger.com,1999:blog-1422591811863299741.post-13430025392831413862009-02-18T14:24:00.000-08:002009-02-19T09:07:09.794-08:00Open up some space on your Flash Drive<div style="text-align: justify;">It has been some time since I post the last guide. I had some trouble with my slug since then. I decided to add some additional USB ports to my slug. Unfortunately while opening the case I broke one of the capacitors on the board (My bad, I was careless). Anyway, I managed to replace it and slug is alive again :).<br />I installed the debian on the 1gb usb drive. Since then I had some problems with the available space. So how to open more space for new application<code></code>s :)<br /><br /><span style="font-weight: bold;">1)</span> Remove cached *.deb files<br />When we run apt-get command, it downloads and caches the package in /var/cache/apt/archives directory. So we can delete those to get some space...<br /><br /><blockquote># cd /var/cache/apt/archives<br /># du –ch<br /># rm –f *.deb</blockquote><br /><br /><span style="font-weight: bold;">2)</span> After installing anything with apt-get install, localepurge will remove all translation files and translated manpages in languages you cannot read. This can save you several megabytes of disk space, depending on the packages you have installed.<br />To configure localepurge edit : /etc/locale.nopurge<br /><br /><blockquote># apt-get install localepurge</blockquote><br /><br /><span style="font-weight: bold;">3)</span> Backup and remove old log files in /var/log/<br /><br />Now, according to your configuration you should have at least 100MB of free space. Cheers :)</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-19831587883196653842009-01-18T09:56:00.000-08:002010-01-23T23:39:49.356-08:00Installing and using Screen<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjItrMgSQtxi6zBqWE3f8lvccXb_nwdFsAR4ZskvjB1wxRELTAmcZnl0T9VOSSVEelrBAbGE-AvYU2Vqj5KxsSE-Qkab-1Us4oUIp_uJEo9u3uBvLhvnHo8aNeS08YqUizEo_0giFDQsf4/s1600-h/1.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 124px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjItrMgSQtxi6zBqWE3f8lvccXb_nwdFsAR4ZskvjB1wxRELTAmcZnl0T9VOSSVEelrBAbGE-AvYU2Vqj5KxsSE-Qkab-1Us4oUIp_uJEo9u3uBvLhvnHo8aNeS08YqUizEo_0giFDQsf4/s200/1.png" alt="" id="BLOGGER_PHOTO_ID_5292706574885046434" border="0" /></a><br />The <a href="http://www.gnu.org/software/screen/screen.html">GNU Screen Homepage</a> description for screen is :<br /><div style="text-align: justify;"><br />"Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells."<br />It is a very useful tool for slug IMO. For example sometimes it takes too much time to install something on slug. You can easily open a screen page. Make the installation process in there and you can close the terminal screen. You won't loose any data. As you get familiar with it you can use it for many other purposes. You should first install it if you still don't have.<br /><blockquote>apt-get install screen</blockquote><br />After installing screen, it is time to learn some of the basic screen commands. If you run screen<br /><blockquote>screen </blockquote><br />You will see some text, ending with "Press Space or Return to end". Press space and you will be presented with a clean shell window. Test it with<br /><blockquote>ls /var</blockquote><br />The fun part begins when you first hit <span style="font-weight: bold;">ctrl+a then d</span>. You will return to the main session with a line saying that detached. You can return to the screen session by writing <span style="font-weight: bold;">screen -R</span> anytime. Even after closing the terminal window and coming back. So you can also use this technique to run shell scripts(I am running my shell script that I mentioned two post ago with screen). Anyway, you can find the list of some useful commands below. Just try an learn.<br /><span style="font-weight: bold;">screen</span> - To start screen<br /><span style="font-weight: bold;">screen -R </span>- To return to the detached screen session<br /><span style="font-style: italic;">In the screen session</span><br /><span style="font-weight: bold;">ctrl+a then d</span> - To detach from screen(Still working on the background)<br /><span style="font-weight: bold;">Ctrl + a then c</span> - To create another session in screen (multiple windows).<br /><span style="font-weight: bold;">Ctrl + a then Ctrl + a</span> - Toggle between multiple shells<br /><span style="font-weight: bold;">Ctrl + a then A</span> - To rename the current window (Capital A)<br /><span style="font-weight: bold;">Ctrl + a then "</span> - To see the list of windows and select which you want<br /><span style="font-weight: bold;">Ctrl + a and S</span> - To split your window into two (Capital S)<br /><span style="font-weight: bold;">Ctrl + a and TAB</span> - To move between the two halves of the split windows<br /><span style="font-weight: bold;">Ctrl + a then k</span> - To kill the current window (you can also use exit)<br /><br />Tip of the day :)<br />You can setup a small status bar across the bottom of the window which show you how many windows you have open, and which one you are working with.<br />First backup the original config file in case of a problem<br /><blockquote>cp /etc/screenrc /etc/screenrc.backup</blockquote><br />then edit the config file<br /><blockquote>nano /etc/screenrc</blockquote><br />Find and change the lines to<br /><blockquote>hardstatus on<br />hardstatus alwayslastline<br />hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "</blockquote>That is all, restart screen and you will see a blue bar at the bottom. Cheers...<br /><a href="http://www.debian-administration.org/articles/34">Link</a> to the original article.<br /></div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com1tag:blogger.com,1999:blog-1422591811863299741.post-15711648277548145302009-01-18T00:52:00.000-08:002009-01-18T01:31:14.996-08:00Mount NTFS with extended character support<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrwM-RhSxiNsQdKIV71Eec5LVyh4G9kp1wpdB-IUgcHnSQpVj08jMJlkSXNRchRhqHJlHOWEMoyv6MsWrL1vt3b_JrqudXMlbTKfgXzIDWtMBFNkHBjzIETZ3fpozVjX9gXeIC3UNxEM/s1600-h/L5F.gif"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 138px; height: 108px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrwM-RhSxiNsQdKIV71Eec5LVyh4G9kp1wpdB-IUgcHnSQpVj08jMJlkSXNRchRhqHJlHOWEMoyv6MsWrL1vt3b_JrqudXMlbTKfgXzIDWtMBFNkHBjzIETZ3fpozVjX9gXeIC3UNxEM/s200/L5F.gif" alt="" id="BLOGGER_PHOTO_ID_5292563689542138946" border="0" /></a><br />I know there are a lot of people out there having problems with this. The problem is you just can't even see the files which has names containing different character sets. In my case, I was having problems to read files with Turkish characters. AFAIK this was one of the major problems with the stock firmware. Anyway I have the solution for my case and I think you will easily adapt the code for your use.<br />DON'T FORGET THAT THIS GUIDE IS FOR TURKISH CHARACTER SET. YOU SHOULD ADAPT "tr_TR.UTF-8" AND OTHER NECESSARY FIELDS IN EACH CODE FOR YOUR CASE.<br /><br />First look at if you have the character set you want.<br /><blockquote>locale -a</blockquote><br />If you can't see something like tr_TR.UTF-8 write<br /><blockquote>localedef -i tr_TR -f UTF-8 tr_TR.UTF-8</blockquote><br />After it finishes, (it could take some time) you should see tr_TR.UTF-8 when you write locale -a.<br /><br />Then mount NTFS formatted drive<br /><blockquote>mount -t ntfs-3g /dev/sdb1 /mnt/hdd -o force,locale="tr_TR.utf8"</blockquote><br />Don't forget that you should have /mnt/hdd directory to mount. You should now see the "special" files without any problem. Hope this helps...</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-40896039185660690722009-01-15T10:19:00.000-08:002009-01-15T10:33:44.341-08:00Spindown mail alert!!!<div style="text-align: justify;">In this very short journey of linux, I learned lots of things and I am going to install Gentoo linux to my laptop very soon. One of the most exciting thing happened to me in this journey was facing a problem and solving it on my own.<br /><br />I installed the spindown code as I mentioned earlier in this blog and everything was perfect. But after some time I wanted to know the exact times of spindown and spinup. It would be great to get these exact times to my email without having a log file. ( I want to reduce log file traffic as much as I can in my NSLU2 because I use usb flash disk as a root drive.)<br /><br />So, for the first time I wrote a shell script for this purpose and now I get an email when it spins up or spins down including some other datas like current free ram, uptime vs ....<br /><br />It is doing great for me and I will post the script in here after some adjustments. Stay in contact :)</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-18291561641800912102009-01-10T12:23:00.000-08:002009-01-10T18:12:23.934-08:00Sending email using either ISP or Gmail account<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCsY0ixzTPlrZkRhl_W1YCVbHl6YOptHDHMgXmYkLoQazQEUs7chJcS5022-CoaAdYQVQ03Jd63F_l4yEYyrNCmzLs2MNr7g-SpfX9CmeNqcdf1NhKDlms0TG0GAy9CtxG03WDuSzE-00/s1600-h/emailIcon.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 121px; height: 127px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCsY0ixzTPlrZkRhl_W1YCVbHl6YOptHDHMgXmYkLoQazQEUs7chJcS5022-CoaAdYQVQ03Jd63F_l4yEYyrNCmzLs2MNr7g-SpfX9CmeNqcdf1NhKDlms0TG0GAy9CtxG03WDuSzE-00/s200/emailIcon.png" alt="" id="BLOGGER_PHOTO_ID_5289770833262685906" border="0" /></a><br /><div style="text-align: justify;">If you want to be able to send e-mails without having to set up a full-fledged MTA like sendmail or exim by just using an isp email account or gmail account follow this tutorial. By the way I only need this to receive log messages to my e-mail regularly, it is not for checking your mails form the slug... I found this tutorial on the net and it was mainly built for ubuntu. I changed and simplified some of the steps to make it easier to use.<br /><br />Install the needed programs<br /><blockquote>apt-get install msmtp<br />apt-get install nail</blockquote><br /><br />Install Thawte certificate for Gmail.(This is necessary for Gmail. I tried and without this it is not working ;) )<br /><blockquote>mkdir -p ~/etc/.certs<br />chmod 0700 ~/etc/.certs<br />cd ~/etc/.certs<br />wget https://www.verisign.com/support/thawte-roots.zip --no-check-certificate<br /><span style="font-weight: bold;"><br />Option 1)</span> Ooops at this step at the original tutorial it says to use unzip. I do not have unzip in my slug and I do not want to install it for one time use. So I copied the zip file to my laptop, unzipped and send to the server again. You could follow either way I gue<br /><span style="font-weight: bold;"><br />Option 2)</span> unzip thawte-roots.zip<br />cp Thawte\ Server\ Roots/ThawtePremiumServerCA_b64.txt ThawtePremiumServerCA.crt<br />Then configure msmtp.Replace UPPERCASE text with your personal settings<br />nano ~/.msmtprc</blockquote><br /><br />Paste the config file given below to the .msmtprc.<br /><br /><blockquote><br /># config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file<br />defaults<br />logfile /var/log/msmtp.log<br /><br /># isp account<br />account isp<br />auth login<br />host SMTP.YOURISP.COM<br />port 25<br />user YOURNAME@ISP.COM<br />from YOURNAME@ISP.COM<br />password *****<br /><br /># gmail account<br />account gmail<br />auth on<br />host smtp.gmail.com<br />port 587<br />user YOURNAME@gmail.com<br />password *****<br />from YOURNAME@gmail.com<br />tls on<br />tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt<br /><br /># set default account to use (from above)<br />account default : gmail</blockquote><br /><br />Change permission of the msmtprc file:<br /><blockquote>chmod 600 ~/.msmtprc</blockquote><br />Configure nail<br /><blockquote>nano ~/.mailrc</blockquote><br />Copy/paste the config file below into .mailrc and make the necessary changes for your congiguration.<br /><blockquote><br /># set smtp for nail<br /># ref: http://ubuntuforums.org/showpost.php?p=4531994&postcount=6<br /># docs: http://msmtp.sourceforge.net/doc/msmtp.html#Configuration-files<br /># isp account (default)<br /># $ nail -s "subject line" -a /path/file recipient@email.com < /path/body.txt<br />set from="YOURNAME@ISP.COM" <br />set sendmail="/usr/bin/msmtp" <br />set message-sendmail-extra-arguments="-a isp" <br /><br /># gmail account <br /># $ nail -A gmail -s "subject line" -a /path/file recipient@email.com < /path/body.txt <br />account gmail { <br />set from="YOURNAME@gmail.com (YOURNAME)"<br />set sendmail="/usr/bin/msmtp" <br />set message-sendmail-extra-arguments="-a gmail"<br />}</blockquote><br />You are all done. Now you can send test messages…<br /><br /><blockquote><br />echo -e "testing email from the command line" > /tmp/test_email<br />nail -s "isp test" YOURNAME@gmail.com < /tmp/test_email nail -A gmail -s "gmail test" YOURNAME@gmail.com < /tmp/test_email </blockquote><br />Check your email accounts for the new messages. You can chech the log file with the command below.<br /><blockquote>nano /var/log/msmtp.log</blockquote><br />This is the procedure I followed to use my gmail account and it worked great. But some said that it is sufficient to use either msmtp or nail for this purpose. So if you know how to do that tell us. I tried that way for a while ago and I could not make it work maybe it is because I did not use certificate. Anyway, hope this helps someone.<br />This is the link to the original tutorial if you want to check <a href="http://phosphorusandlime.blogspot.com/2008/05/ubuntu-command-line-email.html">http://phosphorusandlime.blogspot.com/2008/05/ubuntu-command-line-email.html</a></div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com3tag:blogger.com,1999:blog-1422591811863299741.post-68370719081739310442009-01-08T10:40:00.000-08:002009-01-10T18:12:17.181-08:00Custom 404 error page for your Lighttpd webserver<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD5lWAYac3QSKmht0SeFqjmzKbKJbzG2HEqr8i97jLfYgB5DxcjTrDlM_BJt4gmbCJ9RUATESHoLr1SCA3W6J-jDtSxwJNyoedV_pEiNaIrW80vl-0vRcsFY1vYlb2Xtww0Y6_tIYGzwQ/s1600-h/404Icon.jpg"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 150px; height: 150px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD5lWAYac3QSKmht0SeFqjmzKbKJbzG2HEqr8i97jLfYgB5DxcjTrDlM_BJt4gmbCJ9RUATESHoLr1SCA3W6J-jDtSxwJNyoedV_pEiNaIrW80vl-0vRcsFY1vYlb2Xtww0Y6_tIYGzwQ/s400/404Icon.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5288998485556482258" /></a><br /><div style="text-align: justify;">It would be cool to have a custom 404 error page for your webserver. It is very easy to do thoughh, just edit lighttpd.conf.<br /><blockquote>nano /etc/lighttpd/lighttpd.conf</blockquote><br />find the line below in this config file<br /><blockquote>#server.error-handler-404 = "/error-handler.html"</blockquote><br />and uncomment it to<br /><blockquote>server.error-handler-404 = "/error-handler.html"</blockquote><br />Now, you create a file called error-handler.html in your www root ( for my case /var/www/ ).<br />Restart the server to apply changes<br /><blockquote>/etc/init.d/lighttpd restart</blockquote><br />That is all. You have a custom error page right now. Here is mine :)<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhba03ksmDaumrzrJUHF4Mb-fNfkSUWzEknMAak_kRCc92YIm69ON4OGUCJIfLwSCh4oybzTXpWnL5EneexedySUEto1vsnwYGRx9Vk3LAAijrLuuB36eUvyqgMFJPCZXP7NAcoHbCGycI/s1600-h/Untitled.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 196px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhba03ksmDaumrzrJUHF4Mb-fNfkSUWzEknMAak_kRCc92YIm69ON4OGUCJIfLwSCh4oybzTXpWnL5EneexedySUEto1vsnwYGRx9Vk3LAAijrLuuB36eUvyqgMFJPCZXP7NAcoHbCGycI/s400/Untitled.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5288997967402552146" /></a><br /><br /></div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-43634766540186424122009-01-08T09:09:00.000-08:002009-01-08T10:24:19.662-08:00Fine tuning for your slug<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr-dl8RE4xUkO-PJCVQlgXSHs5GheYczEg1rF7gwDBXIoPFmWf_zMAFH3kzDKoC3U_cu0XXT_UW-mN15Wp5nxO0-u6dqEqE5Ob3Rcn8LJDFUx4oojIC1qzBxNmPqdVKhBdAKvDH8yfaVM/s1600-h/icon_finetuning.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 104px; height: 104px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr-dl8RE4xUkO-PJCVQlgXSHs5GheYczEg1rF7gwDBXIoPFmWf_zMAFH3kzDKoC3U_cu0XXT_UW-mN15Wp5nxO0-u6dqEqE5Ob3Rcn8LJDFUx4oojIC1qzBxNmPqdVKhBdAKvDH8yfaVM/s400/icon_finetuning.png" alt="" id="BLOGGER_PHOTO_ID_5288990464669086130" border="0" /></a><br /><div style="text-align: justify;">Flash disks have limited writing lifetimes so we better use it wise. There are some precautions that you should consider if you are using a flash disk as a root drive for NSLU2. In order to reduce the writings to the flash disk you can find something useful below. Also there are some other "recommended" tweaks for your slug.<br /><br /><span style="font-weight: bold;">1)</span> Syslogd writes -- MARK -- lines to log files every 20 minutes to show that syslog is still running. Disable this by changing SYSLOGD in /etc/default/rsyslog so that it reads<br /><blockquote>SYSLOGD="-m 0"</blockquote><br />After the change, restart syslogd by running<br /><blockquote>/etc/init.d/rsyslog restart</blockquote><br /><br /><span style="font-weight: bold;">2)</span> Create.ext3flash file in the root. Write<br /><blockquote>touch /.ext3flash</blockquote><br /><br /><span style="font-weight: bold;">3)</span> If you do not have a serial port in your slug you can disable getty by commenting the corresponding line in /etc/inittab as shown below. Change<br /><blockquote>T0:23:respawn:/sbin/getty -L ttyS0 115200 linux</blockquote><br />to<br /><blockquote>#T0:23:respawn:/sbin/getty -L ttyS0 115200 linux</blockquote><br />to re-read the inittab file.<br /><blockquote>telinit q</blockquote><br /><br /><span style="font-weight: bold;">4)</span>If you have a swap partition on flash, it might be a good idea to minimize swapping. View the current swapping behavior by typing<br /><blockquote>cat /proc/sys/vm/swappiness</blockquote><br />if you see 60 or something else you may want to change it to zero.<br /><blockquote>echo "0" > /proc/sys/vm/swappiness</blockquote><br /><br /><span style="font-weight: bold;">5) </span>Unless you have a serial console, it's a good idea to edit /etc/default/rcS and set FSCKFIX=yes, to prevent fsck problems from hanging your boot waiting for you to press "y" on a nonexistant console. To edit write<br /><blockquote>nano /etc/default/rcS</blockquote><br /><br /><span style="font-weight: bold;">6) </span>If you want to see the boot logs edit /etc/default/bootlogd and change<br /><blockquote>BOOTLOGD_ENABLE=No </blockquote><br />to<br /><blockquote>BOOTLOGD_ENABLE=Yes</blockquote><br /><br />You can see boot logs in /var/log/boot.<br /><br /><span style="font-weight: bold;">7) </span>Add 'noatime' option to /etc/fstab, to prevent updating the file-access-timestamp each time a file is read (atime='access-timestamp'), thus preventing a lot of write actions to the flash disk. To edit ftab type:<br /><br /><blockquote>nano /etc/fstab </blockquote><br />Here is my adjusted ftab file<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgExYenNTogP2DXVNf0AY3MbeFz8k0oy6IEUNF-CIr_D5ubxvuWn6aQB3KJ7vOXf1Fm7JtEQ-VoPMSDZ_ttfbiEV1k_rewgzWakA6YxQMDT_lTq69A6fgYeqHn6QgZzrXms2Ckh-dox8xI/s1600-h/fstab.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 83px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgExYenNTogP2DXVNf0AY3MbeFz8k0oy6IEUNF-CIr_D5ubxvuWn6aQB3KJ7vOXf1Fm7JtEQ-VoPMSDZ_ttfbiEV1k_rewgzWakA6YxQMDT_lTq69A6fgYeqHn6QgZzrXms2Ckh-dox8xI/s400/fstab.jpg" alt="" id="BLOGGER_PHOTO_ID_5288985418924743938" border="0" /></a><br /><br />By the way I am not the author of these adjustments. I just thought it would be good to find all these in one place. If you know something useful I did not mention, let me know so I will add to the list. Cheers :)<br /></div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com1tag:blogger.com,1999:blog-1422591811863299741.post-46783713022390059342009-01-07T16:59:00.000-08:002009-01-08T10:24:57.208-08:00Sftp drive for windows connection<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZcZ_XKiPX2xcLwwvbY4aVmeW7vxywBhaL7WRnnN3JTg_h3XAK7oYhI8EKgEKJAybGmKdqtg9dcuqxfzn8-iV_8eActnz1aNUPd82vfQ0jXgjqClChL8mUQoXEkdOWTIAByKwZJxLVktE/s1600-h/sftpdrive_medium.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 70px; height: 70px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZcZ_XKiPX2xcLwwvbY4aVmeW7vxywBhaL7WRnnN3JTg_h3XAK7oYhI8EKgEKJAybGmKdqtg9dcuqxfzn8-iV_8eActnz1aNUPd82vfQ0jXgjqClChL8mUQoXEkdOWTIAByKwZJxLVktE/s400/sftpdrive_medium.png" alt="" id="BLOGGER_PHOTO_ID_5288724233901743394" border="0" /></a><br />I have a 500gb hdd and a 8gb flash disk connected to my slug. Sometimes I need to access the documents in my 500gb hdd from a windows machine. I tried samba for this purpose but I don't want to consume limited resources of slug. I was googling around and I found a very useful software for this purpose. Sftpdrive uses your ssh server to connect your hdd and you do not have to install anything more to your slug. You can also map it as an SFTP drive. Cool yeah :)<br /><br />You can take a look at the program from <a href="http://www.expandrive.com/sftpdrive/">http://www.expandrive.com/sftpdrive/</a>. It is really easy to use the program, I think you can figure it out yourself. Good news is you can use it free for 6 weeks. I have been using it for a while and I am really satisfied with it. I do not think that I will return back to samba server for this purpose. But do not worry, I will publish a new guide about samba server soon :)<br />See you later</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com3tag:blogger.com,1999:blog-1422591811863299741.post-14590831683663746632009-01-06T23:31:00.000-08:002009-01-07T17:17:49.566-08:00MySQL server setup with phpmyadmin<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD4XlRnnF4iOBY3n0VVd9uDkDoqjpa4dFGtKHThk2VoqQ2tYOphF3WkhVUsIdUxpJkprH7vNmO5ihOPJCeg4UvFpbuVTeZ4jvTWCObPHeLy20sQvA2Z5sLl8Nn-mPNl_IOW2F-IlQtK2A/s1600-h/images.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 124px; height: 90px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD4XlRnnF4iOBY3n0VVd9uDkDoqjpa4dFGtKHThk2VoqQ2tYOphF3WkhVUsIdUxpJkprH7vNmO5ihOPJCeg4UvFpbuVTeZ4jvTWCObPHeLy20sQvA2Z5sLl8Nn-mPNl_IOW2F-IlQtK2A/s320/images.jpg" alt="" id="BLOGGER_PHOTO_ID_5288455930774591522" border="0" /></a><br />If you want to have Mysql server in your little slug you should follow the guide. I installed it to try with wordpress but it was painfully slow. So I decided to remove it at least for now. But if you want to give it a try or if you need it for a specific application follow me :)<br />Install the mysql<br /><br /><blockquote>apt-get install mysql-server<br /><br /></blockquote>Then install phpmyadmin by typing<br /><br /><blockquote>apt-get install phpmyadmin<br /><br /></blockquote>when it ask you to for your webserver select lighttpd. (If you use something else then choose that one). Then restart your slug<br /><br /><blockquote>shutdown -r now<br /><br /></blockquote>That is all. Now you have a MySQL server with phpmyadmin interface.In my case I wrote<br /><br />http://192.168.1.77/phpmyadmin/index.php<br />to reach the phpmyadmin interface.<br />By the way it is not secure to use it like this. You should create a password. As I do not use it I do not know the details but you can google around for securing your MySQL+phphmyadmin combination. See you next time...</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-88521728589637842152009-01-06T23:14:00.000-08:002009-01-09T17:47:49.323-08:00Free more memory<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh56ncWoc7YNI6ld6DF5iueti4QPxexzqQ-iRIb_C64C62SdhZJBMViZU6dYIanDUo2g_1524kTfhAP_O1OXpfqsakORAQdz6cQig73GY77EG2D1NzeQqt3vzQXniTS7ypQPJT-Zf9xxn8/s1600-h/images.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 122px; height: 119px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh56ncWoc7YNI6ld6DF5iueti4QPxexzqQ-iRIb_C64C62SdhZJBMViZU6dYIanDUo2g_1524kTfhAP_O1OXpfqsakORAQdz6cQig73GY77EG2D1NzeQqt3vzQXniTS7ypQPJT-Zf9xxn8/s320/images.jpg" alt="" id="BLOGGER_PHOTO_ID_5288449879322743330" border="0" /></a><br />Your little slug has only 32mb of memory. I know that you want to run a lot of useful applications with your slug then why do not you remove some of the applications already installed in your slug and free more memory. Actually I can feel the difference in my slug after removing the mentioned applications. It takes much less to load my website right now...<br /><br />First you can think of disabling and removing exim4. (mailserver AFAIK - free 7 mb ram)<br /><blockquote>/etc/init.d/exim4 stop;<br />update-rc.d -f exim4 remove<br />apt-get --purge remove exim4-daemon-light exim4-config exim4-base</blockquote><br />Also if you do not use nfs service (drive sharing AFAIK) just disable and remove it.<br /><blockquote>/etc/init.d/nfs-common stop;<br />update-rc.d -f nfs-common remove<br />apt-get --purge remove nfs-common</blockquote></div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com2tag:blogger.com,1999:blog-1422591811863299741.post-2537222866131948862009-01-06T19:47:00.000-08:002009-01-08T10:32:40.914-08:00External HDD spindown issue<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9bGiNnCbFexbPWdb0RauqpaMeXR-3LdqkqTzKv7jNqD6qxRISO63vdzXBQ9cNXjtsDzeYsD_ADvF6utHPaV9lfG_st4h6Ypmn425y_6v2XRMCpUMsaNqueKJYW9FheY18uvQcU1EeLI/s1600-h/dsa.gif"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 133px; height: 89px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9bGiNnCbFexbPWdb0RauqpaMeXR-3LdqkqTzKv7jNqD6qxRISO63vdzXBQ9cNXjtsDzeYsD_ADvF6utHPaV9lfG_st4h6Ypmn425y_6v2XRMCpUMsaNqueKJYW9FheY18uvQcU1EeLI/s320/dsa.gif" alt="" id="BLOGGER_PHOTO_ID_5288446494233781570" border="0" /></a><br />This guide shows how to automatically spindown your external hard drives connected to your NSLU2. Isn't it great to stop your external hdd when you are not using it. This will also extend the lifetime of your external hdd. I have been using this with my NTFS formatted hdd for a couple of months and I am very satisfied.<br />We need a program to control the harddisk connected to your NSLU2. SG3-utils will do it for us. To install write<br /><blockquote>apt-get install sg3-utils</blockquote><br />After the installation you can try to spindown your harddrive to test if it's working.<br />In my case I wrote<br /><blockquote>/usr/bin/sg_start --stop /dev/sdb</blockquote><br />If it works you are almost done. Let us automatize it now.Spindown is a daemon that spins down idle disks and so saving energy and giving the disks a longer lifetime. You can check <a href="http://code.google.com/p/spindown/">http://code.google.com/p/spindown/</a> for more information. Follow the steps below to install it into your Debian machine. You may change the "spindown-0.2.2.tar.gz" parts according to the latest version.<br /><blockquote><br />cd<br />mkdir xxx<br />cd xxx<br />wget http://spindown.googlecode.com/files/spindown-0.2.2.tar.gz<br />tar xvzf spindown-0.2.2.tar.gz<br />cd spindown-0.2.2<br />make<br />make install</blockquote><br /><br />After compiling and installing the spindown you still need to configure it. I prepared a sample config file for you. Create spindown.conf by typing<br /><blockquote>nano /etc/spindown.conf</blockquote><br />and copy and paste the lines below into this file.<br /><br /><blockquote>[General]<br />cycle-time = 60 # Number of seconds between cycles.<br /><br />idle-time = 3600 # The time in seconds a disk has to be idle before it is spundown.<br /> # Do not use a value that is to small (less than 3600) unless you<br /> # know what you are doing.<br /><br />syslog = 0 # Turn this on if you want spindown to log messages using syslog.<br /> # You will not want to turn this on if you are trying to spindown<br /> # the disk with the root filesystem on.<br /><br />[Disk 0]<br />name = sdb<br />spindown = 1<br />command = sg_start --stop</blockquote><br /><br />You will need to change name = sdb into something else depending which drive you want to stop or you can make it stop multiple drives. Check the website I gave before for more information.<br /><br />Now you have your configuration file. It is time to start the daemon, write<br /><blockquote>/etc/init.d/spindown start</blockquote><br />when you write the line below<br /><blockquote>/etc/init.d/spindown status</blockquote><br />you should see something like<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlGGi1O2B5HruBS6cSV5Wl4pdlfYEB1gzOqNPZXNPFx-DIZeioPEF59CKhle2KLioNRpK7UEFud46IvwGx-mQbnaIKf9585LunGd_R3dF2SzCDEW8OiefcTXZo8p3BHnEvWfQrfvmxYJg/s1600-h/Untitled.jpg"><img style="cursor: pointer; width: 400px; height: 35px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlGGi1O2B5HruBS6cSV5Wl4pdlfYEB1gzOqNPZXNPFx-DIZeioPEF59CKhle2KLioNRpK7UEFud46IvwGx-mQbnaIKf9585LunGd_R3dF2SzCDEW8OiefcTXZo8p3BHnEvWfQrfvmxYJg/s400/Untitled.jpg" alt="" id="BLOGGER_PHOTO_ID_5288991939951731954" border="0" /></a><br /><br />You can change the spindown time from the config file. 3600 is fine if you do not know what you are doing. Hope this helps. Write comments if I miss something.<br />Good luck...</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com13tag:blogger.com,1999:blog-1422591811863299741.post-21343511012051766582009-01-06T19:12:00.000-08:002009-01-07T17:18:28.742-08:00Reading/Writing to NTFS in Debian<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKpSlQ9mrL0PKjEA0gQ0dge-cKZJWKTR95vYXMWIoVraw3xfI6099lzLjmD25rVOYmb849YKpasvhiMrMTEMoo-wsme2GkA6Gi4m1QEQrQUEj0QYtcZVHauF1ug6v3WDffXCyZ2J7v848/s1600-h/NTFS-tt93.gif"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 145px; height: 104px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKpSlQ9mrL0PKjEA0gQ0dge-cKZJWKTR95vYXMWIoVraw3xfI6099lzLjmD25rVOYmb849YKpasvhiMrMTEMoo-wsme2GkA6Gi4m1QEQrQUEj0QYtcZVHauF1ug6v3WDffXCyZ2J7v848/s320/NTFS-tt93.gif" alt="" id="BLOGGER_PHOTO_ID_5288442302943829714" border="0" /></a><br />You do not have to format your existing harddrive with ext3 to use with slug. You can make Debian read it for you. By this way you can use the external drive when you disconnect from the slug in any windows machine easily.<br />I prefer to use ntfs-3g for this purpose. There are other packages for this purpose but I believe this is the best. To install write<br /><blockquote>apt-get install ntfs-3g</blockquote><br />To see the list of connected drives you can use tree.<br /><blockquote>apt-get install tree</blockquote><br />You should see your NTFS formatted drive in the list by typing<br /><blockquote>tree /dev/disk </blockquote><br />You should mount the drive to use it. You can use<br /><blockquote>mount -t ntfs-3g /dev/sdb1 /mnt/hdd -o force</blockquote><br />or<br /><blockquote>mount -t ntfs-3g /dev/sdb1 /mnt/hdd</blockquote><br />to mount it. You will need to change sdb1 according to the screen you get with tree. Also you should have a directory created /mnt/hdd to mount. Write<br /><blockquote>mkdir /mnt/hdd </blockquote><br />to create that directory. Good luck.</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com4tag:blogger.com,1999:blog-1422591811863299741.post-37671695386552464612009-01-06T18:08:00.000-08:002009-01-18T11:45:11.901-08:00Mt-daapd - Firefly Media Server Installation<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbkt2i_RZ1MoML1kviaKaoTAshgtMVSC1CMenmYl3RIiwush9dULrqGAJkLisToI1GesimaX3dcK6jzNiXXDNr872VYUNBWfidYpP51l-zghlW2rhKrkBcIOD_WE_vnZyNTpegC7lNcHc/s1600-h/ff_logo_med.gif"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 150px; height: 39px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbkt2i_RZ1MoML1kviaKaoTAshgtMVSC1CMenmYl3RIiwush9dULrqGAJkLisToI1GesimaX3dcK6jzNiXXDNr872VYUNBWfidYpP51l-zghlW2rhKrkBcIOD_WE_vnZyNTpegC7lNcHc/s400/ff_logo_med.gif" alt="" id="BLOGGER_PHOTO_ID_5288442042071169698" border="0" /></a><br />It is great that you can serve your music with this little tool. I prepared a guide for you to install firefly. Just follow the steps and hopefully you won't experience any problem. I recommend you to install all the packages below. I experienced a problem before and these packages resolved the issue.<br /><br /><blockquote>apt-get install avahi-daemon<br />apt-get install libgdbm-dev libid3tag0-dev<br />apt-get install libsqlite0<br />apt-get install libsqlite0-dev<br />apt-get install gawk<br />apt-get install gcc<br />apt-get install mt-daapd</blockquote><br /><br />After these steps you should be able to log on using by typing the ip of your NSLU2. In my case I wrote<br /><br />http://192.168.1.77:3689<br /><br />to log in. And use "admin" as user name and "mt-daapd" as password for the first time login. You can change the config later through the web page. You should change the location of your music files before beginning to scan.<br /><br />You can also change the config by editing the config file. Config file location: /etc/mt-daapd.conf<br />By the default settings, after the scan you will end up with having a database located at<br />Database : /var/cache/mt-daapd<br /><br />You can start/stop Firefly media server by typing<br /><blockquote>invoke-rc.d mt-daapd start|stop|restart</blockquote><br />invoke-rc.d mt-daapd start will start the server...<br /><br />You can also write<br /><blockquote>mt-daapd -f </blockquote><br />this will show you what the daemon is doing and the encountered errors. I also use this command to scan the directories for mp3. Somehow this is much faster than scanning the directories using the web interface.<br /><br />If you have something to add to the firefly webpage it is located at: /usr/share/mt-daapd/admin-root<br /><br />For example I added a flash player to that page. So I can easily listen to the music wherever I want.You can download the flash player from : <a href="http://www.mellberg.org/FirePlay.zip">http://www.mellberg.org/FirePlay.zip</a><br /><br />Add the line below to the top of FirePlay.html<br /><blockquote>@include hdr.html@</blockquote><br />and change<br /><blockquote>'width', '100%',<br />'height', '100%',</blockquote><br />to<br /><blockquote>'width', '800',<br />'height', '600',</blockquote><br />Also edit the hdr.html and add the line shown below.(Click to enlarge)<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO3YzCu9mOvwDugeMADrxCoax64lugl9dkqdvao1ATec1_oYtKpPXgPmOwj0VGcgDu100uVvZMl0jii4lPtFIiiXyvuaIbiexYtnPapoMIVB76SJO5jxPpwRM0EVWvhbWtZCUD7BUjXTc/s1600-h/firefly2.jpg"><img style="cursor: pointer; width: 400px; height: 59px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO3YzCu9mOvwDugeMADrxCoax64lugl9dkqdvao1ATec1_oYtKpPXgPmOwj0VGcgDu100uVvZMl0jii4lPtFIiiXyvuaIbiexYtnPapoMIVB76SJO5jxPpwRM0EVWvhbWtZCUD7BUjXTc/s400/firefly2.jpg" alt="" id="BLOGGER_PHOTO_ID_5288382882202165186" border="0" /></a><br /><br />That is all. You should have a built in flash player now.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQgXE8THQYXG4pH3WyC4i0Zb-rDJ3NNHmCpdSIiPWFmiQKqE3l0KJazRmzpyvez-TAMIQlpSk_U44a6wROcYl9CyRHbNcWIYouIspq-vjSgXYmVfcblARn-DXL4CsJWW_LfQXKs5WLEb0/s1600-h/fireplay1.jpg"><img style="cursor: pointer; width: 400px; height: 267px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQgXE8THQYXG4pH3WyC4i0Zb-rDJ3NNHmCpdSIiPWFmiQKqE3l0KJazRmzpyvez-TAMIQlpSk_U44a6wROcYl9CyRHbNcWIYouIspq-vjSgXYmVfcblARn-DXL4CsJWW_LfQXKs5WLEb0/s400/fireplay1.jpg" alt="" id="BLOGGER_PHOTO_ID_5288383015049884146" border="0" /></a><br /><br />You can also use itunes but if you want to have a standalone java client you can look at <a href="http://sourceforge.net/projects/fireflyclient">http://sourceforge.net/projects/fireflyclient</a>. Hope this guide helps someone.</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com4tag:blogger.com,1999:blog-1422591811863299741.post-48183042697661073442008-12-11T14:37:00.000-08:002009-03-30T02:03:04.704-07:00Transmission - Torrent download client<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiZpYmaXdHPVTyrpSNjXKn2iDd_aa2BwoANPQ4FGNZeUDJM7hJj5dBpiCk-E1ZS3iXT-UgpWba9N6_n3CyAzahwJjIqIKPVnFH-qge6S4L4hk7AKArqfGiNkAXKEghAkKzjcE1OS3rc2A/s1600-h/images.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 75px; height: 75px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiZpYmaXdHPVTyrpSNjXKn2iDd_aa2BwoANPQ4FGNZeUDJM7hJj5dBpiCk-E1ZS3iXT-UgpWba9N6_n3CyAzahwJjIqIKPVnFH-qge6S4L4hk7AKArqfGiNkAXKEghAkKzjcE1OS3rc2A/s200/images.jpg" alt="" id="BLOGGER_PHOTO_ID_5278669945143360098" border="0" /></a><br />As you have a deice always running why do not use it to download your torrents. Follow the steps and you will have a device able to download torrents...<br /><br />First install the required packages required that has build function<br /><blockquote>apt-get install pkg-config<br />apt-get install libc6-dev g++ gcc libssl-dev libcurl4-openssl-dev gettext intltool<br />cd <br />mkdir tmp<br />cd tmp<br />wget http://download.m0k.org/transmission/files/transmission-1.41b2.tar.bz2<br />tar xvf transmission-1.41b2.tar.bz2<br />cd transmission-1.41b2<br />./configure --disable-mac --disable-beos --disable-gtk --disable-wx<br />make<br />make install<br /></blockquote>If you don't want cli access just web access add --disable-cli to the end of the ./configure line. Alternatively if you don't want web/remote access just the cli add --disable-daemon. To add user type<br /><blockquote>adduser --disabled-password transmission<br /></blockquote>Download the init script<br /><a href="http://rapidshare.de/files/46348312/transmission-daemon.html">http://rapidshare.de/files/46348312/transmission-daemon.html</a><br /><br />You can change the required fields in the script like download directory and the password.Then copy the script into /etc/init.d/. You can start/stop the transmission by typing<br /><blockquote>/etc/init.d/transmission-daemon start<br />/etc/init.d/transmission-daemon stop<br /></blockquote>Now you have a working torrent download machine. You can connect the web interface by typing 192.168.1.77:9091 and start downloading...</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com12tag:blogger.com,1999:blog-1422591811863299741.post-36667347091157630612008-12-11T14:05:00.000-08:002009-01-07T17:19:10.888-08:00Lighttpd eaccelerator support<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgEtJvoopPT4SL4WFJ5SnsoZZyRt-qOYVAJtHvdKZDBexwJQO-evvRqLAT7b1b5oW11GiG7mOSUS6rNv1QkxIW7Ce9yBo99lfV8zVxe1lQ4desTVHOk1DrebztyLuEdFifGcZG4_0tixU/s1600-h/light_logo.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 192px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgEtJvoopPT4SL4WFJ5SnsoZZyRt-qOYVAJtHvdKZDBexwJQO-evvRqLAT7b1b5oW11GiG7mOSUS6rNv1QkxIW7Ce9yBo99lfV8zVxe1lQ4desTVHOk1DrebztyLuEdFifGcZG4_0tixU/s200/light_logo.png" alt="" id="BLOGGER_PHOTO_ID_5278664668776041746" border="0" /></a><br /><br />This is a highly recommended setup for your nslu2. As your slug has very limited resources you better install this to make it run pages faster. You will notice the difference if you are running a content management system. Run the codes below step by step to install eaccelerator on your system. It is basicly a caching We are not using apt-get this case as it debain has no package for this.<br /><blockquote>apt-get install build-essential php5-dev<br />mkdir work<br />cd work<br />wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2<br />tar xvfj eaccelerator-0.9.5.3.tar.bz2<br />cd eaccelerator-0.9.5.3<br />phpize<br />./configure --with-eaccelerator-userid=nobody<br />make<br />make install</blockquote>Create eaccelerator.ini file<br /><blockquote>touch /etc/php5/conf.d/eaccelerator.ini</blockquote>copy these into the file<br /><blockquote>extension="eaccelerator.so"<br />eaccelerator.shm_size="16"<br />eaccelerator.cache_dir="/var/cache/eaccelerator"<br />eaccelerator.enable="1"<br />eaccelerator.optimizer="1"<br />eaccelerator.check_mtime="1"<br />eaccelerator.d****="0"<br />eaccelerator.filter=""<br />eaccelerator.shm_max="0"<br />eaccelerator.shm_ttl="0"<br />eaccelerator.shm_prune_period="0"<br />eaccelerator.shm_only="0"<br />eaccelerator.compress="1"<br />eaccelerator.compress_level="9"</blockquote>As you see, we are using the disk cache directory /var/cache/eaccelerator which we must create now and make it world-writable:<br /><blockquote>mkdir -p /var/cache/eaccelerator<br />chmod 0777 /var/cache/eaccelerator</blockquote>then restart the server<br /><blockquote>/etc/init.d/lighttpd restart</blockquote>After the restart the server if you write http://192.168.1.77/info.php and go the the info page you should see a new block like<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwJvFfMCtwZLiRUJoANWaUSqAKngLnP7WvCST50anoTAaUhzd5i8Ffqd47RgJlv4qnhA5d54viayzs0BCRJLaNv_6g1p4FSpEvn3Yvch6i1j6GiFn1szzj0T5UlKXzH_JGc2YNIoAK9b4/s1600-h/Untitled.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 145px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwJvFfMCtwZLiRUJoANWaUSqAKngLnP7WvCST50anoTAaUhzd5i8Ffqd47RgJlv4qnhA5d54viayzs0BCRJLaNv_6g1p4FSpEvn3Yvch6i1j6GiFn1szzj0T5UlKXzH_JGc2YNIoAK9b4/s320/Untitled.jpg" alt="" id="BLOGGER_PHOTO_ID_5278658888816874658" border="0" /></a></div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com0tag:blogger.com,1999:blog-1422591811863299741.post-11590796141620746752008-12-11T12:59:00.000-08:002010-01-23T21:50:18.131-08:00Webserver installation - lighttpd<div style="text-align: justify;">If you want to use your slug as a webserver with php support you should follow the steps through and you will have a webserve with php support.<br />first write<br /><blockquote>#touch /.ext3flash</blockquote>to prevent your flash disk drive wear out.Then update the package list using<br /><blockquote>#apt-get update<br /></blockquote>After these install the required packages using<br /><blockquote>#apt-get install lighttpd<br />#apt-get install php5-cgi<br />#apt-get install php5-gd<br /></blockquote>After the install, open lighttpd.conf:<br /><blockquote>#nano /etc/lighttpd/lighttpd.conf<br /></blockquote>Add the code below under server.modules, like this:<br /><blockquote>"mod_fastcgi",<br /></blockquote>at the end of the file add<br /><blockquote>fastcgi.server = ( ".php" => ((<br />"bin-path" => "/usr/bin/php5-cgi",<br />"socket" => "/tmp/php.socket",<br />)))<br /></blockquote>After adding the code, save and exit.<br />try the server if it is working or not. Create info.php at /var/www/info.php<br /><blockquote>touch /var/www/info.php</blockquote>edit this file<br /><blockquote>nano /var/www/info.php</blockquote> write<br /><blockquote>?php<br />phpinfo();<br />?></blockquote>save and exit.Restart the server<br /><blockquote>/etc/init.d/lighttpd restart</blockquote>Type your address and try<br /><blockquote>http://192.168.1.77/info.php</blockquote>I hope you can see something and the guide worked for you.See you in the next guide</div>aspediscahttp://www.blogger.com/profile/12933451940446434502noreply@blogger.com2