FreeNas przy pomocy Subsonic – Ubuntu 11

Print Friendly, PDF & Email

Własny serwer na którym możemy uruchomić domowe centrum multimedialne czasami się przydaje. W jednym miejscu mamy umieszczone nasze najważniejsze pliki.
Musimy wygrzebać z graciarni jakiś komputer, który posiada procesor z zegarem min. 1GHz, min. 2GB RAM’u oraz dyskiem min. 40GB. Instalujemy Ubuntu w wersji 11, dzielimy dysk 80% na główną partycję pozostałe na SWAP. Zainstalujemy dodatki, które pozwolą na podłączenie się z każdego systemu operacyjnego.Modyfikując odpowiednio firewall możemy mieć dostęp do plików z zewnątrz.
Przykładowe demo możemy zobaczyć tutaj:http://subsonic.org/demo/index.view


1) Instalujemy SSH2:

sudo su
sudo apt-get install ssh
nano /etc/ssh/sshd_config


szukamy: PermitRootLogin i ustawiamy na no

w sekcji AllowUsers dodajemy nasz login, jako użytkownika mającego pełen dostęp do serwera.

restart ssh



2) Zdalny pulpit:

Logujemy się jako root, następnie wydajemy polecenie:

sudo apt-get install xrdp


Ustawiamy port 3389, dla VNC 5900


3) SAMBA:

Będąc dalej zalogowanym jako root:

sudo apt-get install samba smbfs
mv /etc/samba/smb.conf /etc/samba/smb.conf.orig

         nano /etc/samba/smb.conf


[global]workgroup = HOME #(Set this to your Windows workgroup)netbios = HOME #(Set this to your Windows workgroup)security = share[Shared Drive] #(Set this to the name you want the shared folder to have)comment = entire shared drive #(Comments about the shared folder)path = /mnt/storage2/ #(Path to the shared folder or mount-point of harddrive)read only = noguest ok = yeswritable = yes


4) VPN:


apt-get install pptpd
nano/etc/pptpd.conf

# TAG: ppp
# Path to the pppd program, default '/usr/sbin/pppd’ on Linux
#
#ppp /usr/sbin/pppd
# TAG: option
# Specifies the location of the PPP options file.
# By default PPP looks in '/etc/ppp/options’
#
option /etc/ppp/pptpd-options
# TAG: debug
# Turns on (more) debugging to syslog
#
#debug
# TAG: stimeout
# Specifies timeout (in seconds) on starting ctrl connection
#
# stimeout 10
# TAG: noipparam
# Suppress the passing of the client’s IP address to PPP, which is
# done by default otherwise.
#
# noipparam
# TAG: logwtmp
# Use wtmp(5) to record client connections and disconnections.
#
logwtmp
# TAG: bcrelay
# Turns on broadcast relay to clients from interface
#
bcrelay eth0
# TAG: localip
# TAG: remoteip
# Specifies the local and remote IP address ranges.
#
# Any addresses work as long as the local machine takes care of the
# routing. But if you want to use MS-Windows networking, you should
# use IP addresses out of the LAN address space and use the proxyarp
# option in the pppd options file, or run bcrelay.
#
# You can specify single IP addresses seperated by commas or you can
# specify ranges, or both. For example:
#
# 192.168.0.234,192.168.0.245-249,192.168.0.254
#
# IMPORTANT RESTRICTIONS:
#
# 1. No spaces are permitted between commas or within addresses.
#
# 2. If you give more IP addresses than MAX_CONNECTIONS, it will
# start at the beginning of the list and go until it gets
# MAX_CONNECTIONS IPs. Others will be ignored.
#
# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
# you must type 234-238 if you mean this.
#
# 4. If you give a single localIP, that’s ok – all local IPs will
# be set to the given one. You MUST still give at least one remote
# IP for each simultaneous client.
#
# (Recommended)
localip 192.168.1.49
remoteip 192.168.0.1-255
# or
#localip 192.168.0.234-238,192.168.0.245
#remoteip 192.168.1.234-238,192.168.1.245


nano /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
username pptpd password *


/etc/init.d/pptpd restart
nano /etc/init.d/ipv4pptpd

#!/bin/sh### BEGIN INIT INFO# Provides: IPV4PPTPD# Required-Start: $remote_fs $syslog# Required-Stop: $remote_fs $syslog# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start daemon at boot time# Description: Enable service provided by daemon.### END INIT INFO
#From debiantutorials.com/installing-and-configuring-pptp-vpn-server-on-lenny/echo 1 > /proc/sys/net/ipv4/ip_forwardiptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
update-rc.d ipv4pptpd defaults
sh /etc/init.d/ipv4pptpd






5) Mediatomb:

sudo apt-get install mediatomb
http://localhost:49152/
nano /etc/mediatomb/config.xml


