Activity Stream
48,167 MEMBERS
6919 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Member
    Website's:
    vpsdeploy.com

    Default Graphical install CentOS 6 using VNC, for dedicated servers

    Hi, this script modify a grub configuration to launch in the next reboot a CentOS 6 netinstall in graphical mode.
    I hope it will be useful for your business.
    Regards!

    Code: 
    #!/bin/bash
    clear
    echo
    echo "Network Boot Install Script for CentOS"
    echo "(c) alexsmith.im 2009-2010"
    echo
    echo "This script gives you the ability to install and use the VNC based network installer built into the"
    echo "CentOS and Fedora Core network images."
    echo
    echo "It will walk you through your settings and reboot the server when required, please only run this script"
    echo "if you are happy to lose the contents of this machines hard drive(s)"
    echo
    echo "This script comes without guarantee that it will work if it breaks your server I cannot be held responsible"
    echo "I have tested it on my servers and it works without issue, if you do find a bug please report it"
    echo "to me via my site at http://alexsmith.im - Thanks"
    echo
    echo " Please choose one of the following options"
    echo
    echo "A) Install CentOS 6.x 32 Bit"
    echo "B) Install CentOS 6.x 64 Bit"
    echo "X) Quit this installer"
    echo
    echo -n "Select an option and hit [ENTER]: "
    read option
    
    rm -rf /setup
    mkdir /setup
    cd /setup
    
    case "$option" in
    
        "a" | "A" )
        
            echo
            echo "Installing CentOS 6 32 Bit"
            wget -4 -q http://mirror.ovh.net/ftp.centos.org/6/os/i386/images/pxeboot/initrd.img -O /setup/initrd.img
            wget -4 -q http://mirror.ovh.net/ftp.centos.org/6/os/i386/images/pxeboot/vmlinuz -O /setup/vmlinuz
            mirror="http://mirror.ovh.net/ftp.centos.org/6/os/i386/"
            ;;
        
        "b" | "B" )
        
            echo
            echo "Installing CentOS 6 64 Bit"
            wget -4 -q http://mirror.ovh.net/ftp.centos.org/6/os/x86_64/images/pxeboot/initrd.img -O /setup/initrd.img
            wget -4 -q http://mirror.ovh.net/ftp.centos.org/6/os/x86_64/images/pxeboot/vmlinuz -O /setup/vmlinuz
            mirror="http://mirror.ovh.net/ftp.centos.org/6/os/x86_64/"
            ;;
            
        "x" | "X" )
        
            echo "Quitting"
            exit
            ;;
            
    esac
    
    echo
    echo "Detecting required system settings..."
    gateway=`netstat -nr | grep UG | awk '{print $2}'`
    echo "Gateway detected as $gateway"
    ip=`ifconfig eth0 | grep "inet addr:" | awk '{print $2}' | cut -d : -f 2`
    echo "IP detected as $ip"
    
    echo 
    echo 
    echo "This password is purely for VNC access and it doesn't like long ones" 
    echo -n "So please enter a SHORT (6 chars or less) password for VNC and hit [ENTER]: "
    read password
    
    cp /setup/initrd.img /boot/pxe.initrd.img
    cp /setup/vmlinuz /boot/pxe.vmlinuz
    
    echo
    echo "Forcing install of Grub..."
    yum install grub -y > /dev/null
    
    echo "Creating boot menu..."
    if [ -s /boot/grub/menu.lst ]
    then 
        rm /boot/grub/menu.lst
    fi
    
    # Make menu.lst with correct settings
    cat > /boot/grub/menu.lst << DELIM
    default 0
    timeout 5
    title PXE Install Boot
    root (hd0,0)
    kernel /boot/pxe.vmlinuz vnc vncpassword=$password headless ip=$ip netmask=255.255.255.0 gateway=$gateway dns=8.8.8.8 ksdevice=eth0 method=$mirror lang=en_US keymap=us
    initrd /boot/pxe.initrd.img
    DELIM
    
    if [ -s /boot/grub/grub.conf ]
    then
            rm /boot/grub/grub.conf
            cp /boot/grub/menu.lst /boot/grub/grub.conf
    fi
    
    echo "Installing Grub to the first disk..."
    grub-install /dev/sda > /dev/null
    echo "Checking Grub Install..."
    grub-install --recheck /dev/sda > /dev/null
    
    echo
    echo "PRE-SETUP COMPLETE"
    echo
    echo "Once the server is rebooted VNC will start up and you will be able to carry on the install as normal"
    echo "This includes doing your partitioning and installing your packages"
    echo
    echo "You will be able to connect to the VNC Server using $ip:1 as the host"
    echo
    echo "The reboot can take a few minutes, depending on the speed of your server and if the mirror is busy"
    echo "If you would like to reboot the server now to start the installation of your server please hit [ENTER] now, otherwise press ctrl+c"
    read -s
    echo "Rebooting!"
    reboot
    vpsdeploy Reviewed by vpsdeploy on . Graphical install CentOS 6 using VNC, for dedicated servers Hi, this script modify a grub configuration to launch in the next reboot a CentOS 6 netinstall in graphical mode. I hope it will be useful for your business. Regards! #!/bin/bash clear echo echo "Network Boot Install Script for CentOS" echo "(c) alexsmith.im 2009-2010" echo Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    nice one, thanks for sharing

  4.     
    #3
    Member
    I have installed CentOS 6 on visualization player. that is rapid really. I suggest all use CentOS 6 on virtual machine. the experience is awesome.

    I have manage the apache web server and any php/mysql website able to run on that.

  5.     
    #4
    Member
    Website's:
    GFXWebHosting.com WarezJobs.com
    thanks for the tut.

  6.     
    #5
    Member
    how to use this script??????

  7.     
    #6
    Member
    use nxserver

  8.     
    #7
    Member
    Quote Originally Posted by wakaski View Post
    how to use this script??????
    dito...i dont know...i hope any user can help us

  9.     
    #8
    Member
    Website's:
    vpsdeploy.com
    Not with NX...

    1- Create this file and run it
    2- Reboot the server
    3- Connect via VNC -> IP.of.the.server:1

    The graphical install is waiting your VNC connection.

    Regards.

  10.     
    #9
    Member
    Code: 
    Not with NX...
    
    1- Create this file and run it
    2- Reboot the server
    3- Connect via VNC -> IP.of.the.server:1
    
    The graphical install is waiting your VNC connection.
    i really have problem with ovh kernel. i need to install a original centos. i tried everything from instruction of this link http://forum.ovh.co.uk/showthread.php?t=3073&page=8 but there is no luck to connect to vnc. this already waste so much time on me for this. i really need help for this. i have a little knowledge about linux. could you please explain a little it more detail. what and how to create and how to run it?? i really appreciate for this

  11.     
    #10
    Member
    Website's:
    vpsdeploy.com
    Hi,

    create a new file:

    setup.sh with the content of the script
    Do a chmod 777 setup.sh
    Run "sh setup.sh"
    And reboot
    Wait for server reboot
    Connect via VNC -> IP.of.the.server:1

    Regards

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Install OpenVPN on CentOS
    By Bharat in forum Technical and Security Tutorials
    Replies: 8
    Last Post: 8th Oct 2011, 07:20 AM
  2. how to install ftp on centos
    By -={MINDFREAK}=- in forum Technical Help Desk Support
    Replies: 3
    Last Post: 12th Jun 2011, 04:50 PM
  3. [Dedicated] Very cheap - Dedicated unmetered servers with no install fee
    By Yomoik in forum Archive
    Replies: 2
    Last Post: 29th Jan 2011, 04:23 PM
  4. How To Install cPanel - CentOS 5.3
    By NationWebHost in forum Technical and Security Tutorials
    Replies: 6
    Last Post: 10th Aug 2010, 01:11 PM

Tags for this Thread

BE SOCIAL