Home » Categories » Installation Guides

Category Archives: Installation Guides

Hosting your blog on CS Servers

So you are enrolled into CS program, and you want to share your experience and new cool things you learn everyday in class with the world, but you don’t have a blog and don’t want to spend money on hosting it. Well you can host your blog on CS Servers for free!

All enrolled students get an account on CS servers, which they can access by ssh/ftp. You can host your blog on CS servers and which will be accessible at http://cs.wmich.edu/~yourBroncoId/yourBlogName.
To run your blog you need a CMS such as WordPress.Installing WordPress is a simple process that takes less than five minutes to complete. In this installation tutorial, we will show you how to install WordPress on your CS home directory.

(more…)

Installing and Running mySQL

This tutorial will teach you how to install and run MySQL through your terminal in  Windows, Ubuntu, or Mac.

Windows:

First make sure you have Microsoft’s .NET Framework 4 installed. If it is not you can get it here.

Go to the MySQL download page. Select the mysql-installer-web-community-5.6.21.1.msi download.

 

Install:

  1. On the following page scroll down and click: “No thanks, just start my download”.
  2. Run the MSI file accepting any permission prompts.
  3. Click accept on the license agreement: 
  4. Select Developer Default and hit next.
  5. You will most likely have some warnings on the Check Requirements page, that is okay. Select “Next” and then confirm the warning.
  6. Your Installation page should look similar to this: Select Execute.
  7. When the install is done it should look similar to this: The failed status on Connector/ODBC is okay.
  8. Next the installer walks you through configuring your MySQL server. On “type and Networking” page leave everything as is:
  9. Give the account a root password. You can also create a new user here, or leave it empty and use root when you login.
  10. On the following page “Windows Service”  you can once again leave everything in the default state:
  11. On the “Apply server Configuration” page select Execute, then select Finish once the configuration is done.
  12. Next the installer will configure Samples and Examples:
  13. User and Password should be filled in for you on the Connect To Server page, select check, and  then next:
  14. Select Execute and then finish, then next, and then Finish. MySQL should now be Installed.

Running:

  1. From the start menu run MySQL 5.6 Command Line Client -Unicode:                                                   
  2. Type in your root password and you are now in mySQL.

Mac OSX (Yosemite):

From the mysql site Download Mac OS X 10.9(x86, 64-bit), DMG Archive:

and on the following page select “No thanks, just start my download” at the bottom of the page.

  1. Open the dmg and double click on the package and you should get this dialogue box: 
  2. Press continue twice, and agree to the license
  3. Do the standard install, or change the location to your preferred directory, and click install. 
  4. Once you run the installation, you may get a pop up saying the install failed.  Don’t worry the install worked.
  5. To start the server run the following command  in your terminal:
    sudo /usr/local/mysql/support-files/mysql.server start
  6. You now want to edit you PATH to make it easier to open mySQL  use your preferred text editor to edit your .bash_profile from your home directory and add:
    export PATH="/usr/local/mysql/bin:$PATH"
  7. Then in a terminal source the file:
    source .bash_profile
  8. You can now run mysql in a terminal with the command:
    mysql -v
  9. And you can set the root password with:
    /usr/local/mysql/bin/mysqladmin -u root password 'yourpasswordhere'
  10. And now you can log in to mysql as root with:
    mysql -u root -p

Ubuntu 14.04

  1. In your terminal run sudo apt-get update:
    sudo apt-get update
  2. run:
    sudo apt-get install mysql-server-5.6
  3. Enter “Y” when prompted and shortly you will see this configuration box, select ok:
  4. Type in the root password you would like to use for the new mysql root account:
  5. And confirm the password in the next prompt.
  6. You should now be able to run mysql with the following command:
    mysql -u root -p

VPS Rails Build

This post is intended to make installing Ruby on Rails using Apache2 via Phusion Passenger as painless as possible. The instructions are clear and precise, follow all of them and your install will go smoothly.
First access your Virtual Machine using ssh like so:

ssh user@vps.cs.wmich.edu -p PORTNO

Import Basic Tools For New Install

sudo apt-get update
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev apache2 apache2-threaded-dev libapr1-dev libaprutil1-dev nodejs mysql-client libmysqlclient-dev libsqlite3-dev sqlite3 libtool bison

Install Ruby 2.2.0

mkdir /tmp/ruby && cd /tmp/ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz
tar -xzvf ruby-2.2.0.tar.gz
cd ruby-2.2.0
./configure
sudo make
sudo make install

Install Bundler and rmate

sudo gem install bundler
sudo gem install rmate

Installing Rails on the Virtual Machine

sudo gem install rails
sudo gem install mysql2
cd #{directory intended for rails app}
sudo rails new blog -d mysql

Setting Up The DataBase

In the directory "config" in your rails directory, there is a file "database.yml." After you create a database using our normal procedures, edit that file so that it points at the correct database and host using the correct user. This site has a good example for that: http://www.tutorialspoint.com/ruby-on-rails/rails-database-setup.htm

If you decide to use MySql as your database you will need to install mysql-server ex: sudo apt-get install -y mysql-server

Configuring Apache Using Phusion Passenger

sudo gem install passenger

Using Phusion Passenger

Passenger will bring up a curses interface when you invoke "passenger-install-apache2-module." We are interested in only Ruby as a language (for now). Select that using the space bar, and unselect the others.
sudo passenger-install-apache2-module

The installation process will pause with a snippet for your apache configuration file. You should copy that snippet, as you will use it later. This should look something like:

File to modify: /etc/apache2/apache2.conf

LoadModule passenger_module /usr/local/lib/ruby/gems/2.2.0/gems/passenger-4.0.58/buildout/apache2/mod_passenger.so
   <IfModule mod_passenger.c>
     PassengerRoot /usr/local/lib/ruby/gems/2.2.0/gems/passenger-4.0.58
     PassengerDefaultRuby /usr/local/bin/ruby
   </IfModule>

File to modify: /etc/apache2/sites-available/default

Or, if using apache version >= 2.4,  modify /etc/apache2/sites-available/default.conf

On the newer versions of Apache, all VirtualHost files must end in the suffix “.conf”.

Then it will pause with an example virtualhost configuration. Copy that, as you will use that later. It should look something like

<VirtualHost *:80>
   ServerName www.yourhost.com
   # !!! Be sure to point DocumentRoot to 'public'!
   DocumentRoot /path/to/rails/project/public
   <Directory /path/to/rails/project/public>
      # This relaxes Apache security settings.
      AllowOverride all
      # MultiViews must be turned off.
      Options -MultiViews
      # Uncomment this if you're on Apache >= 2.4:
      Require all granted
   </Directory>
</VirtualHost>

You will need to add a line to the virtual host declaring the following until you set up a production secret key:

1. RailsEnv development (Add this after DocumentRoot)

Once the virtualhost file has been completed, you must enable the virtualhost site. To do that, you run:

sudo a2ensite default
sudo service apache2 restart

If you have no errors doing this, then you will be able to view your site.