#!/bin/bash # 2015-0824 # This script will run on a new server to install and configure defaults. if [ "`/usr/bin/whoami`" != "root" ] ; then echo "Must run as root userID" exit fi if [ "`cat /etc/fedora-release`" != "Fedora release 22 (Twenty Two)" ] ; then echo "This script is configured to work on Fedora 22 only" exit fi if [ "`rpm -qa | grep libreoffice`" = "" ] ; then echo "--------------------------------" echo "Installing LibreOffice" echo "--------------------------------" dnf -y install @libreoffice # dnf -y install @office # dnf groupinstall "Office/Productivity" # dnf -y install libreoffice-writer libreoffice-calc libreoffice-impress libreoffice-draw libreoffice-base # # To see all the groups with their short names: dnf -v grouplist fi if [ "`rpm -qa | grep ^screen-`" = "" ] ; then echo "--------------------------------" echo "Installing screen" echo "--------------------------------" dnf -y install screen fi if [ "`rpm -qa | grep gnome-tweak-tool`" = "" ] ; then echo "--------------------------------" echo "Installing gnome-tweak-tool" echo "--------------------------------" dnf -y install gnome-tweak-tool fi if [ "`uname -i`" = "i386" -a "`rpm -qa|grep flash-plugin`" = "" ] ; then echo "Installing Flash player for i386 systems" echo "----------------------------------------" rpm -Uvh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux dnf clean all sleep 5 dnf -y install flash-plugin nspluginwrapper alsa-plugins-pulseaudio fi if [ "`uname -i`" = "x86_64" -a "`rpm -qa|grep flash-plugin`" = "" ] ; then echo "Installing Flash player for x86_64 systems" echo "------------------------------------------" rpm -Uvh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux dnf clean all sleep 5 dnf -y install flash-plugin fi # Google Chrome web browser if [ ! -f /etc/dnf.repos.d/google-chrome.repo -o "`grep gpgkey /etc/dnf.repos.d/google-chrome.repo`" = "" ] ; then echo "[google-chrome]" > /etc/dnf.repos.d/google-chrome.repo echo "name=google-chrome - \$basearch" >> /etc/dnf.repos.d/google-chrome.repo echo "baseurl=http://dl.google.com/linux/chrome/rpm/stable/\$basearch" >> /etc/dnf.repos.d/google-chrome.repo echo "enabled=1" >> /etc/dnf.repos.d/google-chrome.repo echo "gpgcheck=1" >> /etc/dnf.repos.d/google-chrome.repo echo "gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub" >> /etc/dnf.repos.d/google-chrome.repo fi if [ "`uname -i`" = "i386" -a "`rpm -qa|grep google-chrome`" = "" ] ; then echo "Installing Google Chrome for i386 systems" echo "-----------------------------------------" dnf -y install https://dl.google.com/linux/direct/google-chrome-stable_current_i386.rpm fi if [ "`uname -i`" = "x86_64" -a "`rpm -qa|grep google-chrome`" = "" ] ; then echo "Installing Google Chrome for x86_64 systems" echo "-------------------------------------------" dnf -y install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm fi if [ "`rpm -qa | grep filezilla`" = "" ] ; then echo "--------------------------------" echo "Installing filezilla" echo "--------------------------------" dnf -y install filezilla fi if [ "`rpm -qa | grep sysstat`" = "" ] ; then echo "--------------------------------" echo "Installing sysstat" echo "--------------------------------" dnf -y install sysstat fi if [ "`rpm -qa | grep partimage`" = "" ] ; then echo "--------------------------------" echo "Installing partimage" echo "--------------------------------" dnf -y install partimage fi if [ "`rpm -qa | grep wget`" = "" ] ; then echo "--------------------------------" echo "Installing wget" echo "--------------------------------" dnf -y install wget fi # Enable RPM Fusion (See http://rpmfusion.org/) if [ ! -f /etc/dnf.repos.d/rpmfusion-free.repo -o ! -f /etc/dnf.repos.d/rpmfusion-nonfree.repo ] ; then echo "Installing RPMFusion repo and updating it" echo "-----------------------------------------" dnf -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-21.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-21.noarch.rpm fi if [ "`rpm -qa | grep unrar`" = "" ] ; then echo "--------------------------------" echo "Installing unrar" echo "--------------------------------" dnf -y install unrar fi if [ "`rpm -qa | grep gstreamer-plugins-ugly`" = "" ] ; then echo "--------------------------------" echo "Installing mp3 support" echo "--------------------------------" dnf -y install gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly libmad libid3tag id3v2 fi if [ "`rpm -qa | grep audacious-plugins-freeworld-mp3`" = "" ] ; then echo "--------------------------------" echo "Installing audacious" echo "--------------------------------" dnf -y install audacious audacious-plugins-freeworld* nautilus-actions fi if [ "`rpm -qa | grep k3b`" = "" ] ; then echo "--------------------------------" echo "Installing K3B CD burning software" echo "----------------------------------" dnf -y install k3b-extras-freeworld kdebase-runtime vcdimager normalize transcode lame lame-libs fi if [ "`rpm -qa | grep gtkpod`" = "" ] ; then echo "--------------------------------" echo "Installing gtkpod IPod software" echo "--------------------------------" dnf -y install gtkpod fi if [ "`rpm -qa | grep gstreamer-ffmpeg`" = "" ] ; then echo "--------------------------------" echo "Installing ffmpeg video codec" echo "--------------------------------" dnf -y install ffmpeg-libs gstreamer-ffmpeg libmatroska xvidcore ffmpeg fi # no longer available? #if [ "`rpm -qa | grep xine-lib-extras-freeworld`" = "" ] ; then # echo "--------------------------------" # echo "Installing DVD playback codecs" # echo "--------------------------------" # dnf -y install libdvdread libdvdnav gxine-mozplugin xine-lib-extras-freeworld lsdvd ## dnf -y install libdvdread libdvdnav totem-xine totem-gstreamer xine-lib-extras-freeworld lsdvd #fi if [ "`rpm -qa | grep libdvdcss`" = "" ] ; then echo "-----------------------------------------------" echo "Installing encrypted (movie) DVD playback codec" echo "-----------------------------------------------" # rpm -ivh http://rpm.livna.org/livna-release.rpm # dnf -y install libdvdcss case "`uname -i`" in i386) dnf -y localinstall --nogpgcheck http://rpm.livna.org/repo/21/i386/libdvdcss-1.2.10-1.i386.rpm # dnf -y localinstall --nogpgcheck http://rpm.livna.org/repo/19/i386/libdvdcss-1.2.10-1.i386.rpm # rpm -Uvh http://rpm.livna.org/repo/18/i386/libdvdcss-1.2.10-1.i386.rpm # rpm -Uvh http://dl.atrpms.net/all/libdvdcss-1.2.10-5.fc14.i686.rpm http://dl.atrpms.net/all/libdvdcss2-1.2.10-5.fc14.i686.rpm # rpm -Uvh ftp://ftp.pbone.net/mirror/rpm.livna.org/repo/14/i386/libdvdcss-1.2.10-1.i386.rpm ;; x86_64) dnf -y localinstall --nogpgcheck http://rpm.livna.org/repo/21/x86_64/libdvdcss-1.2.10-1.x86_64.rpm # dnf -y localinstall --nogpgcheck http://rpm.livna.org/repo/19/x86_64/libdvdcss-1.2.10-1.x86_64.rpm # rpm -Uvh http://rpm.livna.org/repo/18/x86_64/libdvdcss-1.2.10-1.x86_64.rpm # rpm -Uvh http://dl.atrpms.net/all/libdvdcss-1.2.10-5.fc14.x86_64.rpm http://dl.atrpms.net/all/libdvdcss2-1.2.10-5.fc14.x86_64.rpm # rpm -Uvh ftp://ftp.pbone.net/mirror/rpm.livna.org/repo/14/x86_64/libdvdcss-1.2.10-1.x86_64.rpm ;; *) echo "NOTE: unknown architecture. libdvdcss NOT installed." ;; esac fi if [ "`rpm -qa | grep mplayer`" = "" ] ; then echo "--------------------------------" echo "Installing MPlayer video player" echo "--------------------------------" dnf -y install mplayer mplayer-gui gecko-mediaplayer mencoder smplayer mplayer-doc gnome-mplayer gnome-mplayer-common dnf -y remove totem-mozplugin mozplugger fi if [ "`rpm -qa | grep avidemux`" = "" ] ; then echo "--------------------------------" echo "Installing Avidemux video editor" echo "--------------------------------" dnf -y install avidemux fi if [ "`rpm -qa | grep ^vlc-2`" = "" ] ; then echo "--------------------------------" echo "Installing VLC" echo "--------------------------------" dnf -y install vlc fi echo "--------------------------------" echo "dnf -y update" echo "--------------------------------" dnf clean all sleep 5 dnf -y update echo "Done"