Gå til innhold

Mediaserver... Hvor begynner jeg?


Anbefalte innlegg

Heisann!

 

Har en PC stående med helt kurant HW 4gb RAM, AMD X2 5000+ og noe.

 

Vil bruke denne til følgende: Torrentklient, fil- og mediaserver.

Da jeg vil bruke uTorrent + webUI er jeg bundet til Windows.

 

Da er spørsmålet: Hvordan kan jeg bruke filene som ligger på denne serveren rundt om i huset?

UPnP AV? DLNA? Bare dele filene?

Lenke til kommentar
Videoannonse
Annonse

Det kommer jo litt ann på hva slags løsning du ønsker deg.

Det enkleste er å bare dele ut de mappene du lagrer filene i, og så montere dem som nettverksdisker hos klieneten. Da vil du kunne bruke filene som ligger på serveren.

Jeg gjør dette selv hjemme, selv om jeg ikke kjører windows på serveren, så har jeg bare montert mappene som blir delt ut som nettverksdisker og kjører alt av mediafiler og musikk fra denne.

 

Men på dette området finnes det mange løsninger så det første du burde gjøre er å lage en liste over hvilke funskjoner du faktisk ønsker deg og så velge software utifra det.

Lenke til kommentar

Det kommer jo litt ann på hva slags løsning du ønsker deg.

Det enkleste er å bare dele ut de mappene du lagrer filene i, og så montere dem som nettverksdisker hos klieneten. Da vil du kunne bruke filene som ligger på serveren.

Jeg gjør dette selv hjemme, selv om jeg ikke kjører windows på serveren, så har jeg bare montert mappene som blir delt ut som nettverksdisker og kjører alt av mediafiler og musikk fra denne.

 

Men på dette området finnes det mange løsninger så det første du burde gjøre er å lage en liste over hvilke funskjoner du faktisk ønsker deg og så velge software utifra det.

 

Om du har f.eks en PS3 eller ennen klient som bruker DLNA så kan jeg anbefale PS3 Media Server, funker helt bra det. Et lite tips er om du ripper filene i MKT-formatet så må du transcende filene for å få med undertekst på PS3, da begynner det å hakke eller du får tidsforskyvninger.

 

Om du velger å gå for MKT-format og kanskje setter opp en egen mediacenter PC som kjører med XBMC og/eller Boxee så burde ikke dette være noe problem i det hele tatt.

 

I tillegg så finnes dete flere måter du kan løse mediaserver "problemet" på, enten bruker du din egen maskin, installer f.eks Windows Home Server, eller du går for en linux variant. Eller du kan satse på en ferdig maskin som HP DataVault X510, denne scorer utrolig bra på streaming kapasitet: http://www.smallnetbuilder.com/component/option,com_nas/Itemid,190

 

Jeg for min del skal bygge en egen media/backup server ut fra et mini-itx hovedkort fra Zotac, samt en i3 530 cpu og WHS. Da står man fritt til å utvide med opptil 6 sata-disker, det eneste jeg ikke har bestemt meg for riktig ennå er hvilket kabinett jeg skal gå for...

 

Frank

Lenke til kommentar

Heisann!

Takker for svar.

 

Har ikke PS3, men har en Blu-Ray spiller med DLNA.

 

Funksjoner serveren må ha:

* Streame filmer via DLNA til Blu-Ray spilleren

* Streame musikk til alle PC-ene (dele filer)

* Gjøre alle filer enkelt tilgjengelige for alle PC-ene (dele filer?)

* Torrent-klient (uTorrent)

* Mulighet for å kunne fjernstyre serveren (Med torrent er det greit: webUI. Hva ellers? SSH?)

* Kunne skru seg selv på kl 8 om morgningen og av kl 1 om natten

* Til tider Warcraft server (dette problemet har jeg løst)

* Streame musikk, film over internett, så jeg kan høre på min musikk på skolen, se mine filmer hos en kamerat UTEN å laste dem ned. Orb virker som et OK alternativ, men jeg fikk det ikke helt til. Alternativ?

 

