How to set up Timekoin on Windows

W
Description

TimeKoin

Shared by: epstrom94
-
Stats
views:
23
posted:
7/2/2012
language:
pages:
18
Document Sample
scope of work template
							                                      Timekoin Server Setup
Timekoin is an open source peer to peer based crypto-currency system. As such,
it relies on a combination of its own database and the database of other peers
to maintain one large public register. Because this public register can be seen
by anyone, the only way to make sure that one peer doesn't tamper with the
balance of another peer is to use key based encryption.

A peer has two keys. One to create transactions and another to unlock what is
inside the transaction. When a transaction is created, the key to unlock it is
also passed along with the transaction data. This allows anyone to look inside
the data to verify the contents, but prevents anyone from trying to masquerade
as that peer and create a transaction that is fake or changed. Any attempts to
alter the transaction data will fail because the key provided with it will no
longer work.

Timekoin uses 1,536 bit encryption (not a typo) to create the transactions and
SHA256 hashing both inside and outside the transaction to provide multiple
layers of anti-tampering protection wrapped in each other. Trying to tamper with
any of the 3 points results in the collapse of the entire transaction data.

The software requires these components before installing. This walk-through details a typical installation of the
software a Windows 7 system. These are the components that will be downloaded and installed.

   1.   Web Server (Apache)
   2.   OpenSSL
   3.   PHP
   4.   MySQL


Section 1. – Apache Web Server Setup

        This section will detail the installation and setup of the free software package Apache. Start by
downloading the latest version here.
http://httpd.apache.org/download.cgi#apache22

        On the Apache website, be sure to select the link to download:
        Win32 Binary including OpenSSL 0.9.8t (MSI Installer)
After download is complete, run the file to begin installation.




   •   Click “Next” to start the installation process.
   •   Agree to the License and Click “Next”
   •   Click “Next” to proceed past the Read This First section.
   •   The next screen has fields to fill out the web address.
       – If you don't have a real domain to use, simply fill out timekoin.org
       – If you don't have a real server name, simply fill out server.timekoin.org
       – If you don't want to expose your e-mail address to anyone, make up a fake one like
       someone@nowhere.blah
       – Finally, the install mode is already set for “for all Users, on Port 80, as a Service – Recommended”,
       leave it as, click “Next” to continue.




   •   The next screen has the installation types of “Typical” and “Custom”. Leave the selection for “Typical”
       and click “Next”.
•   The last screen will have the installation destination.
    The default “C:\Program Files\Apache Software Foundation\Apache2.2\” will work just fine. Click
    “Next” to continue.
•   Finally, you can click the “Install” button to begin.
•   During the installation you will see a security warning about the installation, click “Yes” to allow it and
    continue.
•   After installation is complete, you see the installation successful screen. Click “Finish” to close the
    program.
•   How do you know if it is working?
    – First check that you see the system monitor in your task-bar, down near the bottom right-hand corner.
    It is the picture of a feather with a green arrow. This means your Apache server is now running.




                                      – Next, check your web browser for confirmation.
    – Start by typing this in your web browser address bar: http://localhost
    – You should see a simple confirmation of “It works!” in your web browser.
    – Congratulations, you've completed the first step to getting the Apache server setup!




•   The next section will detail installing PHP5 into your web server.
•   For now, you need to extract all the files from the zip file and copy them to the right place. Windows has
    a built in zip extractor, so once you extract the files, move all of them in the v1.x folder to the timekoin
    folder. This where you should create the folder and move these files and folders.
    C:\ Program Files \ Apache Software Foundation \ Apache2.2 \ htdocs \ timekoin
Section 2. – Installing PHP5 for Apache

This section will detail how to setup PHP5 for Windows & Apache.
You will find the windows download section for PHP here:
http://windows.php.net/download/

      Be sure to download scroll down to the “PHP 5.3 (5.3.14)” section where you will find many choices to
download from.

        Under the “VC9 x86 Thread Safe” section, you will find a link for the “Installer”.
Click this link to begin the download. After download, run the file to being installation.




   •   Click “Next” to get started
   •   Accept the license agreement
   •   Accept the default installation folder




   •   When asked for the “Web Server Setup”, choose “Apache 2.2.x Module” and Click “Next”
•   The next screen will ask for the location to the Apache configuration file.
•   You can find it with the browse button.
•   Location is C:\Program Files\Apache Software Foundation\Apache2.2\conf\




•   Click “Next” to save the path and continue.
•   The next screen will have all the installation options, so it is important to follow this part of the
    document closely.
•   First, under the option labeled “Register *.php files to open automatically with PHP” needs to be set
    to “Will be installed on local hard drive”
•   Afterwards, the red “X” will go away and the sections will be high-lighted in white.




