ChangeLog

Gallery

General — Posted by nephi @ 18:03
Goto http://gallery.nephi.id.au

Remotely installing applications without centralised management

Windows XP, System Adminsitration, Networking — Posted by nephi @ 22:05

Here is a script that allows you to install software on remote computers with out having a centralised management system (E.g. Active Directory / NetWare / etc).

 The example, I am going to use, is installing iTunes / QuickTime and adding a backdoor user to each computer. Listed

There are a few files required for this to work.

  1. PSEXEC -- To execute a program on another computer 
  2. WGET -- To download the files on the remote computer.

Now the file structure (this is not hardcoded, so it's easily changed)

  • C:\Work
  • C:\Work\IP-Lists <-- The directory that has all the IPs, usernames and passwords to use
  • C:\Work\Remote-Applications <-- The main application/script directory
  • C:\Work\Remote-Applications\Files <-- Files to be copied to the remote computer
  • C:\Work\Remote-Applications\Sources <-- The required programs that are called on by the script
  • C:\Work\Remote-Applications\Installs <-- The base directory of the programs to copy to the remote computer for execution

In "C:\Work\Remote-Applications\Files", I have a shortcut that was specially created for this installation; This can be empty.

In "C:\Work\Remote-Applications\Sources", I have all the PSTOOLS extracted here

In "C:\Work\Remote-Applications\Installs", I have a directory that holds the wget software.

Now for some of the require lists. NOTE -- That all files need to have a blank line at the end of the file. Also a ";" means a comment, anything after a ";" will be ignored. "," are seperators for each field.

"C:\Work\IP-Lists\All_PCs.txt"

;
; This is the IP list that's used to install the applications on
;
; The format of the file is as follows
;
; <IP Address>,<Username>,<Password>
;
; Example -
; 10.1.1.132,administrator,YourMum

192.168.0.100,administrator,password

;
; The next line should be a blank to finish the file

"C:\Work\Remote-Applications\To_Download.txt"

;
; <Title>,<URL>,<Store location on remote PC>
;
Apple iTunes,http://192.1.200.15/Uploads/iTunesSetup/,C:\Deploy\Applications
;
; The next line should be a blank to finish the file

"C:\Work\Remote-Applications\To_Install.txt"

;
; The format is <Title>,<Command + Paramters>
;
; EXAMPLE -
;OpenAudIT,C:\INSTALL\REMOTEAPPS\OPENAUDIT\AUDIT.VBS
;

Apple QuickTime 7.6.2,msiexec /i C:\Deploy\Applications\iTunesSetup\QuickTime.msi /t C:\Deploy\Applications\iTunesSetup\QuickTime.mst /qb /norestart
Apple Mobile Device Support 2.5.1.3,msiexec /i C:\Deploy\Applications\iTunesSetup\AppleMobileDeviceSupport.msi /t C:\Deploy\Applications\iTunesSetup\AppleMobileDeviceSupport.mst /qb /norestart
Apple Bonjour 1.0.106,msiexec /i C:\Deploy\Applications\iTunesSetup\Bonjour.msi /t C:\Deploy\Applications\iTunesSetup\Bonjour.mst /qb /norestart
Apple iTunes 8.2.0.23,msiexec /i C:\Deploy\Applications\iTunesSetup\iTunes.msi /t C:\Deploy\Applications\Applications\iTunesSetup\iTunes.mst /qb /norestart

;
; The next line should be a blank to finish the file

"C:\Work\Remote-Applications\To_Remove.txt"

;
; This is just a list of files/directories to be removed
;

Documents and Settings\All Users\Start Menu\Programs\iTunes\iTunes.lnk
Documents and Settings\All Users\Start Menu\Programs\iTunes\About iTunes.lnk
Documents and Settings\All Users\Start Menu\Programs\iTunes
Documents and Settings\All Users\Start Menu\Programs\QuickTime\About QuickTime.lnk
Documents and Settings\All Users\Start Menu\Programs\QuickTime\PictureViewer.lnk
Documents and Settings\All Users\Start Menu\Programs\QuickTime\QuickTime Player.lnk
Documents and Settings\All Users\Start Menu\Programs\QuickTime\Uninstall QuickTime.lnk
Documents and Settings\All Users\Start Menu\Programs\QuickTime
Documents and Settings\All Users\Desktop\QuickTime Player.lnk
Documents and Settings\All Users\Desktop\iTunes.lnk

;
; The next line should be a blank to finish the file

"C:\Work\Remote-Applications\Remote-Applications.bat"

@ECHO OFF

SETLOCAL ENABLEDELAYEDEXPANSION

GOTO SUB_VARIABLES

REM *******************************************************************************
REM * *
REM * Version 0.01 16/June/2009 By Nathaniel Mitchell *
REM * - Initial creation of script, based on BACKUP script *
REM * - Modified script to execute commands remotely *
REM * - Modified script to copy files to remote PC to execute remotely *
REM * *
REM * Version 0.02 17/June/2009 By Nathaniel Mitchell *
REM * - General bug fixing *
REM * - Added functionality to delete files and copy files *
REM * *
REM * Version 0.1 18/June/2009 By Nathaniel Mitchell *
REM * - Minor bug fixes *
REM * TODO - Use Bittorrent to transfer the files *
REM * *
REM * Version 0.2 18/June/2009 By Nathaniel Mitchell *
REM * - Attempt method to have files transferred to a local PC then run*
REM * from there. FAILED, as PSEXEC doesn't allow network access *
REM * *
REM * Version 0.3 18/June/2009 By Nathaniel Mitchell *
REM * - Reworked script to use HTTP to download the files from a web *
REM * server. *
REM * - Fix some minor bugs
REM * *
REM *******************************************************************************
REM *******************************************************************************
REM * *
REM * Set some variables for use in the script *
REM * *
REM * TODAY == Today's date as yyyy-mm-dd. This HAS to come first *
REM * NOTE -- ONLY modify the end of the line that has "TODAY=" *
REM * -- The following are what the variables mean *
REM * %%A == The day of the week *
REM * %%B == The day as a 2 digit number *
REM * %%C == The month as a 2 digit number *
REM * %%D == The year as a 4 digit number *
REM * *
REM * PROGRAMS == The locations of required programs *
REM * *
REM * APPSOURCE == The location of the programs to copy to the remote PC, then*
REM * run from the new location *
REM * *
REM * FILESOURCE == The location of files to be copied AFTER the programs have *
REM * been installed *
REM * *
REM * LIST == The list of IPs, Usernames, Passwords and Sources *
REM * NOTE -- Each item needs to be separated by a comma *
REM * EXAMPLE -- *
REM * <IP>,<USER>,<PASSWORD> *
REM * *
REM * DOWNLOADS == The list of files/websites to dowload *
REM * *
REM * APPLIST == The list of applications to install *
REM * NOTE -- You MUST becareful of your location, as the command*
REM * is run from remote PC as if it was started on the *
REM * machine by a user *
REM * EXAMPLE -- *
REM * <Title>,<Command & Parametters> *
REM * Empty Windows' temp directory,del /s/f/q %windir%\temp *
REM * *
REM * TOCOPY == A list of files to copy and their destination, the source *
REM * for the files is relative to the FILESOURCE setting *
REM * *
REM * TOREMOVE == A list of files/directories to delete/remove *
REM * *
REM * APPTIMEOUT == The number of seconds to wait for an application to finish *
REM * NOTE -- Current set to 15 minutes
REM * *
REM * NETDRIVE == The drive letter to use as a temporary network drive *
REM * *
REM * PREREQUISTE == Do we copy the prerequiste files or not to the remote PC *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * INTERACT == Do we set the remote command to show on the desktop of the *
REM * remote PC *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * DOWNLOAD == Do we download the files specified on the remote PC *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * DOWNLOADWAIT == Do we wait for the download to finish before proceeding *
REM * with the script. *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * INSTALL == Do we install/run the commands as specified on the remote *
REM * PC *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * COPY == Do we copy the files as specified to the remote PC *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * DELETE == Do we delete the files as specified on the remote PC *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * REBOOT == Specifies if we want to reboot the remote computer at the *
REM * end of the process. This should be set, to ensure all *
REM * installations are completed succesfully *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * SHUTDELAY == The timeout in seconds for the Computer to restart *
REM * NOTE - Please used at least 300 seconds, to allow users to *
REM * complete their work AND for waiting for computers to*
REM * finish rebooting *
REM * *
REM * SHUTMESSAGE == The comment/message to use when forcing the PC to reboot *
REM * NOTE - There is a limit of 127 characters for this comment *
REM * *
REM * LOGGING == Specifies whether you want logging enabled or not *
REM * NOTE - This HAS to be either TRUE or FALSE *
REM * *
REM * LOG == Specify the filename and location for the log file *
REM * *
REM *******************************************************************************
:SUB_VARIABLES

FOR /f "tokens=1-4 delims=/- " %%A IN ('DATE /T') DO SET TODAY=%%D-%%C-%%B

REM * Location information *
SET PROGRAMS=C:\Work\Remote-Applications\Sources
SET APPSOURCE=C:\Work\Remote-Applications\Installs
SET FILESOURCE=C:\Work\Remote-Applications\Files

REM * Lists to process *
SET LIST=C:\Work\IP_Lists\All_PCs.txt
SET DOWNLOADS=C:\Work\Remote-Applications\To_Download.txt
SET APPLIST=C:\Work\Remote-Applications\To_Install.txt
SET TOCOPY=C:\Work\Remote-Applications\To_Copy.txt
SET TOREMOVE=C:\Work\Remote-Applications\To_Remove.txt

REM * Remote Execute Info *
SET APPTIMEOUT=900

REM * Network Settings *
SET NETDRIVE=Q

REM * Subsection Settings *
SET PREREQUISTE=TRUE
SET INTERACT=TRUE
SET DOWNLOAD=TRUE
SET DOWNLOADWAIT=FALSE
SET INSTALL=FALSE
SET COPY=FALSE
SET DELETE=FALSE

REM * Shutdown Setting *
SET REBOOT=FALSE
SET SHUTDELAY=120
SET SHUTMESSAGE="This computer will be restarted in %SHUTDELAY% seconds, please save all your work. This shutdown has been initiated by Support."

REM * Log Settings *
SET LOGGING=TRUE
SET LOG="C:\Work\Remote-Applications\!TODAY! - Remote Deployment - 1st Stage.log"

GOTO SUB_MAIN

REM *******************************************************************************
REM *******************************************************************************
REM *******************************************************************************
REM *******************************************************************************
REM **** ****
REM **** NO NEED TO EDIT BELOW THIS BOX ****
REM **** ****
REM *******************************************************************************
REM *******************************************************************************
REM *******************************************************************************
REM *******************************************************************************
:SUB_MAIN

REM * Sets the output to either CONsole or as specified above.
IF /I NOT %LOGGING%==TRUE SET LOG=CON

REM * Clean up network drive
NET USE %NETDRIVE%: /DELETE > NUL

ECHO. > %LOG%
ECHO. >> %LOG%
ECHO Starting at !TODAY! at !TIME! >> %LOG%
ECHO. >> %LOG%

FOR /F "usebackq tokens=1,2,3 delims=," %%i in (%LIST%) do (

ECHO ****************************************************************************** >> %LOG%
ECHO ****************************************************************************** >> %LOG%
ECHO * >> %LOG%
ECHO * !TODAY! !TIME! - Starting to work on %%i >> %LOG%

ECHO * >> %LOG%
ECHO * !TODAY! !TIME! - Checking to see if the computer is on via ICMP/Ping >> %LOG%
ECHO * >> %LOG%

REM * Use "TTL=" to remove/reduce false positives when a ping response comes back
PING %%i -n 1 -w 500 | FIND /I /C "TTL=" > NUL

IF ERRORLEVEL 1 (

ECHO * !TODAY! !TIME! ** ERROR ** The remote PC seems to be turned off >> %LOG%
ECHO * >> %LOG%
ECHO ****************************************************************************** >> %LOG%
ECHO. >> %LOG%
ECHO. >> %LOG%

) ELSE (

ECHO * !TODAY! !TIME! - Mapping %%i's C drive to %NETDRIVE% drive >> %LOG%
REM * Creates a temporary network drive, and checks to see if there is an error
NET USE %NETDRIVE%: \\%%i\C$ /USER:%%j %%k >> NUL
IF ERRORLEVEL 1 (

ECHO * !TODAY! !TIME! ** ERROR ** There was an error mapping the drive >> %LOG%
ECHO * >> %LOG%
ECHO ****************************************************************************** >> %LOG%
ECHO. >> %LOG%
ECHO. >> %LOG%

) ELSE (

ECHO * !TODAY! !TIME! - Connected successfully >> %LOG%
ECHO. >> %LOG%
ECHO * !TODAY! !TIME! - Copying files from %%i >> %LOG%

REM * Checks to see if we should copy the prerequiste files to the remote PC
IF /I %PREREQUISTE%==TRUE (

REM * Copies the files
XCOPY %APPSOURCE% "%NETDRIVE%:\RemoteApps" /S /E /V /C /I /Y >> %LOG%

) ELSE (

REM * Does a dummy command to ensure an errorlevel of 0
XCOPY /? > NUL
ECHO * !TODAY! !TIME! - Nothing to copy >> %LOG%

)

IF ERRORLEVEL 1 (

ECHO * !TODAY! !TIME! ** ERROR ** There was an error copying the files >> %LOG%

) ELSE (

ECHO * !TODAY! !TIME! - Successfully copied the files >> %LOG%

IF /I %DOWNLOAD%==TRUE (

REM * Download the required files
FOR /F "usebackq tokens=1,2,3 delims=," %%a in (%DOWNLOADS%) do (

ECHO * >> %LOG%
ECHO * !TODAY! !TIME! - Creating "%%c" >> %LOG%

REM * Checks to see if the command show interact with the desktop
IF /I %INTERACT%==TRUE (

%PROGRAMS%\psexec \\%%i -i -n %APPTIMEOUT% cmd /c mkdir %%c >> NUL

) ELSE (

%PROGRAMS%\psexec \\%%i -n %APPTIMEOUT% cmd /c mkdir %%c >> NUL

)

ECHO * !TODAY! !TIME! - Downloading "%%a" >> %LOG%

REM * Checks to see if the command show interact with the desktop
IF /I %INTERACT%==TRUE (

REM * Checks to see if we should wait for the download to finish
IF /I %DOWNLOADWAIT%==TRUE (

%PROGRAMS%\psexec \\%%i -i -n %APPTIMEOUT% -w %%c C:\RemoteApps\wget\bin\wget wget -r -nH --cut-dirs=1 %%b >> NUL

) ELSE (

%PROGRAMS%\psexec \\%%i -i -d -n %APPTIMEOUT% -w %%c C:\RemoteApps\wget\bin\wget wget -r -nH --cut-dirs=1 %%b >> NUL

)

) ELSE (

REM * Checks to see if we should wait for the download to finish
IF /I %DOWNLOADWAIT%==TRUE (

%PROGRAMS%\psexec \\%%i -d -n %APPTIMEOUT% -w %%c C:\RemoteApps\wget\bin\wget wget -r -nH --cut-dirs=1 %%b >> NUL

) ELSE (

%PROGRAMS%\psexec \\%%i -n %APPTIMEOUT% -w %%c C:\RemoteApps\wget\bin\wget wget -r -nH --cut-dirs=1 %%b >> NUL

)
)
)
)

IF /I %INSTALL%==TRUE (

REM * Install the files now.
FOR /F "usebackq tokens=1,2 delims=," %%a in (%APPLIST%) do (

ECHO * >> %LOG%
ECHO * !TODAY! !TIME! - Installing/Running "%%a" >> %LOG%

REM * Checks to see if the command show interact with the desktop
IF /I %INTERACT%==TRUE (

%PROGRAMS%\psexec \\%%i -i -n %APPTIMEOUT% %%b >> NUL

) ELSE (

%PROGRAMS%\psexec \\%%i -n %APPTIMEOUT% %%b >> NUL

)
)
)

REM * Copy the specified files to their specified locations
FOR /F "usebackq tokens=1,2 delims=," %%a in (%TOCOPY%) do (

ECHO * !TODAY! !TIME! - Copying required files >> %LOG%

REM * Creates the location where the files will be copied to (as a just in case)
REM * then copies the files
MKDIR "%NETDRIVE%:\%%b" >> NUL
XCOPY "%FILESOURCE%\%%a" "%NETDRIVE%:\%%b" /S /E /V /C /I /Y >> %LOG%

IF ERRORLEVEL 1 (

ECHO * !TODAY! !TIME! ** ERROR ** There was an error copying "%%a" >> %LOG%

) ELSE (

ECHO * !TODAY! !TIME! - Successfully copied "%%a" >> %LOG%

)
)

REM * Checks to see if we are deleting files
IF /I %DELETE%==TRUE (

FOR /F "usebackq tokens=1,2 delims=," %%a in (%TOREMOVE%) do (

REM * Attempts to delete/remove the files and directories specified
ECHO * !TODAY! !TIME! - Removing "%%a" >> %LOG%
DEL /S/Q/F "%NETDRIVE%:\%%a" >> %LOG%
RMDIR /S/F "%NETDRIVE%:\%%a" >> %LOG%

)
)

REM * Checks to see if the remote PC should be reboot, if so reboot it
IF /I %REBOOT%==TRUE (

ECHO * !TODAY! !TIME! - Rebooting %%i to complete installation >> %LOG%
SHUTDOWN -r -t %SHUTDELAY% -f -m \\%%i -c %SHUTMESSAGE% > NUL

)
)

REM * Drop the network drive, so it's cleaned up for the next PC
NET USE %NETDRIVE%: /DELETE > NUL
ECHO * >> %LOG%
ECHO * !TODAY! !TIME! - Successfully deleted %NETDRIVE% drive >> %LOG%
ECHO * >> %LOG%
ECHO ****************************************************************************** >> %LOG%

)
)
)

ECHO ****************************************************************************** >> %LOG%
ECHO * >> %LOG%

GOTO SUB_EXIT

REM **********************************
REM * *
REM * Cleanup time *
REM * *
REM **********************************
:SUB_EXIT

NET USE %NETDRIVE%: /DELETE > NUL

SET TODAY=

SET PROGRAMS=
SET APPSOURCE=
SET FILESOURCE=

SET LIST=
SET DOWNLOADS=
SET APPLIST=
SET TOCOPY=
SET TOREMOVE=

SET APPTIMEOUT=

SET NETDRIVE=

SET PREREQUISTE=
SET INTERACT=
SET DOWNLOAD=
SET DOWNLOADWAIT=
SET INSTALL=
SET COPY=
SET DELETE=

SET REBOOT=
SET SHUTDELAY=
SET SHUTMESSAGE=

SET LOGGING=
SET LOG=

ENDLOCAL


Simple PPP restarting script

Debian, Linux — Posted by nephi @ 22:28

This script is setup so you can have it running via cron every 5 minutes or so.

#!/bin/bash

pppstats
if [ $? = 1 ]
then
    poff
    pon ISP
fi


Installing VMware Server 1.x on Debian (with 2 active ports, and less than 1GB)

VMware Server 1.x on Debian 4.0r5 (aka Etch)
Aim:
    To have VMware Server 1.x installed on Debian 4.0r5, while keeping
·    The number of open ports to a minimum (2 ports currently);
·    The size of the installation to less than 1GB (during install it does take up to 2GB and more, depending on what updates are installed).
Required:
·    Debian 4.0r5 network installation CD;
·    Knowledge of Linux and installing Linux (Debian preferably);
·    Knowledge of configuring Debian’s network and apt configuration files;
·    At least 3GB of HDD space (depending on how much swap you want);
·    Internet access (only required for part 2 (post installation));
·    Internet quota (about 150MB);
·    Time.
Important notes/information:
·    Currently does not work under Debian 5 (aka Lenny), as the kernel is compiled against a different version of GCC than the version supplied;
·    When you upgrade the kernel, you WILL need to recompile VMware server;
·    The order of the installation for the software doesn’t matter, but it does matter in terms of upgrading and installing VMware Server;
Installation steps:
    Part 1:
1)    Install Debian as per normal installation methods for the network install. The only difference from the steps, is not to have the network configured (OR the network cable unplugged).
a.    As we don’t want the installation to update or download the package list, as it changes the installation size, and installs extra services that we may not want.
    Part 2:
1)    Once the installation program has rebooted your computer and you have logged in as root. Configure the network settings and apt’s settings
a.    Network == /etc/network/interfaces
b.    Apt == /etc/apt/sources.list
2)    Run “apt-get update” (or aptitude depending what you’re used to)
3)    Now we upgrade the installation by “apt-get dist-upgrade”
a.    Once done reboot your machine
4)    Now we start installing the required software
a.    Remote access/control, and some helpful applications:
i.    “apt-get install ssh less ntpdate”
1.    SSH – Installs both the OpenSSH client and the OpenSSH server– Required (but can be optional)
a.    This is the first open port we create and leave open
2.    LESS – Installs the paging application, so you can scroll through long text files. – Optional
3.    NTPDATE – Installs the NTP client so you can keep the computer’s clock correct. – Optional
b.    Required application and source files
i.    “apt-get install psmisc build-essential gcc g++ make linux-headers-`uname -r` libcompress-zlib-perl libio-socket-ssl-perl libwww-perl bzip2”
1.    PSMISC – Installs miscellaneous Unix utilities (e.g. VMware requires a kill command that Debian network install doesn’t provide) – Required
2.    BUILD-ESSENTIAL – Installs the common used compiler environment for Debian – Required
3.    GCC – Installs the GNU C compiler – Required
4.    G++ – Installs the GNU C++ compiler – Required
5.    MAKE – Installs a program that determines which pieces of a large program need to be recompiled and issues the commands to recompile them, when necessary – Required
6.    LINUX-HEADERS-`UNAME -R` – Installs the current Linux header files for your kernel (the `uname -r` is a shortcut to grab the current Linux kernel version) – Required
7.    LIBCOMPRESS-ZLIB-PERL – Installs the ZLIB compression library for Perl – Not known if Required
8.    LIBIO-SOCKET-SSL-PERL – Installs SSL support in PERL instead of using IO::SOCKET::INET – Not known if Required
9.    LIBWWW-PERL – Installs a set of APIs for www client/server applications/library – Not known if Required
10.    BZIP2 – Installs the BZIP2 compression/decompression applications – Not known if Required
c.    Lastly we need to install the required X Window system components
i.    “apt-get install libxext6 libx11-6 libxtst6 libxt6 libice6 libsm6 libxrender1 libx11-data libxau6 libxdmcp6 x11-common libxi6” (ALL REQUIRED – As the compiling will fail otherwise)
1.    LIBXEXT6 – provides an X Window System client interface to several extensions to the X protocol
2.    LIBX11-6 – provides the main client interface to the X Window System, and is otherwise known as 'Xlib'. It provides a complete API for the basic functions of the window system
3.    LIBXTST6 – provides an X Window System client interface to the Record extension to the X protocol
4.    LIBXT6 – provides the X Toolkit Intrinsics, an abstract widget library upon which other toolkits are based. Xt is the basis for many toolkits, including the Athena widgets (Xaw), and LessTif (a Motif implementation)
5.    LIBICE6 – provides the main interface to the X11 Inter-Client Exchange library, which allows for communciation of data between X clients
6.    LIBSM6 – provides the main interface to the X11 Session Management library, which allows for applications to both manage sessions, and make use of session managers to save and restore their state for later use
7.    LIBXRENDER1 – introduces digital image composition as the foundation of a new rendering model within the X Window System. Rendering geometric figures is accomplished by client-side tesselation into either triangles or trapezoids. Text is drawn by loading glyphs into the server and rendering sets of them. The Xrender library exposes this extension to X clients
8.    LIBX11-DATA – provides the locale data files for libx11
9.    LIBXAU6 – provides the main interface to the X11 authorisation handling, which controls authorisation for X connections, both client-side and server-side
10.    LIBXDMCP6 – provides the main interface to the X11 display manager control protocol library, which allows for remote logins to display managers
11.    X11-COMMON – contains the filesystem infrastructure required for further installation of the X Window System in any configuration; it does not provide a full installation of clients, servers, libraries, and utilities required to run the X Window System
12.    LIBXI6 – provides an X Window System client interface to the XINPUT extension to the X protocol
5)    Once all the applications have installed, it’s now time to log onto the machine remote (you don’t have to if you don’t want to) via SSH
6)    It’s now time to install (well compile) VMware Server 1.x
a.    Copy the VMware Server tar file to the your freshly installed Debian machine
i.    I personally use PSFTP (Putty’s SSH FTP program), doesn’t really matter how you copy it across.
b.    Now extract the tar file
i.    “tar -zxf VMware-server-1.0.8-126538.tar.gz”
c.    Change directory to the extracted files
i.    “cd vmware-server-distrib/”
d.    Now run “./vmware-install.pl”
i.    I leave all the following at their default locations
ii.    You will be shown the license agreement, once loaded quit it and accept the license (that’s if you want to accept it)
 
    10.8.9.49 - PUTTY       
    Creating a new installer database using the tar3 format.

Installing the content of the package.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts?
[/etc/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]
In which directory do you want to install the library files?
[/usr/lib/vmware]

The path "/usr/lib/vmware" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the manual files?
[/usr/share/man]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware]

The path "/usr/share/doc/vmware" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware Server 1.0.8 build-126538 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall.pl".

Before running VMware Server for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config.pl". Do you want this
program to invoke the command for you now? [yes]

Making sure services for VMware Server are stopped.

Stopping VMware services:
   Virtual machine monitor                                             done

You must read and accept the End User License Agreement to continue.
Press enter to display it.

VMWARE MASTER END USER LICENSE AGREEMENT

NOTICE:  BY DOWNLOADING AND INSTALLING,
COPYING OR OTHERWISE USING THE SOFTWARE, YOU
AGREE TO BE BOUND BY THE TERMS OF THIS EULA.
IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA,
YOU MAY NOT DOWNLOAD, INSTALL, COPY OR USE THE
SOFTWARE, AND YOU MAY RETURN THE UNUSED
SOFTWARE TO THE VENDOR FROM WHICH YOU ACQUIRED
IT WITHIN THIRTY (30) DAYS AND REQUEST A
REFUND OF THE LICENSE FEE, IF ANY, ALREADY
PAID UPON SHOWING PROOF OF PAYMENT.

1.      DEFINITIONS

1.1     "Designated Administrative Access" means
that access to the standard user
interfaces of a given instance of the
Software (designated in this section) that
you may grant to a designated third party
for which you have provided advance
written notice to VMware that you are
providing outsourced services and for

Do you accept? (yes/no) y

Thank you.

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?
[/usr/share/icons]

The path "/usr/share/icons" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

The path "/usr/share/applications" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel.  Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes]

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.18-6-686/build/include]    
e.    Now it will go off and compile VMware Server 1.x components
 
    10.8.9.49 - PUTTY       
    Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.18-6-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-6-686'
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/task.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmx86.o
  CC [M]  /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST
  CC      /tmp/vmware-config0/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-6-686'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
The module loads perfectly in the running kernel.    
f.    Now the final configuration happens (now my example computer has 2 network interfaces, when you have 1 network interface you won’t be asked which interface to bind to vmnet0. Nor if you want a 2nd bridged network)
g.    Once the network has been configured it will then compile more components for the networking part of VMware Server
h.    Port 902 is the default port that the VMware Server software defaults to, you can change this if you wish.
i.    On the console for the physical machine you’ll see the following message “pnp: Device 00:07 disabled.” Followed by “vmmon: module license ‘unspecified’ taints kernel.’
 
    10.8.9.49 - PUTTY       
    Do you want networking for your virtual machines? (yes/no/help) [yes]

Configuring a bridged network for vmnet0.

Your computer has multiple ethernet network interfaces available: eth0, eth1.
Which one do you want to bridge to vmnet0? [eth0]

The following bridged networks have been defined:

. vmnet0 is bridged to eth0

Do you wish to configure another bridged network? (yes/no) [no]

All your ethernet interfaces are already bridged.

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes]

Configuring a NAT network for vmnet8.

Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes]

Probing for an unused private subnet (this can take some time)...

The subnet 192.168.107.0/255.255.255.0 appears to be unused.

The following NAT networks have been defined:

. vmnet8 is a NAT network on private subnet 192.168.107.0.

Do you wish to configure another NAT network? (yes/no) [no]

Do you want to be able to use host-only networking in your virtual machines?
[yes]

Configuring a host-only network for vmnet1.

Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes]

Probing for an unused private subnet (this can take some time)...

The subnet 172.16.127.0/255.255.255.0 appears to be unused.

The following host-only networks have been defined:

. vmnet1 is a host-only network on private subnet 172.16.127.0.

Do you wish to configure another host-only network? (yes/no) [no]

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.18-6-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-6-686'
  CC [M]  /tmp/vmware-config0/vmnet-only/driver.o
  CC [M]  /tmp/vmware-config0/vmnet-only/hub.o
  CC [M]  /tmp/vmware-config0/vmnet-only/userif.o
  CC [M]  /tmp/vmware-config0/vmnet-only/netif.o
  CC [M]  /tmp/vmware-config0/vmnet-only/bridge.o
  CC [M]  /tmp/vmware-config0/vmnet-only/procfs.o
  CC [M]  /tmp/vmware-config0/vmnet-only/smac_compat.o
  SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
  LD [M]  /tmp/vmware-config0/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST
  CC      /tmp/vmware-config0/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/vmware-config0/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-6-686'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
The module loads perfectly in the running kernel.

Please specify a port for remote console connections to use [902]

inetd: no process killed
Unable to make the Internet super-server (inetd) re-read its configuration
file.  Please restart inetd by hand:
killall -v -HUP inetd

Hit enter to continue.

Configuring the VMware VmPerl Scripting API.

Building the VMware VmPerl Scripting API.

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

Installing the VMware VmPerl Scripting API.

The installation of the VMware VmPerl Scripting API succeeded.

Generating SSL Server Certificate

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]    
j.    Now we specify where we would like the virtual machine files to be stored. I use “/Storage/VPCs”
k.    After this, we can enter the serial number or add it in later through the VMware Console application. (Please don’t take a copy of my serial number during the demonstration)
 
    10.8.9.49 - PUTTY       
    In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines] /Storage/VPCs

Please enter your 20-character serial number.

Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel:  XXXXX-XXXXX-XXXXX-XXXXX

Starting VMware services:
   Virtual machine monitor                                             done
   Virtual ethernet                                                    done
   Bridged networking on /dev/vmnet0                                   done
   Host-only networking on /dev/vmnet1 (background)                    done
   Bridged networking on /dev/vmnet2                                   done
   Host-only networking on /dev/vmnet8 (background)                    done
   NAT service on /dev/vmnet8                                          done

The configuration of VMware Server 1.0.8 build-126538 for Linux for this running kernel completed successfully.    

l.    Now we have 2 different options to finalise the installation of VMware Server 1.x. Either way will work, the outcome is to have the inetd daemon restarted for the console port to be active.
i.    Run “killall -v -HUP inetd” ß This command doesn’t work properly under Debian.
ii.    Run “/etc/init.d/openbsd-inetd restart”
iii.    Reboot the machine
m.    Congratulations, you have now successfully installed VMware Server 1.x on Debian 4.0r5
 
    10.8.9.49 - PUTTY       
         

Powered by LifeType