Noen som har tips til billig S-ATA kontroller? Må ha 2-4 porter, PCI, billig.

Lenke til kommentar

Aldri kjøp PCI kontroller, dei er så vanvittig forbaska treige. Kjøp pci-express, eit pci express 1x fungerer fint i pci express 16x slot

Ok. Hadde bestilt dette,, men avbestilte det. Hvor kan jeg finne 4-ports PCI-Express SATA-kontrollere til under 200,-?

 

EDIT: Det nærmeste jeg kommer er dette, men med frakt blir det over tollgrensen.

Kortet må altså koste 32 USD eller under inkludert frakt.

Du burde kanskje se på Windwos Home Server:

Den er spesiallaget til dette formålet

 

http://www.microsoft.com/windows/products/winfamily/windowshomeserver/eval.mspx

 

Selv bruker har jeg et helautomatisert oppsett under Ubuntu.

Bruker Sabnzb+ og Sickbeard:

 

http://sabnzbd.org/

http://code.google.com/p/sickbeard/

Skal prøve Windows Home Server.

 

Har nå innstalert Arch X64 og har noen spørsmål:

1: Hvorfor forsvinner power-knappen fra menyen og oppgavelinjen i hytt og pine? Kan ikke legge den til manuelt, men den kommer tilbake og forsvinner av og til.

2: Har dere noen tips til DLNA server på Linux?

3: Hvordan kan jeg fjernstyre serveren?

4: Hvordan kan jeg streame video fra serveren (a la Win Home Serv)?

Skal bruke Samba til fildeling, kjører uTorrent i Wine.

Vil prøve dette før jeg prøver (og eventuelt kjøper) Win Home Server.

Endret av Todda7
Lenke til kommentar

Har nå innstalert Arch X64 og har noen spørsmål:

1: Hvorfor forsvinner power-knappen fra menyen og oppgavelinjen i hytt og pine? Kan ikke legge den til manuelt, men den kommer tilbake og forsvinner av og til.

 

Er du ny på linux ville jeg satset på Ubuntu. Det er den mest brukte disto i dag, og lettest å finne pakker til. Også hjelp.

 

 

2: Har dere noen tips til DLNA server på Linux?

 

xbmc: http://wiki.xbmc.org/index.php?title=UPnP_Sharing

 

3: Hvordan kan jeg fjernstyre serveren?

 

Det er mange måter å fjernstyre linux.

Webbasert: webmin http://www.webmin.com/index.html (Noe ala homeserver)

Remote X: http://x.cygwin.com/

XBMC: http://wiki.xbmc.org/index.php?title=The_Web_Interface

Det vanligste er SSH: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

 

4: Hvordan kan jeg streame video fra serveren (a la Win Home Serv)?

 

XBMC: http://xbmc.org/

 

 

Skal bruke Samba til fildeling, kjører uTorrent i Wine.

 

Linux har mange torrent klienter f.eks Vuze: http://azureus.sourceforge.net/

 

Vil prøve dette før jeg prøver (og eventuelt kjøper) Win Home Server.

Lenke til kommentar

Er ikke ny på Linux, men får stadig problemer:

Arch klarer ikke å mounte disk. Vil innstalere disk-manager for å enkelt fikse dette. Denne pakken ligger selvfølgelig ikke i offisielle repos eller AUR, så må laste ned kildekoden for å kompilere. Null stres ...

checking for python2.4... no

checking for python2.5... no

configure: error: no suitable Python interpreter found

Men har python 2.6 innstalert.

Blir gaaaal av sånne feil, men Ubuntu er alt for bloated og Arch alt for gøy ellers til at jeg vil bytte.

EDIT2: Fikk det til med å jukse litt i config-filen, men det burde jo ikke være sånn.

Og power-button har fortsatt ikke kommet tilbake, den forsvant etter at jeg innstalerte og deretter fjernet gdm, da nyeste version er helt ubrukelig.

 

