LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-03-2013, 01:34 PM   #1
polashdeb
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Rep: Reputation: Disabled
making .sh script for installing VNC server on CentOS 4.1.1


I need to make a .sh script file for VNC install in centos server 4.1.1. Which will automate my work for installing VNC server.i made this primary file & it works but i stuck at coding the allow installation Y/N, display configs and edit/commenting values inputs.

Code:
wget https://dl.dropboxusercontent.com/s/co308vee1im1pkb/vnc.sh
chmod -R 777 vnc.sh
./vnc.sh
But i need to impliment those too :
  • after each install: a YES(Y) input.
  • after command "sudo nano /etc/sysconfig/vncservers" a input
  • [VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 1324x700"] and save & exit.
  • after command:"nano .vnc/xstartup" a '#' comment in 28th line and save & exit.

how to do those ? any advice appreciated
 
Old 12-04-2013, 01:27 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by polashdeb View Post
I need to make a .sh script file for VNC install in centos server 4.1.1.
Please first read and understand the implications of the [CentOS-announce] CentOS-4 i386 and x86_64 End of Life (EOL). Also you should choose not to expose services on vulnerable installations let alone let them be accessed using plain text auth: instead tunnel over SSH with pubkey auth.


Quote:
Originally Posted by polashdeb View Post
after each install: a YES(Y) input.
Please see 'man yum' as it allows you to have multiple packages at the command line and it has a "-y" switch.


Quote:
Originally Posted by polashdeb View Post
after command "sudo nano /etc/sysconfig/vncservers" a input
[VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 1324x700"] and save & exit.
after command:"nano .vnc/xstartup" a '#' comment in 28th line and save & exit.
Either use Puppet or equivalent or make a backup and use 'sed -i'.

Last edited by unSpawn; 12-04-2013 at 01:30 AM. Reason: //More *is* more
 
  


Reply

Tags
bash scripting, centos4, linux, shell



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm stuck installing VNC on my centos 5 dedi server Bennehh Linux - Server 4 06-12-2011 04:40 AM
Need to Installing a Desktop Environment on a Centos 5.5 server to run VNC ppartyka Linux - Newbie 3 04-27-2011 03:46 PM
Error when installing vnc server on centos davidlu766 Linux - Server 2 04-14-2010 07:06 PM
setting up vnc server on centos 5 sandeepthug Linux - Newbie 2 01-14-2009 03:49 AM
Installing KDE & VNC on centos 4.1 Cybex_XLX Linux - Newbie 0 01-02-2008 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration