Skip to main content

finish script fedora 19


#!/bin/sh

PWD=`pwd`
DATE=`date +%Y%m%d`
ARCH=`uname -p`
RELEASE=`cat /etc/redhat-release | awk '{ print $3 }'`

# ******************************
# Add the admin Group and local Users - if not already there.
# Set passwd to "Passw0rd" with a Zero
# ******************************
if [ -d /home/jradtke ]
then
  echo "mv /home/jradtke /home/jradtke.${DATE} "
  mv /home/jradtke /home/jradtke.${DATE}
fi

getent group admin >/dev/null || groupadd -g 6969 admin
getent group jradtke >/dev/null || groupadd -g 2025 jradtke
getent passwd jradtke >/dev/null || useradd -g 2025 -u 2025 -G admin -s /bin/bash -c "James Radtke" -d /home/jradtke -p '<encr passwd here>' jradtke


# UPDATE THE SUDOERS FILE
cat << EOF >> /etc/sudoers

## ALIASES
Host_Alias      CRASHHOSTS = neo,neo.matrix.private,cypher
User_Alias      CRASHUSERS = jradtke
Cmnd_Alias      CRASHCMNDS = /usr/bin/systemctl restart ntpd.service, /bin/cat /etc/shadow
Cmnd_Alias      CRASHDOALL = ALL

## SUDO COMMANDS
CRASHUSERS ALL = NOPASSWD: /bin/su -
CRASHUSERS CRASHHOSTS = NOPASSWD: CRASHCMNDS, CRASHDOALL

# Added for local admins
%admin  ALL=(ALL)       NOPASSWD: ALL
EOF

# ******************************
# Update REPOs
# ******************************
yum -y install yum-plugin-fastestmirror

# INSTALL ALL THE GOOD STUFF (RPMFUSION)
# http://rpmfusion.org/Configuration/
# First, install the basic repo's
yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

# Second, install the release-specific repo's
yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${RELEASE}.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${RELEASE}.noarch.rpm

# Add Google stuff
wget https://dl-ssl.google.com/linux/linux_signing_key.pub
rpm --import linux_signing_key.pub

case $ARCH in
  i386)
    rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
# Google - i386
cat << EOF >> /etc/yum.repos.d/google-i386.repo
[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
EOF
  ;;
  x86_64)
    yum -y install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
# Google - x86_64
cat << EOF > /etc/yum.repos.d/google-x86_64.repo
[google64]
name=Google - x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
EOF
  ;;
  *)
    echo "ERROR: Unsupported Architecture: $ARCH"
  ;;
esac

# ******************************
# Install Packages
# ******************************
# Install "system-esque" type stuff
yum -y install sysfsutils iotop sysstat git intltool nmap autofs policycoreutils-gui gnome-rdp rdesktop tomboy openssh-askpass ntpd spice-gtk-python eclipse eclipse-pydev python-lxml spice-client spice-xpi wireshark wireshark-gnome

#yum -y install  virt-viewer virt-manager
yum -y install gcc kernel-headers kernel-devel
yum -y install google-chrome-stable
yum -y install flash-plugin

# Enable non-encrypted DVD
yum -y install libdvdread libdvdnav gstreamer-plugins-ugly gstreamer-plugins-bad lsdvd gstreamer-ffmpeg
#libdvdcss

# Audio Packages (Amarok rocks... Banshee is better)
#yum -y install banshee banshee-community-extensions banshee-devel
#yum -y install amarok
#yum -y install rhythmbox
yum -y install gnome-do-plugins-rhythmbox pidgin-rhythmbox rhythmbox-equalizer gstreamer gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly phonon-backend-gstreamer gstreamer1-libav gstreamer1-plugins-ugly gstreamer1-plugins-bad-freeworld


#yum -y install audacious audacious-plugins lame twolame libvorbis-devel
#yum -y install gpodder

# Video Players
yum -y install xine-lib xine-lib-extras-freeworld
yum -y install mplayer smplayer
# Video CODECS
yum -y install vlc

# Install Java
yum -y install java-*-openjdk icedtea-web libreoffice

# ******************************
# Update GRUB - This image should work for everyone.
#   I have a boot splash that I like to use
# ******************************
cp /etc/default/grub /etc/default/grub.orig
find /home/ -name splash-tree.tga -exec cp {} /boot/grub \;
case $RELEASE in
  18|19)
    echo "Fedora 18|19 grub updates go here mang..."
    echo "Update /boot/grub2/themes/system/theme.txt"
    echo "Run this: grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg"
    yum -y install grub2-starfield-theme-2.00-22.fc19.x86_64


cat << EOF >> /etc/default/grub
GRUB_GFXMODE=1600x900x16
GRUB_THEME="/boot/grub2/themes/system/theme.txt"
EOF
    sed -i -e '1i#grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg' /etc/default/grub
  ;;
  17)
cat << EOF >> /etc/default/grub
# Custom stuff
GRUB_DISABLE_RECOVERY="true"
GRUB_SAVEDEFAULT="true"
GRUB_GFXMODE=1600x900x16
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_BACKGROUND=/boot/grub2/Fedora_DJ.jpg
EOF

# Insert comments into the grub file so that I can remember how to create an updated GRUB
sed -i -e '1i# grub2-mkconfig -o /boot/grub2/grub.cfg' /etc/default/grub
sed -i -e '2i# grub2-mkfont --output=/boot/grub2/unicode.pf2 /usr/share/fonts/dejavu/DejaVuSansMono.ttf' /etc/default/grub
# create a new GRUB
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkfont --output=/boot/grub2/unicode.pf2 /usr/share/fonts/dejavu/DejaVuSansMono.ttf
  ;;
  *)
    echo "No grub update going to happen today"
  ;;
esac

mkdir -p /home/shared/Pictures/Wallpapers /home/shared/Pictures/Icons
chown -R jradtke:users /home/shared
yum -y install pidgin docky expect

# Install Packages for Conky (and conky-manager) and nixnote
yum -y install conky hddtemp lm_sensors p7zip p7zip-plugins openssl-static


# ******************************
# UPDATE THE ENTIRE MACHINE
# ******************************
yum clean all
yum -y update

# Jazz up Gnome 3 shell
yum -y update glibc audit
yum -y install gnome-shell-extension*

yum -y install ccsm gnome-tweak-tool gnome-common gnome-theme-curvylooks gnome-themes-legacy gnome-shell-theme-atolm gnome-shell-theme-elementary gnome-shell-theme-gaia gnome-shell-theme-orta gnome-shell-theme-smooth-inset gnome-shell-extension-alternative-status-menu.noarch gnome-shell-extension-systemMonitor.noarch gnome-shell-extension-user-theme verne-backgrounds-gnome gnome-shell-extension-weather gnome-shell-extension-calc gnome-shell-extension-auto-move-windows gnome-shell-extension-apps-menu verne-backgrounds-extras-gnome verne-backgrounds-gnome system-switch-displaymanager-gnome gnome-video-arcade gnome-shell-theme-* gnome-applet-sensors gnome-applets
yum -y install xscreensaver xscreensaver-extras-gss xscreensaver-gl-* gnome-screensaver


yum -y install plymouth-*
plymouth-set-default-theme spinfinity

# App for managing shortcuts
yum -y install alacarte
echo "run /usr/bin/gsettings set org.gnome.shell.clock show-date true"
echo "run /usr/bin/gsettings set org.gnome.shell.calendar show-weekdate true"

exit 0

Comments

Popular posts from this blog

RHN Satellite Server (spacewalk) repomd.xml not found

"repomd.xml not found" If you add a channel, or if your RHN cache gets corrupted, and one of your guests complains that it cannot find repomd.xml for jb-ews-2-x86_64-server-5-rpm (for example) - you need to rebuild your repodata cache. Normally this is an automated job - which is exemplified by the fact that you have obviously built out your entire Satellite environment and never had to do any of the steps you are about to do. So - some prep work: Open 3 terminals to your Satellite Server and run: # Term 1 cd /var/cache/rhn watch "ls -l | wc -l" # Term 2 pwd cd /var/log/rhn tail -f rhn_taskomatic_daemon.log # Term 3 satellite-sync --channel=jb-ews-2-x86_64-server-5-rpm Once the satellite-sync has completed, you >should< see the count increment by one.  If you are unlucky (like me) you will not. You then need to login to the Satellite WebUI as the satellite admin user. Click on the Admin tab (at the top) Task Schedules (on the left) fin

Install RHEL 7 on old HP DL380 g5

Someone at work had been running RHEL on an HP DL380 G5 and blew it up.  After several attempts at doing an installation that made me conclude the hardware was actually bad... I kept digging for the answer. Attempt install and Anaconda could not find any disks - try a Drivers Disk (dd.img) both cciss and hpsa.   -- once we did that, when the system would reboot it would say it could not find a disk. hmmm. Boot from your installation media and interrupt the startup at grub. Add hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1 to the line starting with linuxefi press CTRL-X to boot. Once the system restarts after the install, you need to once again interrupt the startup and add the line from above. After the system starts, edit /etc/default/grub and add those 2 parameters to the end of the line starting with GRUB_CMDLINE_LINUX (which likely has quiet at the end of the line currently). then run # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig # grub2-mkconfig -o /boot/grub2

MOTD with colors! (also applies to shell profiles)

I'm not sure why I had never looked into this before, but this evening I became obsessed with discovering how to present different colored text in the /etc/motd. A person had suggested creating a shell script (rather than using special editing modes in vi, or something) and I agree that is the simplest way of getting this accomplished quickly. This most noteworthy portion of this script is the following: RESET="\033[0m" that puts the users shell back to the original color. I typically like a green text on black background. Also - a great reference for the different colors and font-type (underscore, etc...) https://wiki.archlinux.org/index.php/Color_Bash_Prompt I found this example on the web and I wish I could recall where so that I could provide credit to that person. #!/bin/bash #define the filename to use as output motd="/etc/motd" # Collect useful information about your system # $USER is automatically defined HOSTNAME=`uname -n` KERNEL=`un