EDIT: Finnes ingen skikkelig gode torrent-klienter til linux, så det blir uTorrent via Wine.

 

Fant ut at fildeling var mye vanskeligere enn jeg skulle tro, de fleste guidene ville i tillegg ha meg til å bloate Archen min med KDE i tillegg for å bruke Samba. Lett skal det i hvertfall ikke være. Kan man dele filer med XBMC?

 

EDIT3: Fikk til både power-knappen og mounting av disken ved å følge denne guiden.

 

Det jeg lurer litt på er: Hvorfor blir det sånn? Har jo fulgt guiden til punkt og prikke, hva gjør at jeg må fikse systemet slik hele tiden?

Endret av Todda7
Lenke til kommentar

Trengte ikke disk-manager allikevel.

Ubuntu er for bloated og buggy.

 

HOW TO SHARE FILES ON NETWORK: ARCH VS WINDOWS

ARCH

 

 

Installation

 

Installing only the client program is sufficient for systems that are not meant to share files, only access them:

 

# pacman -S smbclient

 

In order to make shares available to clients, install the Samba server package:

 

# pacman -S samba

 

A daemon is installed with the server and it must be started for Samba to begin working. Samba typically uses FAM to monitor the file-system for changes, yet Gamin has almost completely replaced FAM as of recent, mainly because the former is poorly maintained and generally an inferior, unpopular choice.

 

To install Gamin:

 

# pacman -S gamin

 

Configuration

 

The /etc/samba/smb.conf file must be created before starting the daemons. Once that is setup, users may opt for using an advanced configuration interface like SWAT.

smb.conf

 

As root, copy the default Samba configuration file to /etc/samba/smb.conf:

 

# cp /etc/samba/smb.conf.default /etc/samba/smb.conf

 

Open smb.conf and edit it to suit your needs. The default file creates a share for each user's home directory. It also creates a share for printers.

Starting and automating the daemons

 

If using FAM, start the fam daemon before samba. Gamin does not need a daemon since it automatically starts when needed.

 

Without rebooting, FAM and Samba can be started with the commands:

 

# /etc/rc.d/fam start

# /etc/rc.d/samba start

 

Add fam and samba to the DAEMONS line in rc.conf to automatically start the daemons at boot.

SWAT: Samba web administration tool

 

SWAT is a facility that is part of the Samba suite. The main executable is called swat and is invoked by the eXtended InterNET Daemon, xinetd.

 

There are many and varied opinions regarding the usefulness of SWAT. No matter how hard one tries to produce the perfect configuration tool, it remains an object of personal taste. SWAT is a tool that allows Web-based configuration of Samba. It has a wizard that may help to get Samba configured quickly, it has context-sensitive help on each smb.conf parameter, it provides for monitoring of current state of connection information, and it allows network-wide MS Windows network password management.[1]

Note: If you have problems with these directions, you can use the more all-encompasing Webmin tool instead, and easily load the SWAT module there.

Warning: Before using SWAT, please be warned SWAT will completely replace your smb.conf with a fully optimized file that has been stripped of all comments you might have placed there, and only non-default settings will be written to the file.

 

To use SWAT, first install xinetd:

 

# pacman -S xinetd

 

Edit /etc/xinetd.d/swat using your favorite text editor. To enable SWAT, change the disable = yes line to disable = no.

 

service swat

{

port = 901

socket_type = stream

wait = no

user = root

server = /usr/sbin/swat

log_on_success += HOST DURATION

log_on_failure += HOST

disable = no

}

 

If xinetd was compiled with tcpwrapper flag enabled, edit /etc/hosts.allow by adding following line:

 

swat:127.0.0.1

 

Then start xinetd daemon:

 

# /etc/rc.d/xinetd start

 

The web interface can be accessed on port 901 by default,

 

http://localhost:901/

 

Adding users

 

To log into a Samba share you'll need to add a user:

 

# smbpasswd -a <user>

 

The user must already have a account on the server. If the user does not exist you will receive the error:

 

Failed to modify password entry for user "<user>"

 