•   Click “Next” to continue installation.
•   The final screen will show that it is ready to install, click “Install” to continue.
•   When any security warning comes up about install this software, click “Yes” to agree to the installation.
•   After installation is complete, click “Finish” to close the installer program.
•   To implement these changes, simply restart the Apache server (double-click the little feather icon on the
    bottom right and click Restart button in the window that appears). In Windows 7, the first time you do
    this, a security warning comes up asking if you want to allow Apache to do this, click “Yes” to confirm.
    You will have to bring up the Apache window again to finally restart the service (Windows 7) Click
    “OK” on the Apache window to make it minimize back to your system tray. You've now finished your
    PHP installation!
Section 3 – Install MySQL Database Server

This section will detail how to setup MySQL for Windows.
The free MySQL Community Server will work just fine for Timekoin.
You will find the windows download section for MySQL here:
http://www.mysql.com/downloads/mysql/

       Choose the appropriate windows version installer for your computer (32 bit or 64 bit). If you are unsure
what version of Windows 7 you have (32 bit or 64 bit), choose 32 bit by default. Only choose 64 bit if you
know you have 64bit Windows 7 installed.

   •   After the download is complete, start the installation program.




   •   Click “Next” to get started
   •   Agree to the license and click “Next”
   •   Click “Typical” on the Setup Type




   •   Click “Install” to start the installation process.
   •   During the Install you will get a confirmation screen asking for permission to install, click “Yes” to
       continue
•   After installation is complete, another ads screen will appear. Click “Next” to continue with the
    configuration until you return to your previous window.




•   You can now “Finish” to complete installation, make sure the check mark is in place for the “Launch the
    MySQL Instance Configuration Wizard” before you click.




•   You'll get another confirmation screen in Windows 7 to run the Instance Configuration, click “Yes” to
    continue.
•   Now the database server can be configured. Click “Next” to continue.




•   Leave the default “Detailed Configuration” and click “Next”




•   Choose “Server Machine” and click “Next”.
•   Leave the default “Multifunctional Database” and click “Next”




•   Leave the default installation path unless you have another preferred place to store your database. Click
    “Next” to continue.




•   Select “Online Transaction Processing (OLTP)” and click “Next” to continue.
•   This section, you need leave the defaults “Enable TCP/IP Networking”, and “Enable Strict Mode”
    turned on. click “Next” to continue.




•   Select “Best Support for Multilingualism” and Click “Next” to continue.




•   Make sure both “Install as Windows Service” and “Include Bin Directory in Windows PATH” are both
    checked. Click “Next” to continue.
•   The password screen is important. Be sure to set a password for your database and write it down because
    you will need it later. After selecting your password, click “Next” to continue.




•   You are now ready to “Execute” the settings. Click the button!




•   After the configuration is complete, you should have a confirmation screen. Click “Finish” to complete
    the last step for installation.
   •   Now that the database server is installed and configured, it's time to bring up the command window for
       the database. You will find this in your Windows Start menu under / MySQL / MySQL Server 5.5 /
       MySQL 5.5 Command Line Client




   •   With the command window up, input the password you created earlier to login.




   •   We now need to type some manual commands to create our database, start with:
       Note: You should be able to copy/paste these commands to help avoid spelling mistakes.

CREATE DATABASE `timekoin` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

   •   You should receive a “Query OK, 1 row affected (0.01 sec)” response. This means the database is
       created!
   •   Next Command (fill in a password of choice instead of the example 12345, write the password down)
   •   Copy/paste is our friend, press Enter to execute the command.

CREATE USER 'tkuser'@'localhost' IDENTIFIED BY '12345';GRANT USAGE ON *.* TO 'tkuser'@'localhost'
IDENTIFIED BY '12345'WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

   •   It's a long one! The next one will be much shorter, copy/paste is your friend again. Press Enter again to
       execute this database command.

GRANT SELECT, INSERT, UPDATE, DELETE, DROP ON `timekoin`.* TO 'tkuser'@'localhost';
  • After every query you see a “Query OK” confirmation. So you know the commands are right.
   •   The very last command is to flush the database with the new user. This command will take care of that.

FLUSH PRIVILEGES ;
  • You should get another “Query OK”
  • Database setup should be complete, it's now time to import data to build the new Timekoin database.
  • Minimize the MySQL command window or move it out of the way so you can get to your desktop
     again.

   •   Find the “timekoin.sql” file located in the new_sql_install folder included in the software zip file.
   •   To make things easy, just copy it straight to C:\ (C drive)
   •   Go back to your MySQL command window and type:
       USE timekoin;

   •   You will get a confirmation of “Database changed”
   •   Now type:
       SOURCE C:\\timekoin.sql;

   •   You'll see a bunch of text scroll by that says “Query OK”, that's good, it means everything is being
       imported in! Once it is complete, type:
       quit
       Then press Enter, to exit the command console.
   •   You can delete the timekoin.sql from C:\ now if you want to avoid leaving files around that are no longer
       needed.
   •   That completes the database setup!


