- Easy file "surfing" in terminal mode + startup control
- Webserver with php 5
- Samba server with user and password login.
First there is a new Debian release called Lenny. Download it from here. (Debian-installer rc1)
Its really simple to install! You just proceed like you normally would do(see part 1)-It does takes 4 hours though.. so watch some Kongfu Panda while waiting! ;)
Note that the needed modules have been picked for you, so don't worry about that, also when it ask if you want it to install a webserver, fileserver etc. dont pick any of them! We will do that manually later.
After you've completed your installation, its time to to play:
I strongly recommend installing Midnight Commander (mc). Its like using the old NC commander in MS DOS! :) (see screenshot)
#apt-get install mc
"Midnight Commander (MC) is a GNU "Swiss army knife" for the Linux console and other terminal environments. This gives newbie a menu driven console experience which is much easier to learn than standard Unix commands. " Source.
It just make it easier to surf through your files and keeping your overview intact!
Though its not as important as mc, its still very handy! The app is called rcconf and let you configure the app startup list. Very nice considering the limited resources on our little friend.
#apt-get install rcconf
Getting a quick Webserver with php5 up and running is quite simple. Unfortunatly I couldn't fine any information on using my favorite webserver, Cherokee with php5 on debian :( .. but its prolly not that hard... maybe one of the devs, could post a little comment on how to do guide described below.. ? :) Anyways.. I went on using lighthttp:
Do the following:
#apt-get install lighttpd
#apt-get install php5
#apt-get install php5-cgi
After the install, you go to lighttpd.conf:
Write "mod_fastcgi", just under server.modules, like this:
server.modules = (
Before closing, add this to the end of the file:
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
Almost done mate!
type: touch /var/www/info.php
type: nano /var/www/info.php
and enter this: phpinfo()
Save it and restart:
Now try to type in you slugs IP: http://slugip.com/info.php
(Check out Part 4 if you want a MySQL server with PHP5 and phpmyadmin aswell.... oh yeah.. I bet you would ;)
Now this is perhaps the most important section of this post! Because the reason why we bought the NSLU2 in the first place, was of course to easily share any files to the LAN, even though there was only one computer active.
After a fresh Debian install, its not quite ready to transfer files with windows.. thats why we need to play a little bit more:
#apt-get install samba
#apt-get install smbclient
For this example, our goal is to have a Secure Read-Write File Server with 3 user acounts.
This is how your smb.conf file needs too look like:
[global]Now its time to add the users. Remember that Mary will be the owner off all the files in the public directory:
workgroup = typeinaworkgrouphere
netbios name = Typeinyourserversname
security = user
Comment = Home Directories
Valid users = %S
Read only = No
Browseable = No
comment = Data
path = /export
Force user = maryo
force group = users
read only = No
useradd -c "Jack Baumbach" -m -g users -p m0r3pa1n jackb
useradd -c "Mary Orville" -m -g users -p secret maryo
useradd -c "Amed Sehkah" -m -g users -p secret ameds
Then we just need to initialize the Microsoft Windows password database with the new
# smbpasswd -a jackb
New SMB password: m0r3pa1n
Retype new SMB password: m0r3pa1n
Added user jackb.
# smbpasswd -a maryo
New SMB password: secret
Reenter smb password: secret
Added user maryo.
# smbpasswd -a ameds
New SMB password: mysecret
Reenter smb password: mysecret
Added user ameds.
When you have done that, you need to add the export folder and give it the correct properties(doooh=)
#chown maryo.users /export
#chmod u=rwx,g=rwx,o-rwx /export
Now I think its time for a little restart:
Check if samba runs properly:
#smbclient -L localhost -U%Great, try to login:
"Domain=[PRIVATE] OS=[Unix] Server=[Samba 3.2.4]
Sharename Type Comment
--------- ---- -------
public Disk Data
IPC$ IPC IPC Service (Samba 3.2.4)
Domain=[PRIVATE] OS=[Unix] Server=[Samba 3.2.4]
MASTERSLUGGY Samba 3.2.4
#smbclient //mastersluggy/maryo -Umaryo%secretCongratz! you now have a fully functional Samba Server. SOURCE.
You can also login from windows :) Against any odds, you have probs!;) go check this guide out.
Just the last little notes:
Here are some very useful links you should read:
- Alot of great nslu2 guides, tips and tricks by Sebastiaan G:
- security with lighthttp
- Debian console start tutorial
- minimze swapping, memory usage etc
- Check the NSLU2 Debian blog list on the right site.
Thanks for reading and have fun with your powerful little toy ;)