You can add a new user to the Linux host with adduser. This article does not cover adding users to Windows systems.

Accessing Samba shares

 

KDE has the ability to browse Samba shares. You therefore do not need any additional packages if you're using KDE. If however you plan to use the share in Gnome or solely from a shell, you will need an additional package.

Accessing a Samba share from Gnome or KDE

 

In order to access samba shares from Nautilus you must first install the gvfs-samba package

 

# pacman -S gvfs-smb

 

From a Nautilus/Dolphin/Konqueror window, hit Ctrl+L or go to the "Go" menu and select "Location..." -- both actions will allow you to type in the "Go to:" blank. Enter:

 

smb://servername/share

 

Note: If you do not have your servername in your /etc/hosts, you must use the IP Address of the server in place of the servername.

 

For a GUI in the KDE System Settings you have to install the kdenetwork-filesharing package from [extra].

Accessing a Samba share from the shell

 

Shares may be accessed by using an automatic mounter or by using a manual method.

Automatic share mounting

 

There are several alternatives for easy share browsing.

smbnetfs

 

1. Install smbnetfs:

 

# pacman -S smbnetfs

 

2. Add the following line to /etc/fuse.conf:

 

user_allow_other

 

3. Load the fuse kernel module:

 

# modprobe fuse

 

4. Start the smbnetfs daemon:

 

# /etc/rc.d/smbnetfs start

 

All shares in the network are now automatically mounted under /mnt/smbnet.

 

Add the following to /etc/rc.conf to access the shares at boot:

 

MODULES=(... fuse ...)

DAEMONS=(... smbnetfs ...)

 

If a username and a password is required to access some of the shared folders, you have to edit /etc/smbnetfs/.smb/smbnetfs.conf by uncommenting the line starting with "auth" and editing it to your needs:

 

auth "WORKGROUP/username" "password"

 

Then, it may be necessary to change the permissions of /etc/smbnetfs/.smb/smbnetfs.conf for smbnetfs to work correctly:

 

# chmod 600 /etc/smbnetfs/.smb/smbnetfs.conf

 

fusesmb

Note: Because smbclient 3.2.X is malfunctioning with fusesmb, revert to using older versions if necessary. See the relevant forum topic for details.

 

1. Install the fusesmb package from the AUR using yaourt or other AUR Helpers:

 

$ yaourt -S fusesmb

 

2. Create a mount point:

 

# mkdir /mnt/fusesmb

 

3. Load fuse module:

 

# modprobe fuse

 

4. Mount the shares:

 

# fusesmb -o allow_other /mnt/fusesmb

 

For mounting shares at boot, add the command above to /etc/rc.local and add fuse module to /etc/rc.conf:

 

MODULES=(... fuse ...)

 

Autofs

 

See Autofs for information on the kernel-based automounter for Linux.

Manual share mounting

 

1. Use smbclient to browse shares from the shell. To list any public shares on a server:

 

$ smbclient -L <hostname> -U%

 

2. Create the mount point for the share:

 

# mkdir /mnt/MOUNTPOINT

 

3. Mount the share using mount.cifs. Keep in mind that not all options may be needed nor desirable, such as password:

 

# mount -t cifs //SERVER/SHARENAME MOUNTPOINT -o user=USERNAME,password=PASSWORD,workgroup=WORKGROUP,ip=SERVERIP

 

SERVER

The Windows system's name

SHARENAME

The shared directory

MOUNTPOINT

The local directory where the share will be mounted to

-o [options]

Specifies options for mount.cifs

 

user

Username used to mount the share

password

The shared directory's password

workgroup

Used to specify the workgroup

ip

The IP address of the server -- if the system is unable to find the Windows computer by name (DNS, WINS, hosts entry, etc.)

 

Note: Abstain from using trailing directory (/) characters. Using //SERVER/SHARENAME/ will not work.

 

4. To unmount the share, use:

 

# umount /mnt/MOUNTPOINT

 

Adding the share to fstab

 

Add the following to /etc/fstab for easy mounting:

 