ustawiamy nazwę użytkownika, wyłączamy wymóg podawania loginu 


6) Bittorrent:

sudo apt-get install transmission-daemon


konfigurujemy settings.json, musimy ustawić ścieżkę do naszych plików, w tym przykładzie pliki przechowywane są: /mnt/torrents/Downloads/:


{  „alt-speed-down”: 950,  „alt-speed-enabled”: false,  „alt-speed-time-begin”: 1,  „alt-speed-time-day”: 127,  „alt-speed-time-enabled”: true,  „alt-speed-time-end”: 585,  „alt-speed-up”: 1,  „bind-address-ipv4”: „0.0.0.0”,  „bind-address-ipv6”: „::”,  „blocklist-enabled”: true,  „blocklist-url”: „http://www.bluetack.co.uk/config/level1.gz”,  „cache-size-mb”: 2,  „dht-enabled”: true,  „download-dir”: „/mnt/torrents/Downloads/”,  „download-queue-enabled”: true,  „download-queue-size”: 5,  „encryption”: 2,  „idle-seeding-limit”: 5,  „idle-seeding-limit-enabled”: true,  „incomplete-dir”: „/mnt/torrents/Incomplete/”,  „incomplete-dir-enabled”: true,  „lazy-bitfield-enabled”: true,  „lpd-enabled”: false,  „message-level”: 2,  „open-file-limit”: 4,  „peer-congestion-algorithm”: „”,  „peer-limit-global”: 240,  „peer-limit-per-torrent”: 60,  „peer-port”: 51413,  „peer-port-random-high”: 65535,  „peer-port-random-low”: 49152,  „peer-port-random-on-start”: false,  „peer-socket-tos”: „default”,  „pex-enabled”: true,  „port-forwarding-enabled”: true,  „preallocation”: 1,  „prefetch-enabled”: 1,  „proxy”: „”,  „proxy-auth-enabled”: false,  „proxy-auth-password”: „”,  „proxy-auth-username”: „”,  „proxy-enabled”: false,  „proxy-port”: 80,  „proxy-type”: 0,  „queue-stalled-enabled”: true,  „queue-stalled-minutes”: 30,  „ratio-limit”: 0.1000,  „ratio-limit-enabled”: true,  „rename-partial-files”: true,  „rpc-authentication-required”: true,  „rpc-bind-address”: „0.0.0.0”,  „rpc-enabled”: true,  „rpc-password”: „password”,  „rpc-port”: 9091,  „rpc-url”: „/transmission/”,  „rpc-username”: „admin”,  „rpc-whitelist”: „*.*.*.*”,  „rpc-whitelist-enabled”: true,  „scrape-paused-torrents-enabled”: true,  „script-torrent-done-enabled”: false,  „script-torrent-done-filename”: „”,  „seed-queue-enabled”: false,  „seed-queue-size”: 10,  „speed-limit-down”: 500,  „speed-limit-down-enabled”: true,  „speed-limit-up”: 1,  „speed-limit-up-enabled”: true,  „start-added-torrents”: true,  „trash-original-torrent-files”: true,  „umask”: 2,  „upload-slots-per-torrent”: 14,  „utp-enabled”: true,  „watch-dir”: „/mnt/torrents/Autoload/”,  „watch-dir-enabled”: true}

możemy teraz zobaczyć czy torrent działa:

 http://localhost:9091



7) Webowy odtwarzacz mediów:

sudo apt-get install openjdk-6-jre lame flac faad vorbis-tools ffmpeg


pobieramy subsonic ze strony: http://www.subsonic.org/pages/download.jsp

umieszczamy go w katalogu domowym 

dpkg -i nazwa_sciagnietego_piku


możemy go przetestować:

http://localhost:4040


po zalogowaniu się możemy zmieniać w zależności potrzeb ustawienia naszego systemu.


Print Friendly, PDF & Email

Dziękuję Ci, za poświęcony czas na przeczytanie tego artykułu. Jeśli był on dla Ciebie przydatny, to gorąco zachęcam Cię do zapisania się na mój newsletter, jeżeli jeszcze Cię tam nie ma. Proszę Cię także o “polubienie” mojego bloga na Facebooku oraz kanału na YouTube – pomoże mi to dotrzeć do nowych odbiorców. Raz w tygodniu (niedziela punkt 17.00) otrzymasz powiadomienia o nowych artykułach / projektach zanim staną się publiczne. Możesz również pozostawić całkowicie anonimowy pomysł na wpis/nagranie.

Link do formularza tutaj: https://beitadmin.pl/pomysly

Pozostaw również komentarz lub napisz do mnie wiadomość odpisuję na każdą, jeżeli Masz jakieś pytania:).

Dodaj komentarz

beitadmin.pl - Droga Administratora IT