Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######### Getting Debian Setup #########
- // How to create a linux live boot on linux
- // First download the copy of debian you want (I use netinst)
- // One you have the iso run the following commands to make a live boot on a USB
- // Format the USB you plan on using as FAT32
- // Creating these live boots assumes you are making them on a linux box already
- // There is two ways to create a live boot, but the 1st is my favorite
- // The first way to make a USB live boot:
- # Copying the .iso to USB
- cp debian.iso /dev/sdX
- sync
- # The second way to is to install pv if you don’t already have it with
- sudo apt-get install pv
- # Then make the Live Boot USB with pv
- sudo -i
- dd bs=4M if=/path/to/debian.iso | pv | dd of=/dev/sdx && sync
- exit
- ######### Setting up and Configuring Debian #########
- # Add your user to sudoers list below the root user (my user name is dan, change it to your username)
- # If you dont have gedit then install it, you can switch to the root user to install by typing "su -"
- # then type "apt-get install gedit" Gedit is just my favorite text editor. You can use whatever.
- # Once you're done configuring the sudoers list make sure you log out of root by typing "exit"
- # Switch user to root
- su -
- # Edit the sudoers list
- gedit /etc/sudoers
- # Add your user below the root user, save and close text editor.
- dan ALL=(ALL:ALL) ALL
- # Type exit in terminal to log you out of root user.
- # You can tell if you are root or user if the terminal starts with user@computer:~$ (User logged in)
- # Or if root is still logged in it will look like root@computer:~#
- # If unsure just exit the terminal and open another
- exit
- # Run an update and make sure you can update the repos with your user using sudo
- sudo apt-get update
- # Update the sources list
- # Use source list in folder
- sudo gedit /etc/apt/sources.list
- # Sources List
- deb http://ftp.us.debian.org/debian/ stretch main contrib non-free
- deb-src http://ftp.us.debian.org/debian/ stretch main contrib non-free
- # Security List
- deb http://security.debian.org/debian-security stretch/updates main contrib non-free
- deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
- # Kernel List
- deb http://mirrors.kernel.org/debian/ stretch main contrib non-free
- deb-src http://mirrors.kernel.org/debian/ stretch main contrib non-free
- # Debian Multimedia
- deb http://www.deb-multimedia.org/ stretch main non-free
- # X2Go Repository (release builds)
- deb http://packages.x2go.org/debian stretch main
- deb-src http://packages.x2go.org/debian stretch main
- # Then Update
- sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E && sudo apt-get -y update
- BUG: "gpg: failed to start the dirmngr"
- #I was able to fix with the following commands:
- 1. sudo apt remove gnupg
- 2. sudo apt install --reinstall gnupg2 (possibly not necessary, but doesn't hurt)
- 3. sudo apt install dirmngr
- # Install Multimedia Keyring & X2Go Keyring
- sudo apt-get install deb-multimedia-keyring
- sudo apt-get install x2go-keyring
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get dist-upgrade
- # Install Kernel Headers
- sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
- # Install More programs, Multimedia, Realtek drivers, x2go
- # You may not need all these but this is what I install. Some errors may come up saying cant find package.
- # If that happens remove that program from this command and run it again
- # Command that works
- sudo apt-get install libreoffice gimp guake icedtea-plugin unace rar p7zip sharutils uudeview mpack arj cabextract lzip lunzip bleachbit gparted vlc pv ffmpeg libdvdcss2 mplayer flashplayer-mozilla firmware-realtek nfs-common docky libreoffice x2goserver x2goserver-xsession synaptic apt-xapian-index gdebi gksu firmware-linux intel-microcode ttf-freefont ttf-mscorefonts-installer ttf-bitstream-vera ttf-dejavu ttf-liberation clementine parcellite evince file-roller shotwell gnome-disk-utility libavcodec-extra xscreensaver-gl playonlinux wine winetricks apt-transport-https putty arp-scan system-config-printer task-print-server cups pkg-config git build-essential automake autoconf libtool pkg-config intltool autoconf-archive libpcre3-dev libglib2.0-dev libgtk-3-dev libxml2-utils cifs-utils
- # Install Intel Drivers for My AC Wifi card and most other intel chips
- sudo apt-get install firmware-iwlwifi
- # Install Nvidia Drivers
- # Follow this tutorial:
- http://linuxconfig.org/nvidia-geforce-driver-installation-on-debian-jessie-linux-8-64bit
- # sudo apt-get install nvidia-driver
- # sudo apt-get install nvidia-xconfig
- # sudo apt-get install nvidia-settings
- # sudo nvidia-xconfig
- # sudo nvidia-settings
- # Run this comand to fix lag:
- sudo nvidia-settings -a InitialPixmapPlacement=0
- # Then Install Steam
- # Follow this tutorial:
- http://linuxconfig.org/installation-of-steam-client-on-debian-jessie-8-linux-64bit
- wget http://media.steampowered.com/client/installer/steam.deb
- sudo dpkg -i steam.deb
- sudo apt-get -f install
- sudo dpkg --add-architecture i386
- sudo apt-get update
- sudo apt-get install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386
- sudo apt-get install libgl1-nvidia-glx:i386
- steam
- ######### Debian Fixes for Random Bugs #########
- # Disabling Soundcards in Debian using ALSA
- cat /proc/asound/cards
- cat /proc/asound/modules
- sudo nano /etc/modprobe.d/alsa-base.conf
- options snd_hda_intel index=-1
- options snd_usb_intel index=-2
- sudo nano /etc/modprobe.d/sound
- options snd-usb-audio index=0
- options snd-hda_intel index=-1
- options snd-hda_intel index=-2
- sudo nano /etc/modprobe.d/blacklist.conf
- blacklist snd_hda_intel
- # Cinnamon: No admin prompt for elevated privileges
- # Basically if I tried opening Gparted or Synaptic it wouldn't because no admin password prompt
- # Found the fix on a Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845764
- # Edit this file: "/usr/share/applications/cinnamon-polkit-gnome-authentication-agent-1.desktop"
- '/usr/share/applications/cinnamon-polkit-gnome-authentication-agent-1.desktop' has some thing wrong.
- In this file, at about line 82, there is
- 'Exec=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1',
- but in the fact, there is no directory named policykit-1-gnome in '/usr/lib/'.
- It should be 'Exec=/usr/lib/polkit-gnome-authentication-agent-1'
- # Install Grub Customizer to change Grub boot order
- # Follow this tutorial:
- http://www.linuxserve.com/2015/05/how-to-install-grub-customizer-406-in.html
- # Reset Panel in XFCE to defualt
- xfce4-panel --quit ; pkill xfconfd ; rm -rf ~/.config/xfce4/panel ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml ; xfce4-panel;
- ######### NFS Server Shares for Kodi ########
- # Install Requirements
- sudo apt-get install nfs-kernel-server nfs-common
- # Pick which folder you want to share and change permissions and ownership
- mkdir /home/client1
- chown nobody:nogroup /home/client1
- chmod 755 /home/client1
- # Add the folder as a NFS share to the exports file
- sudo gedit /etc/exports
- "/home/dan/Videos 10.0.0.0/255.255.255.0(rw,all_squash,insecure)"
- Save changes and close
- # Restart the NFS service
- /etc/init.d/nfs-kernel-server restart
- ######### Mounting Network Shares (fstab) #########
- # Setup fstab to mount shares
- # Follow this tutorial:
- # I have included my fstab file which mounts the share using my user
- https://wiki.ubuntu.com/MountWindowsSharesPermanently
- # How you manually mount a smb/cifs share:
- mount.cifs //10.0.0.10/employee_storage/ /mnt/shares/employee_storage/ -o user=dan,pass=security
- //10.0.0.10/employee_storage /mnt/shares/employee_storage cifs username=dan,password=security 0 0
- # Edit fstab
- sudo gedit /etc/fstab
- # My fstab file looks like this
- # /etc/fstab: static file system information.
- #
- # Use 'blkid' to print the universally unique identifier for a
- # device; this may be used with UUID= as a more robust way to name devices
- # that works even if disks are added and removed. See fstab(5).
- #
- # <file system> <mount point> <type> <options> <dump> <pass>
- # / was on /dev/sda1 during installation
- UUID=e319384f-9b7f-4cce-8930-90297c59b87c / ext4 errors=remount-ro 0 1
- # swap was on /dev/sda5 during installation
- UUID=91b7f2a3-8200-4fbd-bd04-5408708f80f2 none swap sw 0 0
- ##### ONLY USE THE EXAMPLES FROM BLOW THIS LINE THE ABOVE WILL BE DIFFERENT FOR EACH DEVICE #####
- # FreeNAS NFS Shares
- #Prometheus
- 10.0.0.25:/mnt/Prometheus /mnt/nfs/Prometheus nfs rw,sync,hard,intr 0 0
- 10.0.0.25:/mnt/Prometheus/Movies /mnt/nfs/Prometheus/Movies nfs rw,sync,hard,intr 0 0
- 10.0.0.25:/mnt/Prometheus/TVshows /mnt/nfs/Prometheus/TVshows nfs rw,sync,hard,intr 0 0
- #Kronos
- 10.0.0.25:/mnt/Kronos/Applications /mnt/nfs/Kronos/Applications nfs rw,sync,hard,intr 0 0
- 10.0.0.25:/mnt/Kronos/Movies /mnt/nfs/Kronos/Movies nfs rw,sync,hard,intr 0 0
- 10.0.0.25:/mnt/Kronos/Storage /mnt/nfs/Kronos/Storage nfs rw,sync,hard,intr 0 0
- 10.0.0.25:/mnt/Kronos/TVshows /mnt/nfs/Kronos/TVshows nfs rw,sync,hard,intr 0 0
- 10.0.0.25:/mnt/Kronos/Anime /mnt/nfs/Kronos/Anime nfs rw,sync,hard,intr 0 0
- #FreeNAS SMB Shares
- #Kronos
- //10.0.0.25/KMovies /mnt/smb/Kronos/Movies cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- //10.0.0.25/KTVshows /mnt/smb/Kronos/TVshows cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- //10.0.0.25/KStorage /mnt/smb/Kronos/Storage cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- //10.0.0.25/KApplications /mnt/smb/Kronos/Applications cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- //10.0.0.25/KAnime /mnt/smb/Kronos/Anime cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- #Prometheus
- //10.0.0.25/PMovies /mnt/smb/Prometheus/Movies cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- //10.0.0.25/PTVshows /mnt/smb/Prometheus/TVshows cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- //10.0.0.25/PDocuments /mnt/smb/Prometheus/Documents cifs guest,uid=1000,comment=systemd.automount,iocharset=utf8 0 0
- --------------------------------------------------------------------------------------------------------------------------------------------------
- If you want to setup the NFS client on your linux machine (After setting up NFS shares on FreeNAS)
- First Install the client:
- "sudo apt-get install nfs-common"
- Then make your directories to mount the NFS shares to:
- "sudo mkdir -p /mnt/nfs/Prometheus"
- And do this for all of the directories you have. Then you need to try and mount the NFS shares:
- "sudo mount 192.168.2.25:/mnt/Prometheus /mnt/nfs/Prometheus"
- or
- "sudo mkdir -p /mnt/nfs/Games"
- "sudo mount 192.168.2.25:/mnt/Storage/Storage/Games /mnt/nfs/Games"
- I noticed I coulnt just mount storage and view the files inside, so I ended up just mounting the folders
- in my storage zpool is setup as Storage/Storage/"Folders"
- The "Folders" is different datasets setup in FreeNAS so I can monitor the size for each folder better and through the WebUI
- ----------------------------------------------------------------------------------------------------------------------------------------------
- Now to set it up to mount those shares at boot of the PC
- So edit fstab:
- "sudo gedit /etc/fstab"
- #NFS Shares to mount at bootup
- 192.168.0.100:/mnt/Prometheus /mnt/nfs/Prometheus nfs rw,sync,hard,intr 0 0
- -----------------------------------------------------------------------------------------------------------------------------------------------
- # Unzipping multiple .rar and .zip files
- Unzip multiple .rar files:
- "for f in *.rar;do unrar e $f;done"
- Unzip multiple .zip files:
- "unzip '*.zip' -d /folder/with/zips/"
- # Repackage .deb files
- mkdir tmp
- dpkg-deb -R original.deb tmp
- # edit DEBIAN/postinst
- dpkg-deb -b tmp fixed.deb
- ----------------------------------------------------------------------------------------------------------
- # Building from source and errors and how to fix them #
- Error: configure: WARNING: 'missing' script is too old or missing
- Run this before configure, make, make install:
- autoreconf -fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement