Geek Freely: ubuntu

    Featured Post

    The whole point in this post is to run your own VPN service, and allow you to connect remote devices to your home network.

    To start off yo…

    Showing posts with label ubuntu.

    Showing posts with label ubuntu.

    The whole point in this post is to run your own VPN service, and allow you to connect remote devices to your home network.

    To start off you need to choose a server that is going to be always available, or at least you should try to do that. Next thing is to install OpenVPN on the server and configure it, this can be done in no time at all with the help of the following site:

    The first command you are going to need to do is as follows:

    This downloads and executes the installation script, I had to run this as sudo, so:

    This script will take you through a variety of questions where you are prompted for entry, in most cases the default option will be appropriate and filled – however if you are running behind a firewall (which you probably will be, I’d like to point out a couple of gotchas).

    The IP address of the local machine should indeed be the local IP, there are other sites that suggest this should be the WAN IP of the server, that’s fine if the server has direct access to the internet – which mine does not, since it is behind the firewall I choose the local IP so it configures the correct interface to be monitoring.

    Next major question is configuring your external IP if you are behind a NAT, honestly you should be using a FQDN and not an IP – check out my previous post on dynu.com options []

    Once you are finished answering the questions you are ready to make client profiles, run the installer again and you will be prompted a variety of options, you are going to want to add a user:

    1) Add a new user

    2) Revoke an existing user

    3) Remove OpenVPN

    4) Exit

    Now that you have OpenVPN server installed in Ubuntu, and a client profile created for your device – all you have to do is setup any port forwarding required to the OpenVPN server.

    So in my case I setup a rule to forward all 1178 (1194 if you followed the default options) UDP VPN requests from my external IP address to the local IP address of the server running OpenVPN. This was done at my cable modem/router.

    That’s it, you’re done. Let me know if you have any questions or comments below – feel free to donate/tip the creator of the script on the following site:

    First of all, download the appropriate file for your operating system, https://plex.tv/downloads. For me I am using 64-bit.

    In a command line I type:

    wget https://downloads.plex.tv/plex-media-server/0.9.12.1.1079-b655370/plexmediaserver_0.9.12.1.1079-b655370_amd64.deb

    This downloads the file to my server, from here I simply install the software:

    sudo dpkg -i plexmediaserver_0.9.12.1.1079-b655370_amd64.deb

    Once the install is finished, reboot.

    sudo reboot

    So I finally decided to build a dedicated Plex Media Server, my desktop wasn’t cutting it.

    I used the following Plex link to educate myself about the system requirements.

    The Hardware

    Basically it stated that for every HD movie I wish to trans-code and stream I needed a passmark of about 2000.

    Check

    to determine your CPU passmark, and investigate what you need.

    I decided that at maximum I would have 3 simultaneous streams going on, of my home movies of course. All these streams being HD – factor in your network upload speeds when determining what you can handle.

    So, ballpark I needed a processor capable of about 6000 on the passmark scale – and I also made room for overhead.

    I went with the following processor which gave me a passmark around 7300.:

    Start with the processor then let this dictate the rest, I like to keep my systems small so I was looking for a mini-ITX that was LGA 1150 compatible. Please remember and check the CPU maker site to confirm motherboard (MB) compatability.

    The MB I chose in the end was:

    Mini-ITX means smaller case. I went with the following for simplicity.

    So I have my processor, my MB, my case. I added 4GB of RAM and a 120GB SSD. The solid state disk was a little large, since I won’t keep my movies locally. This is the RAM and HD:

    The Software

    So to keep things slick I decided to install Plex on Ubuntu, I figure any future services I want to run will no doubt work on Linux, that and I know Ubuntu. Check the official Plex site for more details on setting this up

    I installed Ubuntu Server, because I don’t really see a need for a GUI front-end, Plex is configured via the web. After installing Ubuntu Server, installing Plex is simple enough:

    Download the .deb package from . if you are putting it on a USB for installing on the Ubuntu Server, you may want to install usbmount to automount inserted USB sticks.

    sudo apt-get install usbmount

    Once you have the .deb package on your server, go ahead and install with the following command, relative to your .deb filename of course:

    sudo dpkg -i plexmediaserver_0.9.8.18.290-11b7fdd_amd64.deb

    To setup the server, open a browser window, and go to http://127.0.0.1:32400/web, replacing 127.0.0.1 for the IP of the server if you are configuring this remotely.

    Setting Up NAS Shares

    The next thing you are going to want to do before getting involved with the configuration is map all your samba shares.

    You will need cifs-utils:

    sudo apt-get install cifs-utils

    I used the following link to work out my samba situation:

    Make a .smbcredential file in your home directory so you can map your fstab correctly. In this file put username and equals sign and the access username for the share (and domain if loging into a domain) on the first line, put password and equals sign and the password for that user account on the second line of the file. The file should look like:

    username=MyUsername

    password=MyPassword

    # OR:

    # username=MyUsername@MyDomain

    # password=MyPassword

    # OR: (for cifs on Windows Serve 2003)

    # username=MyDomain/MyUsername

    # password=MyPassword

    Edit fstab to map your mounts (sudo nano /etc/fstab). Entries in your fstab should look similar to the following:

    //master/install_files /path/to/mnt cifs iocharset=utf8,credentials=/path/to/.smbcredentials,uid=1000 0 0

    Where…

    //$SERVER/$SHARE $MOUNTPOINT $FS_TYPE credentials=$SMB_CREDENTIALS,uid=$UID,gid=$GID

    # e.g.

    SERVER=master

    SHARE=install_files

    MOUNTPOINT=/path/to/mnt

    FS_TYPE=smbfs

    SMB_CREDENTIALS=/path/to/.smbcredentials

    UID=1000

    GID=1000

    Once completed exit nano and save the changes to fstab. Make sure that the shares mount correctly:

    sudo mount -a

    If successful, reboot and make sure that mounts and Plex start automagically.

    Now configure your Plex shares! Enjoy.

    I always forget how to upgrade my Nvidia graphics driver, so here it is :

    To stop gdm from virtual console (after going to virtual console by giving Ctrl + Alt + F1

    sudo service gdm stop

    To start after installing nvidia drivers:

    sudo sh ./NVIDIA-Linux-*

    To start it is as simple as stopping

    sudo service gdm start

    And I used these commands for this little beast:

    So I have FreeNAS running samba shares on my network, for the most part I really don’t need to access the data on my actually Linux boxes – only my HTPC.

    But I decided I wanted to create mount point on the media folder of my Ubuntu install.

    So here is what I had to do in fstab (/etc/fstab)

    //freenas_server/sharename /media/localsharedirectory cifs credentials=/home/macleod/smb.credentials,uid=mountuser,gid=mountgroup,iocharset=utf8,codepage=cp437,auto 0 0

    My credentials are stored in smb.credentials, like so:

    username=myuname

    password=mypwd

    And I got most of the information from here:

    Obviously replace mountgroup, mountuser with your ubuntu username and group (group is probably the same as name).  Also replace the appropriate shares and credentials – hopefully you get the picture.

    UPDATE:

    I edited the fstab entry so I now define the iocharset and codepage, this is so foreign characters are displayed correctly in the filesystem, and applications.  I noticed the issue due to having display issues in iSub and Subsonic.

    UPDATE2:

    The DOS Charset should be CP437 – CP850 is missing a few which I needed for foreign language music artists.

    Subscribe to:

    Labels

    Blog Archive

    Links

    Leave a Reply

    Your email address will not be published.