Minimal Centos on VMWare - tooltwist/documentation GitHub Wiki

Installing Minimal Centos

This is from an old version of VMWare, but gives the idea...

http://www.deepshiftlabs.com/dev_blog/?p=1571&lang=en-us

Getting the network running

To get to the internet via the host machine, we need eth0. Some site recommend using VMWare Tools but they won't work yet - to install them you need to install perl and a few other things, but you don't have network access to get them. Instead follow the second answer here:

http://serverfault.com/questions/386033/no-network-connectivity-for-my-centos-6-installed-in-vmware-fusion-in-macosx-lio

Create this file: /etc/sysconfig/network-scripts/ifcfg-eth0 containing these lines  

DEVICE="eth0"  
ONBOOT="yes"  
BOOTPROTO="dhcp"  

...and restart your networking with 'sudo service network restart' and your eth should pull an IP via DHCP.

You might already have the config file. If so, just check that ONBOOT="yes".

Install sshd

http://www.cyberciti.biz/faq/centos-ssh/

The firewall or config might be okay without changes, so try it before making changes.

Using ssh to accesses the VM has the advantage that you can more easily cut and paste URLs and commands from your browser (here), and you can also install things in parallel (but be careful if reboots are required).

To get the IP address so you can ssh to this server from the host machine, run ifconfig.

Install VMWare Tools (probably optional)

http://www.ehowstuff.com/how-to-install-vmware-tools-on-centos-6-3/

Install NodeJS

Follow the instructions for Centos here:

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

Install JDK

Option 1 - Open JDK

# yum install java-1.7.0-openjdk-devel

Option 2 - From Oracle (I didn't do this)
You'll need to download the RPM package from the Oracle website first, but this needs to be done from a browser so you can accept Oracle's license terms, and that results in the package being downloaded to your local machine (the host) rather than the VM.

Download the Java SE Development Kit 7u45 Linux x64 RPM package from here.

Once it's downloaded you can upload from the host machine to the VM by using Terminal on the host machine:

# cd ~/Downloads
# scp jdk-7u45-linux-x64.rpm [email protected]

On the VM, try this:

# cd /tmp
# rpm -ivh jdk-7u<version>-linux-x64.rpm

Full instructions here.

Install Gradle

Later this will be installed automatically by the tooltwist command.

Find out the latest version from http://www.gradle.org/installation, then use it like this:

# mkdir /usr/local/gradle
# cd /usr/local/gradle
# curl -O http://downloads.gradle.org/distributions/gradle-1.10-all.zip
# yum install zip unzip
# unzip gradle-1.10-all.zip
# rm gradle-1.10-all.zip

You'll need to set the path for any user who wishes to use Gradle. This is best placed in ~/.bashrc for the user.

# export PATH=/usr/local/gradle/gradle-1.10/bin:$PATH

You can check it's installed correctly using # gradle --version. Full instructions here.

Install Ruby (maybe not in the future)

Install Ruby using RVM (Ruby Version Manager):

http://www.ruby-lang.org/en/downloads/

# curl -L https://get.rvm.io | bash -s stable --ruby

Install ImageMagick

http://blog.solidshellsecurity.com/2013/05/21/how-to-install-imagemagick-centos-6/

Replace the wget command with

# curl -O http://www.imagemagick.org/download/ImageMagick.tar.gz

Create a user account

# useradd tooltwist
# passwd tooltwist

Install sudo

# yum install sudo
# vi /etc/sudoers

    Find the line like this:

root ALL=(ALL) ALL

    and add our new user:

tooltwist ALL=(ALL) ALL

From this point, log in as user tooltwist

Set up SSH access to the server

If you have a ~/.ssh/id_rsa.pub on the host machine, copy the entire line and add it to the VM:

# mkdir ~/.ssh
# chmod 700 ~/.ssh
# vi ~/.ssh/authorized_keys
...add the public key to the file...
# chmod 644 ~/.ssh/authorized_keys

Setup Gradle for the user

Set the path in ~/.bashrc

# export PATH=/usr/local/gradle/gradle-1.10/bin:$PATH

Place the following lines in ~/.gradle/gradle.properties

PROPERTY_LOCAL_REPOSITORY=file://home/tooltwist/gradle-repo
PROPERTY_TOOLTWIST_REPOSITORY=http://10.0.1.149:9786

Install Git

# sudo yum install git
# git config --global user.name "Your Name Here"
# git config --global user.email "[email protected]"

Further details here.

Install tooltwist

not ready yet

npm install -g tooltwist

--

⚠️ **GitHub.com Fallback** ⚠️