Example: marketing

Creating a NAS with Ubuntu Server - QuidsUp

Creating a NAS with Ubuntu ServerThis setup guide will show you how to setup a Network Attached Storage (NAS) systemwith Ubuntu Server , create Samba / SMB shares, install Usenet file downloader, and installautomated Usenet downloaders SickBeard and this guide along with my Youtube Video: commands are written in OrangeSettings you need to change for your system are written in PurpleItems Required: Wired Network Connection Small USB Flash drive (or CD) to install the OS 8GB (Minimum) Flash drive to run the OS A few spare hoursA NAS device can be created with minimal hardware, such as: Single core CPU, 512MB RAM, 160GB Hard Drive, and a USB Flash my NAS Im using: AMD E-450 CPU ( dual core), 8GB DDR3 RAM, 3x 3TB Seagatehard drives, and a 16GB Flash system is running with RAID5 giving me a single 6TB drive mounted in /media.

Post Processing: TV Download Folder: Blank Keep Original Files: No Move Assiciated Files: No Rename Episodes: Yes Scan and Process: No Metadata Type: XBMC Show Name: Yes Episode Name: Yes Use Periods: No Quality: No Air-By-Date Format: No Separator Style: Dash ... starts and stops sick beard # Description: Sick Beard is an Usenet PVR. For more ...

Tags:

  Post, Processing, Start, Starts and stops, Episode

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Creating a NAS with Ubuntu Server - QuidsUp

1 Creating a NAS with Ubuntu ServerThis setup guide will show you how to setup a Network Attached Storage (NAS) systemwith Ubuntu Server , create Samba / SMB shares, install Usenet file downloader, and installautomated Usenet downloaders SickBeard and this guide along with my Youtube Video: commands are written in OrangeSettings you need to change for your system are written in PurpleItems Required: Wired Network Connection Small USB Flash drive (or CD) to install the OS 8GB (Minimum) Flash drive to run the OS A few spare hoursA NAS device can be created with minimal hardware, such as: Single core CPU, 512MB RAM, 160GB Hard Drive, and a USB Flash my NAS Im using: AMD E-450 CPU ( dual core), 8GB DDR3 RAM, 3x 3TB Seagatehard drives, and a 16GB Flash system is running with RAID5 giving me a single 6TB drive mounted in /media.

2 It hasSMB shares setup, which allows shared access for all devices (computers, media player,and Android tablet) on my m also using the system as a Media Downloader to download files from of user interaction is done via Web GUI s, although there s remote access terminalavailable via SSH. Since everything can be done remotely over the network the NAS sitsthere running as a headless Server (no keyboard or monitor connected).Installing Ubuntu ServerDownload Ubuntu Server from: write it to the small USB Flash drive or CDWe are going to install the operating system to a USB Flash drive, this makes it easier to usethe hard drives in a RAID array and keep the OS separate from data storage. Ubuntu Serveris light enough to run on a Flash drive, and with enough RAM theres no appreciable delay inusing the 's certainly a cheaper alternative than installing the OS on a Solid State all hard drives and then install the Server OS onto the Flash the end of the install it asks you which components you would like to install, fromthat list choose SSH Server , and the computer, reconnect all hard drives, and then switch back all being well you will get a login screen.

3 Login with your username and Check For Updatessudo apt get updatesudo apt get dist upgradesudo rebootSet Static IP Addresssudo nano /etc/network/interfacesiface eth0 inet staticaddress nameservers the IP addresses for your is Google DNS Server , I find this a lot better than my ISP s DNS NAS IP Address to your Local DNS LookupThis is on any Linux computer that you would like to access the NAS echo " " >> /etc/hostsThe NAS can be accessed via SSH with the following terminal command:ssh MDADM RAID Controller (Optional if using RAID)sudo apt get no install recommends install mdadmInstall apt get install libapt pkg perl libnet ssleay perllibauthen pam perl libio pty perl apt show versionscd ~wget dpkg i webmin*.debsudo rebootSetup RAIDOpen browser and navigate to: :10000 Create and mount RAID via Webmin RAID setup a mount point for the RAID in /media/raidmount(It took approximately 36 hours to create a 9TB RAID5 array on my system, but the systemwas fully usable for this time)Alternatively Mount a Single Drive instead of RAID sudo mkdir /media/disk1sudo blkidTake a note of the ID number for the drive you would like to mountsudo nano /etc/fstabAdd new line:UUID= ID From blkid /media/disk1ext4 rw,user,auto 00 Note.

