How To Setup VMware Workstation For Programming
Bounce Plan, Inc.
Bounce Plan, Inc.
Minimum System Requirements:
Install VMware Workstation Player on your computer before you move on with this course. If you have problems with the install file, run it as administrator.
If you want better menu options, you have to buy the "Pro" version of VMware Workstation.
For this mini course, we will be using Windows 10 as our host operating system and we will be installing the latest 32-bit version of Lubuntu on our VMware Workstation Player. You can use whatever 64-bit Windows host operating system you desire. However, you must use the flavor of Linux we have chosen or some of the steps will be invalid. Since you are learning new environment setup skills, you can always setup whatever you like after you have completed the course.
Now, let me outline for you some important points about your host system:
1. The latest VMware Workstation Player works only on 64-bit operating systems. If you need VMware to work on a 32-bit operating system you will need to downgrade to VMware Player 6 (which is not supported for this course).
2. When you install VMware, you will only have the option to install a 32-bit guest operating system if:
1. You have a 64-bit operating system but do not have virtualization turned on in your BIOS
2. You have a 64-bit operating system but your multi-core CPU doesn't support virtualization
3. You have a 64-bit operating system and you have virtualization turned on in your bios but Hyper-V is running.
3. You don't have to install a 64-bit guest operating system to setup a coding environment.
4. You can also skip the VMware steps completely if you would like to install Lubuntu as the main or dual boot operating system on your computer.
These are some of the issues mentioned in the previous lesson:
ISSUE: I want to install a 64-bit Linux guest operating system but VMware only gives me the option to install a 32-bit guest operating system.
Problem 1: You have a multi-core processor that does not support virtualization OR you have a multi-core processor that supports virtualization but you have no way to enable it in your BIOS.
Solution 1: You will have to upgrade to a processor and/or motherboard that supports virtualization or purchase a new machine with these features available on the processor and in the bios.
Problem 2: You have multi-core processor and virtualization is turned off in your BIOS.
Solution 2: Search for how to turn on virtualization in your BIOS on Google or Bing. This is specific to your computer brand and model so it's important that you look up how to do this for your specific PC. You may need to look up how to get into the bios of your particular model computer then how to locate where turn virtualization on.
Problem 3: You have virtualization turned on in your BIOS but you still only have the option to install a 32-bit guest operating system.
Solution 3: Check to see if Hyper-V is running and turn it off. To turn Hyper-V off go to your Windows control panel > Programs and Features and click on the "Turn Windows Features On or Off" link on the left. A window will pop up and you can look in the list for Hyper-V. If it has a check, uncheck it and click "OK". You can also use Google or Bing to find out more about turning off Hyper-V.
If you still only have the option to install a 32-bit guest operating system on VMware after going through this lesson, you will only be allowed to install a 32-bit guest operating system for your development environment.
VMware Workstation Player (formerly known as Player Pro) installs like a standard desktop application. Once installed, VMware Workstation Player allows you to install new operating systems and run them as virtual machines in a separate window. VMware Workstation Player includes features that enable users to create and configure their own virtual machines for optimal performance and access any devices connected to their PC.
- Click Create a New Virtual Machine
- Select I will install the operating system later
- Click Next
- Select Linux Guest Operating System
- Select Ubuntu as the version
- Click Next
- Change Virtual Machine Name (or leave it)
- Click Next
- Increase disk size or leave it as-is (never lower it)
- Select Store virtual disk as a single file
- Click Next
- Click Customize Hardware
- Change memory to at least 2GB
- Click Close
- Click Finish
- Click on Virtual machine from the left Menu under HOME
- Click Edit virtual machine settings form the VM details on the right
- Select CD/DVD (SATA)
- Select Use ISO image file
- Select Browse and choose the Lubuntu-16.10-desktop-i386.iso you should have downloaded in a previous lesson.
- Click OK
- Click Play virtual machine
- Wait for the popup to install VMware tools. Do not click any of the buttons. Instead click the X to close the popup.
- Hit CTRL + G on the keyboard
- Use your keyboard's up / down arrows to pick your language and hit Enter
- Use your keyboard's up / down arrows to select Install Lubuntu
- Select your language again
- Click continue
- Select both check boxes to download updtes and install third-party software.
- Click continue
- Click Install Now
- Click Continue on the Writer the changes popup
- Enter your location (or if it's already correct leave it)
- Click continue
- Select your language for the keyboard on both sides
- Slide the window over so you can see the continue button
- Click continue
- Slide the window back over so you can see all of the fields.
- Fill in all fields
- Select log in automatically or leave the selection as-is
- Click continue
- Lubuntu will be installed.
- Click Restart now
- Immediately, in the top menu, Click File - Manage - Virtual machine settings
- Click CD/DVD (Sata)
- Clear the file location box under Use ISO image file
- Select Use physical drive
- Select OK
You will have a message on the main screen to remove the installation media (which is what we've just done above)
- Hit CTRL + G on the keyboard
- Hit Enter on the keyboard and wait
- Click the Lubuntu start menu
- Click preferences - Power manager
- Click the Display tab
- Uncheck Handle display power management
- Move Blank after slider to 60 minutes
- Click the Security tab
- Uncheck Lock screen when system is going for sleep
- Click close
- Click the Software Updater window that is minimized on the task bar
If the window is not on the task bar:
- Click system tools - Software updator
- Click Install Now
- Type in your password and click OK
- Click Restart now
- Click on the Lubuntu start menu
- Click system tools - LXTerminal
- Type sudo bash
- Type your password
- Type apt-get update
- Type apt-get install open-vm-tools-desktop -y
- Type reboot
- To get the desktop to adjust, minimize and maximize the screen
- Open LXTerminal
- Type sudo apt-get install apache2
- Type Y for yes when it asks
- Open firefox and type in localhost in the address bar
Handy Commands: Starting and stopping Apache
sudo service apache2 start
sudo service apache2 stop
sudo service apache2 restart
- Open LXTerminal
- Type sudo apt-get install mysql-server mysql-client libmysqlclient-dev
- Type Y for yes when it asks
- Type in a root password
- Hit the Tab key to select <ok>
- Type in the same root password again
- Hit the Tab key to select <ok>
Handy Commands: Starting and stopping MySQL
sudo systemctl mysql start
sudo systemctl mysql stop
- Type sudo apt-get install php7.0 php-pear libapache2-mod-php7.0 php7.0-mysql
- Type Y for yes when it asks
- Type sudo apt-get install php7.0-curl php7.0-json php7.0-cgi
- Type Y for yes when it asks
- Type sudo mkdir /var/log/php
- Type sudo chown www-data /var/log/php
- Type sudo systemctl restart apache2
- Type sudo apt-get install phpmyadmin php-mbstring php-gettext
- Type Y for yes when it asks
Warning: When the first prompt appears, apache2 is highlighted, but not selected. If you do not do the following sequence to select Apache, the installer will not move the necessary files during installation.
This is the key sequence to select Apache:
- Hit the Space key
- Hit the Tab key to select <ok>
- Hit the Enter key
The next pompt asks if you want a database created and <yes> is highlighted:
- Hit the Enter key
The next prompt asks you to create a password for phpmyadmin:
- Type in a password
- Hit the Tab key to select <ok>
- Hit the Enter key
The next prompt asks you to confirm the password you entered:
- Type in the password you just created
- Hit the Tab key to select <ok>
- Hit the Enter key
- Type sudo phpenmod mcrypt
- Type sudo phpenmod mbstring
- Type sudo systemctl restart apache2
- Open firefox and type http://localhost/phpmyadmin/ in the address bar
- Type in the username root
- Type in the password you created during the installation of phpmyadmin
- Click the Lubuntu start menu
- Click Programming
- Right click on phpMyAdmin
- Click Add to desktop
- Type sudo apt-get install konsole
- Type Y for yes when it asks
After Install:
- Click the Lubuntu start menu
- Click System Tools
- Right click on Konsole
- Click Add to desktop
- Type sudo apt-get install dolphin
- Type Y for yes when it asks
After Install:
- Click the Lubuntu start menu
- Click Other
- Right click on Dolphin
- Click Add to desktop
- Type sudo apt-get install bluefish
- Type Y for yes when it asks
After Install:
- Click the Lubuntu start menu
- Click Programming
- Right click on Bluefish Editor
- Click Add to desktop
Install Prerequisites:
Make sure you copy this whole string from "apt-get" all the way to "git"
- Type sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev git
- Type Y for yes when it asks
Install Node.js:
- Type curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
- Type sudo apt-get install -y nodejs
Install rbenv:
- Type git clone https://github.com/rbenv/rbenv.git ~/.rbenv
- Type echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
- Type echo 'eval "$(rbenv init -)"' >> ~/.bashrc
- Type exec $SHELL
- Type git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
- Type echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
- Type exec $SHELL
- Type rbenv
Install Ruby:
- Type rbenv install -v 2.4.0
- Type rbenv global 2.4.0
- Type ruby -v
Install Rails 5:
- Type gem install bundler
- Type gem install rails -v 5.0.1
- Type rbenv rehash
- Type rails -v
Test Your Ruby on Rails Setup:
- Type cd Desktop
- Type rails new myapp -d mysql
- Go to the Bluefish Editor
- Open config/database.yml
- Type in the password for MySQL that you created
- Save and close the file
- Type cd myapp
- Type rake db:create
- Type rails server
- Open Firefox and type http://localhost:3000 into the address bar. You should see the Rails welcome screen
- In the same Firefox window, type http://localhost/phpmyadmin/ into the address bar
- Type in the username root
- Type in the password you created for phpmyadmin
- On the left hand side, you should have a new group called "myapp". Click on the + to see the two databases that were created for your new app.
- Go back to the terminal and type CTRL + C to shut down the server