📜 ⬆️ ⬇️

Debian home server setup

Hey.

I want to tell you about how I implemented a server solution at home :)
Please do not judge strictly, because This is my first publication on Habrahabr, and Russian is not my native language.
So all fixes are welcome.

It will be about:
An old VIA Ezra-based computer with 256 MB of RAM, based on Debian Etch, serving as a music player, torrent client, web + ftp + nfs server.
')
Additional equipment: 2 laptops (Dell, Asus) based on Ubuntu, Fedora and Wi-Fi router / DSL-modem D-link DSL-2640u.


A friend of mine for the New Year gave me this creation of engineers of the last century:



It was decided that the basin should not stand idle. Debian because the distribution is stable and easy to configure / use.
The process of installing the OS will not describe - the task is clear, and on the Internet enough help in this case. Immediately proceed to the setting.

Customization



.. wi-fi, — .
ssh , , .

.
DHCP- MAC-, 192.168.1.2

:



, web, ftp, shoutcast ssh.
, ( ) .
.. ___:21 — .
.

ssh .
Debian Gnome , , .
:

gribozavr
apt-get install sysv-rc-conf
sysv-rc-conf


UPD: , Greignar
update-rc.d -f gdm remove


, .
! Gnome .
.

, -, .
dyndns.com. , + , .
, , inadyn, update-rc.d

update-rc.d inadyn defaults


, !

screen + rtorrent



, .. rtorrent — , , .
, screen, GNU Project.
:

apt-get install screen rtorrent


:

nano /etc/init.d/screen


#!/bin/sh
screen -d -m rtorrent
echo "Started..."


, , update-rc.d
: screen rtorrent.

:

nano /home/username/.rtorrent.rc


directory = /data/downloads/
schedule = watch_directory,5,5,load_start=/data/torrents/*.torrent


- /data/downloads/, 5 /data/torrents/ torrent-.

apache, ftp, nfs



- mpd -. apache. - php.
, nfs , ftp .
:

apt-get install apache2 libapache2-mod-php5 php5-cli php5-common php5-cgi proftpd nfs-kernel-server


, , .
proftpd , ftp-:

nano /etc/proftpd/proftpd.conf


DefaultRoot ~


ftp- .

nfs- /data:

nano /etc/exports


/data 192.168.1.1/24(rw,no_root_squash,async)


, /data .
:

/etc/init.d/proftpd restart
/etc/init.d/nfs-kernel-server restart


, NetFileSystem FTP .



nfs fstab:

sudo nano /etc/fstab


192.168.1.2:/data /server/data nfs rw,hard,intr 0 0




sudo mkdir /server/data
sudo mount /server/data


!

mpd + relaxxplayer + icecast



Mpd — -, gui. Qt, GTK+, web-based.
-, .. .

:

apt-get install mpd icecast2


/var/www
Apache , 192.168.1.2 .
mpd:

nano /etc/mpd.conf


music_directory "/mnt"


, /mnt .

!
nfs- , .
nfs-kernel-server /home/romantik/music /mnt/music

, mpd

mpd --create-db


:)
- .
, :)

icecast.

mpd shoutcast - .
192.168.1.2:8000



. , :)
?

Source: https://habr.com/ru/post/48619/


All Articles