Section 4 – Update Configuration File and First Time Login to Server

   •   Use Windows Wordpad to edit this file now:
       C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timekoin\ configuration.php
•   (4) Fields need to be updated, the MYSQL_IP, MYSQL_USENAME, MYSQL_PASSWORD, and
    MYSQL_DATABASE
•   MYSQL_IP should be set for “localhost”
•   MYSQL_USERNAME should be set for the account that was created earlier, “tkuser”
•   MYSQL_PASSWORD is the one you created for this user earlier, using “12345” as an example, but fill
    in the password you chose earlier for this user.
•   MYSQL_DATABASE is the name of the database, we used “timekoin” as our database name.
•   Your Wordpad should look like some similar below, save the document and exit Wordpad. If you have a
    security warning issue that won't let you save the file, just save-as the document to your desktop first
    (plain text document), then copy it back into the Apache folder.




•   After all of this, reboot Windows. Don't ask me why, but all this installation and configuration won't take
    affect until you do.
•   After the reboot, it's time to see if we can now login to the timekoin software.
•   Open your favorite web browser and go to:
    http://localhost/timekoin/index.php
•   You should see the timekoin login page appear. The default login is
    Username: timekoin
    Password: 12345
•   If all was successful you should be able to login to the main page.
   •   If you login in successfully, then congratulations you have the database configured and the software
       installed properly. Only a few steps remain now.
   •   Start by changing your username and password. You shouldn't leave it at the default as it's a security risk
       that others might be able to get into your Timekoin server.
   •   You can do this in the “Options” tab of Timekoin.




   •   Once you have the username and password changed to your liking, it's time to install the encryption
       keys for your server. Start by logging out of Timekoin (Log Off tab on the top-right)



Section 5 – Install OpenSSL for Windows

    • Windows now needs the final component, the software to generate the keys.
    • Start by going to this site below
http://slproweb.com/products/Win32OpenSSL.html

   •   You find the installer near the top of the page
   •   Look for the download link of Win32 OpenSSL v1.0.1c Light
   •   Download and run the installer program.
•   You will get a warning message about the missing Microsoft Visual C++ 2008 Redistributables, there is
    no need to worry as Timekoin does not use this to function, click “OK” to continue.




•   Click “Next” to begin the install Wizard.
•   Accept the license agreement and click “Next” to continue.
•   The default destination install path is fine, click “Next” to continue.




•   The default startup folder is fine, click “Next” to continue.
•   On the “Select additional Tasks” screen, the default “The Windows system directory” is fine, click
    “Next” to continue.




•   The final “Ready to install” screen, click “Install” to complete.
   •   At the last screen, choose whether you want to donate or not and click “Finish” to close the installation
       program.




   •   Windows must now reboot for the changes to take affect, you must do this manually.


Section 6 – Install New Encryption Keys for Server

   •  Inside the zip file you downloaded from the website there exist a folder “util” that contains one file,
      labeled “keys.php”, you need to copy this file into the folder where all your timekoin files are. Location
      for reference below:
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timekoin\

    • Once this file is in the right place, you can execute it from the web browser at this link:
http://localhost/timekoin/keys.php

   •   This will generate a 1,536 bit private and public key for your server. You will get a confirmation
       message when successful. This generates and stores new keys every-time it is run.
   •   If you want to randomize things up a little, hit the browser refresh button a few times and a new random
       key will be generated and stored in the database.




   •   As a final measure, go back and delete the keys.php file now, you don't want to run it again by accident
       or have anyone else do it by accident because another pair of keys will be generated, overwriting what
       you already have. That could be a bad thing!
•   To verify that your server has the key installed, log back into timekoin and click on the “Send / Receive”
    tab.
    http://localhost/timekoin/index.php?menu=send
•   Look at the field for “Public Key” to receive, you should see a very long string of random looking
    characters. This is your public key and it's ready to receive currency now!




•   You can now start your Timekoin server from the “System” tab. Simply click the “Start Timekoin”
    button and you will get a confirmation of the system starting at the bottom.
•   You are now up and running. It will take a while for your system to get in sync with all it's peers.
•   This document only covers how to install the Timekoin Server for Windows, more detailed documents
    on the operation of the software can be found at http://timekoin.org/




•   Congratulations, you are done!

						
Related docs
Other docs by epstrom94
Pay Per View Method
Views: 83  |  Downloads: 3
About Timekoin
Views: 46  |  Downloads: 0
How to set up Timekoin on Windows
Views: 40  |  Downloads: 0