4 For the remainder of the document I refer to the mounted drive as raidmount , but thisdoesn t mean it has to be a RAIDC reate Shared Folderssudo sucd /media/raidmountmkdir Folder1mkdir Folder2 Depending how you would like Samba / SMB shares to be accessed you have two Access for one user, and Read Only Access for everyone Access for everyoneRead/Write Access for one user:chown user:user Folder1/chown user:user Folder2/Read/Write Access for everyone:chmod a=rw R /media/raidmountchown nobody:nogroup Folder1/chown nobody:nogroup Folder2/Setup Samba SharesBackup old Config File:sudo cp /etc/ /etc/ file can be found at Annex A (at the end of this document)Use Webmin > Servers > Samba Windows File Sharing > Edit Config File, to copy and pasteexample Config file Restart Samba Servers button after editing Config fileUsenet ComponentsInstall SABNZBD sudo suapt get install python software properties add apt keyadd apt repository ppa.

5 Jcfp/ppaapt get updateapt get install javascript common libjs excanvas libjs mochikitlibtidy 0 par2 python chardet python cheetah python configobjpython feedparser python libxml2 python openssl python utidylibpython yenc python dbus zip unrar unzip python markdownpython pygments python memcacheapt get install sabnzbdplus sabnzbdplus theme plushsabnzbdplus theme smplsed i 's/USER=/USER=user/' /etc/default/sabnzbdplussed i 's/HOST=/HOST= ' /etc/default/sabnzbdplussed i 's/PORT=/PORT=6000/' /etc/default/sabnzbdplussudo service sabnzdbplus restartConfigure SABNZBDOpen web browser to the setup wizard and fill in your Usenet Provider the following changes in Config:General:API Key*Note this down for copying into SickBeard and CouchPotatoThe following changes will need to be made after you ve installed SickBeardFolders:Temporary Download Folder:/media/raidmount/DownloadsComplet ed Download Folder:/media/raidmount/NewPermissions for completed downloads: 755 post processing Scripts Folder: /home/user/SickBeard/autoProcessTVCatego ries:movieScript: DefaultFolder: /media/raidmount/Downloads/MoviestvScrip t: : /media/raidmount/TVInstall Sick BeardDownload from website: Into the NAS via NautilusUnzip and copy into /home/user/SickBeardcd ~/SickBeard/autoProcessTVmv ~/SickBeard/ the following Changes:host=localhostport=6001 Create Sick Beard Init ScriptExample Sickbeard Init Script can be found at Annex BWith Nautilus create new text file in your home folder.

6 Copy in the example Init Script andmake the necessary cp ~/NewTextFile / / mv NewTextFile sickbeardsudo chmod 755 sickbeardsudo update sickbeard defaultssudo service sickbeard startOpen web browser to :8081 and then make the following changes inSickBeard Config:General:Port:6001 Search Settings:Download Propers:YesSearch Frequency:60 Usenet Retention:1325 NZB Method:SABNZDBSABNZDB URL:http://localhost:6000 API Key:Copy from SAB ConfigSearch Providers:NewznabName:Your NZB Searcher, :Their internet address, Key:Your RSS / API Key provided by your NZB SearcherPost processing :TV Download Folder:BlankKeep Original Files:NoMove Assiciated Files:NoRename Episodes:YesScan and Process:NoMetadata Type:XBMCShow Name:YesEpisode Name:YesUse Periods:NoQuality:NoAir-By-Date Format:NoSeparator Style:DashNumber Style:S01E02 Install CouchPotatoDownload from website: Into the NAS via NautilusUnzip and copy into /home/user/CouchPotatoCreate CouchPotato Init ScriptExample CouchPotato Init Script can be found at Annex CWith Nautilus create new text file in your home folder.

7 Copy in the example Init Script andmake the necessary cp ~/NewTextFile / / mv NewTextFile couchpotatosudo chmod 755 couchpotatosudo update couchpotato defaultssudo service couchpotato startOpen web browser to :5000 and then make the following changes inCouchPotato Config:General: :6002 Ignore Words:HDTVP referred Words:BluRay, DTSD ownloaders:Enable:YesRetention:1325 DaysHost:localhost:6000 API Key:Copy from SAB ConfigCategory:moviesTorrents:NoProvider s:NewznabName:Your NZB Searcher, :Their internet address, Key:Your RSS / API Key provided by your NZB SearcherAnnex A: Example file#======================= Global Settings =======================[global]log file = /var/log/ printers = nopasswd chat = *Enter\snew\s*\spassword:* %n\n*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .obey pam restrictions = yesnull passwords = yesmap to guest = Bad Userencrypt passwords = yespassdb backend = tdbsampasswd program = /usr/bin/passwd %udns proxy = noserver string = %h Server (Samba, Ubuntu )

8 Unix password sync = yesworkgroup = WORKGROUP debug level = 1guest account = nobodyos level = 20auto services = globalsyslog = 0usershare allow guests = yespanic action = /usr/share/samba/panic action %dmax log size = 1000pam password change = yesuse sendfile = yestime Server = nowins support = no#======================= Share Definitions =======================[homes]browseable = nocomment = Home Directoriesavailable = no[Folder1]read list = nobody,userwrite list = user, add nobody here for passwordless read/write accessforce directory mode = 0755store dos attributes = nocreate mask = 0755hide dot files = yesuser = nobody,userpublic = yesea support = noinherit acls = yesbrowseable = yeswriteable = yesinherit permissions = yesprintable = nopath = /media/raiddisk/Folder1force create mode = 0755comment = Folder 1directory mask = 0755valid users = nobody,userAnnex B: Sickbeard Init Script#!

9 /bin/sh# Edited by QuidsUp # Based on script written by daemox # Modified to run on Debian and Ubuntu Server ### BEGIN INIT INFO# Provides: sickbeard# Required start : $local_fs $network $remote_fs# Required Stop: $local_fs $network $remote_fs# Should start : $NetworkManager# Should Stop: $NetworkManager# Default start : 2 3 4 5# Default Stop: 0 1 6# Short Description: starts and stops sick beard# Description: Sick Beard is an Usenet PVR. For moreinformation see:# ### END INIT INFO#Required Must Be Changed!USER=user #Set Linux Mint, Ubuntu , or Debian user name here.#Required Defaults Provided (only change if you know you need to).HOST= #Set Sick Beard address #Set Sick Beard port here.#Optional Unneeded unless you have added a user name and passwordto Sick "" #Set Sick Beard user name (if you use one) "" #Set Sick Beard password (if you use one) here.

10 #Script No changes needed "$1" instart)# start Sick Beard and send all messages to /dev/null.#cd /home/$USER/.sickbeardecho "Starting Sick Beard"sudo u user EH nohup python /home/user/ q >/dev/null 2>&1 & stop)#Shutdown Sick Beard and delete the files that "Stopping Sick Beard"wget q user=$SBUSR password=$SBPWD"http://$HOST:$PORT/home/ shutdown/" delete aftersleep 6s *)echo "Usage: $0 { start |stop}"exit 1esacexit 0 Annex C: CouchPotato Init Script#! /bin/sh# Author: RuudBurger# Edited by: QuidsUp ### BEGIN INIT INFO# Provides: CouchPotato application instance# Required start : $local_fs $network $remote_fs# Required Stop: $local_fs $network $remote_fs# Should start : $NetworkManager# Should Stop: $NetworkManager# Default start : 2 3 4 5# Default Stop: 0 1 6# Short Description: starts instance of CouchPotato# Description: starts instance of CouchPotato usingstart stop daemon### END INIT INFO#Required Must be changed!