//SERVER/SHARENAME /mnt/MOUNTPOINT cifs noauto,noatime,username=USER,password=PASSWORD,workgroup=WORKGROUP 0 0

 

The noauto option disables mounting it automatically at boot and noatime increases performance by skipping inode access times.

 

After adding the previous line, the syntax to mount files becomes simpler:

 

# mount /mnt/MOUNTPOINT

 

If adding a Samba share to fstab, the netfs daemon should also be added to rc.conf, somewhere after the network daemon. The netfs daemon will mount network partitions at boot and, more importantly, unmount network partitions at shutdown. Even if using the noauto option in fstab, the netfs daemon should be used. Without it any network share that is mounted when shutting down will cause the network daemon to wait for the connection to time out, considerably extending poweroff time.

Allowing users to mount

 

Before enabling access to the mount commands, fstab needs to be modified. Add the users options to the entry in /etc/fstab:

 

//SERVER/SHARENAME /path/to/SHAREMOUNT cifs users,noauto,noatime,username=USER,password=PASSWORD,workgroup=WORKGROUP 0 0

 

Note: The option is users (plural). For other filesystem types handled by mount, this option is usually user; sans the "s".

 

This will allow users to mount it aslong as the mount point resides in a directory controllable by the user; i.e. the user's home. For users to be allowed to mount and unmount the Samba shares with mount points that they do not own, use #smbnetfs, or grant privileges using sudo.

Tips and tricks

Share files for your LAN without user and password

 

Edit /etc/samba/smb.conf and change the following line:

 

security = user

 

to

 

security = share

 

If you want to restrict the shares data to a specific interface replace:

 

; interfaces = 192.168.12.2/24 192.168.13.2/24

 

with:

 

interfaces = lo eth0

bind interfaces only = true

 

(changing eth0 to the local network you want share with.)

 

If you want to edit the account that access the shares, edit the following line:

 

; guest account = nobody

 

The last step is to create share directory (for write access make writable = yes):

 

[Public Share]

path = /path/to/public/share

available = yes

browsable = yes

public = yes

writable = no

 

Sample configuration file

 

The configuration that worked for one user:

 

[global]

workgroup = WORKGROUP

server string = Samba Server

netbios name = PC_NAME

security = share

; the line below is important! If you have permission issues make

; sure the user here is the same as the user of the folder you

; want to share

guest account = mark

username map = /etc/samba/smbusers

name resolve order = hosts wins bcast

wins support = no

 

[public]

comment = Public Share

path = /path/to/public/share

available = yes

browsable = yes

public = yes

writable = no

 

Adding network shares using KDE4 GUI

 

How to configure the folder sharing in KDE4. Simple file sharing limits user shared folders to their home directory and read-only access. Advanced file sharing gives full semantics of Samba with no limits to shared folders but requires su or sudo root permissions.

 

* Read only, simple file sharing: Samba/Simple file sharing with KDE4

* Full capability file sharing: Samba/Advanced file sharing with KDE4

 

Discovering network shares

 

If nothing is known about other systems on the local network, and automated tools such as #smbnetfs are not available, the following methods allow one to manually probe for Samba shares.

 

1. First, install nmap and smbclient using pacman:

 

# pacman -S nmap smbclient

 

2. nmap checks which ports are open:

 

# nmap -sT 192.168.1.*

 

In this case, a scan on the 192.168.1.* IP address range has been performed, resulting in:

Command: nmap -sT 192.168.1.*

 

