Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo 'Adding DNS servers'
- echo 'DNS1=8.8.8.8' >> /etc/sysconfig/network-scripts/ifcfg-eth0
- echo 'DNS2=8.8.4.4' >> /etc/sysconfig/network-scripts/ifcfg-eth0
- echo 'updateing yum'
- yum update -y
- echo 'Installing Desktop (this can take a while)'
- yum groupinstall Desktop -y
- echo 'Installing xfce4 & firefox (this can take a while)'
- yum install gnome-core xfce4 firefox -y
- echo 'Installing tigervnc-server'
- yum install tigervnc-server -y
- echo 'Installing sys admin utils'
- yum install curl -y
- yum install wget -y
- echo 'removeing old java'
- yum remove java-1.6.0-openjdk -y
- yum remove java-1.7.0-openjdk -y
- echo 'Fixing hostname'
- echo -e "127.0.0.1\t$( hostname | awk '{ print $1 }' )" >> /etc/hosts
- echo 'install java8'
- wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm
- rpm -ivh jdk-8u45-linux-x64.rpm
- export JAVA_HOME=/usr/java/jdk1.8.0_45/
- export PATH=$PATH:$JAVA_HOME
- echo 'Open firewall for VNC'
- iptables -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
- service iptables save
- service iptables restart
- echo 'Install fail2ban for Centos 6'
- rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
- yum install fail2ban -y
- cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
- service fail2ban restart
- chkconfig vncserver on
- echo 'please enter a vnc password'
- vncpasswd
- echo 'VNCSERVERS="1:root"' > /etc/sysconfig/vncservers
- echo 'VNCSERVERARGS[1]="-geometry 1024x768"' >> /etc/sysconfig/vncservers
- service vncserver restart
- pkill vnc
- sed -i "s/twm/#twm/" ~/.vnc/xstartup
- echo 'exec gnome-session &' >> ~/.vnc/xstartup
- service vncserver restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement