Symptom: You see the following permissions error when trying to install VMware Tools on a Linux OS regardless if you are running as su or root:
[[email protected] vmware-tools-distrib]# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.
Installing VMware Tools.
In which directory do you want to install the binary files?
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
What is the directory that contains the init scripts?
In which directory do you want to install the daemon files?
In which directory do you want to install the library files?
The path “/usr/lib/vmware-tools” does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
In which directory do you want to install the documentation files?
The path “/usr/share/doc/vmware-tools” does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
The installation of VMware Tools 9.0.5 build-1137270 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-tools.pl”.
Can’t exec “/usr/lib/vmware-tools/bin/configure-gtk.sh”: Permission denied at ./vmware-install.pl line 3955.
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: “/usr/bin/vmware-config-tools.pl”. Do you want
this program to invoke the command for you now? [yes]
sh: /usr/bin/vmware-config-tools.pl: Permission denied
/sbin/restorecon: Warning no default label for /tmp/vmware-block-restore0/tmp_file
[[email protected] vmware-tools-distrib]#
Solution: You need to extract the files from the tarball when installing the guest tools via the tar command rather than the build in Archive Manager installed with the OS.
- Mount the VMware Tools to the VM
- Copy the VMware Tools tarball to the desktop of the Linux OS
- Execute the following command to extract the tar’s contents
- tar -zxvf VMwareTools-9.0.5-1137270.tar.gz
- Change directories to the vmware-tools-distrib that was just extracted from the tarball and execute the following commands to begin the installation
- cd vmware-tools-distrib
Need Java to run an application on your Linux workstation/server? Follow the steps below via the terminal to install the latest version of Java.
- Head over to http://www.java.com/en/download/manual.jsp to find the latest Linux download from your client machine.
- Look at the link for the latest Java release for Linux. Since we are using Ubuntu we do not need the RPM release. In this case, I will be downloading Java 1.7.0_25-b15 for Linux x64.
- The download url is http://javadl.sun.com/webapps/download/AutoDL?BundleId=78697
- Head over to the Linux terminal on the machine you want to install Java on, and execute the following command to download the files from Java’s website
- wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=78697
- Extract the tarball. Since wget cannot pull the filename like a modern webrbowser, you will have to reference the weird filename AutoDL?BundleId=78697
- tar -xvzf AutoDL?BundleId=78697
- Find out what the name of the folder is of the java files you extracted by listing the files in the current directory. At the time of writing this, the extracted folder I had was jre1.7.0_25, so I will continue to reference that moving forward.
- Create a folder in the usr folder for Java to reside.
- sudo mkdir /usr/java/
- Move the files we extracted Java files to the java folder
- sudo mv jre1.7.0_25/ /usr/java/
- Execute the following to enable the Java Runtime Environment
- sudo update-alternatives –install /usr/bin/java java /usr/java/jre1.7.0_25/bin/java 1
- Execute the following command to set the default Java to use
- sudo update-alternatives –config java
- Execute the following command to verify that the latest version of java is installed
- java -version
- Remove the tarball we downloaded from Java’s website to free up some space
- rm ~/AutoDL?BundleId=78697
Copy your .crt files to /usr/share/ca-certificates
Run: sudo update-ca-certificates
Hit yes to trust the certificates in the wizard (text based for CLI), and away you go! 🙂
a2enmod modulename – this will enable a module
a2dismod modulename – this will disable a module
Once you have made the changes, execute the service apache2 restart command and away you go!
Today I was faced the challenge of installing VMware Tools on a Ubuntu server via command line. I stumbled accross a step-by-step tutorial on the exact steps to accomplish this task. I am reposting for archival purposes, but all credit goes to @justinschier from http://ghosttx.com/2012/03/how-to-install-vmware-tools-v4-on-ubuntu-11-10-server/
Written: March 13, 2012
Last Updated: April 27, 2012
Tested With: Ubuntu 12.04 LTS Server, Ubuntu 11.10 Server
All the guides I found on the Internet, including VMWare’s website were outdated in some way, so I decided to write a guide of my own. I just went through these steps from start to finish on a fresh server and had no problems.
Use Install VMWare Tools option in VMWare Client/Console to attach media
Update the server
sudo apt-get update
sudo apt-get upgrade
- Create the mount point
sudo mkdir -p /media/cdrom
- Mount the ISO
sudo mount /dev/cdrom /media/cdrom
You should see the message: mount: block device /dev/sr0 is write-protected, mounting read-only
- Change Directory
- Copy the tar file to your /tmp directory
sudo cp VM*.tar.gz /tmp
- Install Build tools if necessary
sudo apt-get install linux-headers-server build-essential
- Change Directory
- Unmount the ISO
sudo umount /media/cdrom
- Expand the tar
sudo tar xzvf VM*.tar.gz
- Change Directory
- To prevent a potential error in the install script on Ubuntu 11.10, create a special directory
Unable to create symlink “/usr/lib64/libvmcf.so” pointing to file ”/usr/lib/vmware-tools/lib64/libvmcf.so/libvmcf.so”.
sudo mkdir /usr/lib64
- Run the Install Script. The -d flag automatically answers the default to all questions. To customize it, just omit the -d.
sudo ./vmware-install.pl -d
Let me know if this worked for you!
Also, please follow me on Twitter: @justinschier
If you have ever wanted to view how big your hard drive/partition sizes are in Linux, but only have access to the command line interface, here is the command to do it:
df -H (This will show the partition sizes in MB, GB, TB, etc.)
fdisk -l | grep Disk (This will show the physical disks and their corresponding sizes)
To setup a static IP in ubuntu, edit your networking settings file.
Here is an example of how to do it:
Use these configurations:
iface lo inet loopback
iface eth0 inet static
DHCP Address Configuration:
iface lo inet loopback
iface eth0 inet dhcp
Then restart the service: /etc/init.d/networking restart (Make sure you are running with admin privileges when restarting 🙂 )