Starting nmap 3.78 ( http://www.insecure.org/nmap/ ) at 2005-02-15 11:45 PHT

Interesting ports on 192.168.1.1:

(The 1661 ports scanned but not shown below are in state: closed)

PORT STATE SERVICE

139/tcp open netbios-ssn

5000/tcp open UPnP

 

Interesting ports on 192.168.1.5:

(The 1662 ports scanned but not shown below are in state: closed)

PORT STATE SERVICE

6000/tcp open X11

 

Nmap run completed -- 256 IP addresses (2 hosts up) scanned in 7.255 seconds

 

The first result is another system; the second happens to be the client from where this scan was performed.

 

3. Now that systems with port 139 open are revealed, use nmblookup to check for NetBIOS names:

Command: nmblookup -A 192.168.1.1

 

Looking up status of 192.168.1.1

PUTER <00> - B <ACTIVE>

HOMENET <00> - <GROUP> B <ACTIVE>

PUTER <03> - B <ACTIVE>

PUTER <20> - B <ACTIVE>

HOMENET <1e> - <GROUP> B <ACTIVE>

USERNAME <03> - B <ACTIVE>

HOMENET <1d> - B <ACTIVE>

MSBROWSE <01> - <GROUP> B <ACTIVE>

 

Regardless of the output, look for <20>, which shows the host with open services.

 

4. Use smbclient to list which services are shared on PUTER. If prompted for a password, pressing enter should still display the list:

Command: smbclient -L \\PUTER

 

Sharename Type Comment

--------- ---- -------

MY_MUSIC Disk

SHAREDDOCS Disk

PRINTER$ Disk

PRINTER Printer

IPC$ IPC Remote Inter Process Communication

 

Server Comment

--------- -------

PUTER

 

Workgroup Master

--------- -------

HOMENET PUTER

 

This shows which folders are shared and can be mounted locally. See: #Accessing Samba shares

Troubleshooting

Trouble accessing a password-protected share from Windows

 

If you are having trouble accessing a password protected share from Windows, try adding this to /etc/samba/smb.conf:[2]

 

Note that you have to add this to your local smb.conf, not to the server's smb.conf

 

[global]

# lanman fix

client lanman auth = yes

client ntlmv2 auth = no

 

Getting a dialog box up takes a long time

 

I had a problem that it took ~30 seconds to get a password dialog box up when trying to connect from both Windows XP/Windows 7. Analyzing the error.log on the server I saw:

 

[2009/11/11 06:20:12, 0] printing/print_cups.c:cups_connect(103)

Unable to connect to CUPS server localhost:631 - Interrupted system call

 

I don't have any printer connected to this server, so I added this to the global section:

 

load printers = no

printing = bsd

disable spoolss = yes

printcap name = /dev/null

 

 

Not sure if all of them are necessary, but at least it works now.

Changes in Samba version 3.4.0

 

Major enhancements in Samba 3.4.0 include:

 

The default passdb backend has been changed to 'tdbsam'! That breaks existing setups using the 'smbpasswd' backend without explicit declaration!

 

If you would like to stick to the 'smbpasswd' backend try changing this in /etc/samba/smb.conf:

 

passdb backend = smbpasswd

 

or convert your smbpasswd entries using:

 

sudo pdbedit -i smbpasswd -e tdbsam

 

Error: Value too large for defined data type

 

With some applications you could get this error whith every attempt to open a file mounted in smbfs/cifs:

 

Value too large for defined data type

 

The solution[3] is to add this options to your smbfs/cifs mount options (in /etc/fstab for example):

 

,nounix,noserverino

 

 

WINDOWS

 

 

1: Høyreklikk mappe og velg properties

2: Trykk sharing og så "Share.."

3: Velg "Everyone", trykk "Add", velg "Read/Write" og trykk "Share".

Ferdig!

 

 

Endret av Todda7
Lenke til kommentar

Har selv Ubuntu server. Plottet inn 6 linjer i smb configen og laget et lite script for resten. Angående Windows vs Arch er det en tåpelig sammenligning, noe du vet utmerket godt.

Ja, Samba virket unødvendig tungvindt. Lyst å dele scriptet ditt?

Lenke til kommentar
  • 3 uker senere...

Linux blir for tungvindt, og Windows Home Server 2010 (Vail) vil ikke installere på harddisker mindre enn 150 GB (selv om check requirements er av). Skal installeres på Raptor 74 GB...

 

Kan man få all funksjonaliteten til WHS Vail til Windows Server 2008 R2?

Endret av Todda7
Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...