I have tried to make it as complete, but simple as possible. I am a Windows software developer and have only used linux in the past year. So while I am confident that everything here is right, feel free to double check it and let me know. Code blocks may contain several lines but please run just one at a time.
Sign up and get a server.
There are tons of cloud server hosting companies out there with a variety of services offered. Most any one of them will do. Personally, I like Digital Ocean as it is cheap ($5/month) and simple. I will be using this service for this walkthrough. If you would like a server from Digital Ocean, please use my referral link, https://m.do.co/c/95873a7be5e8 The account credit I get from the referral program will help me maintain my timekoin servers and beef them up to be super peers, all which strengthen the network.
Create your new server by selecting a name, plan, location (US or EU), and linux OS. I will be using Ubuntu 13.10 x32 on the base $5 plan (512 RAM, 20GB SSD) for this walkthrough.
Setup server
1. SSH into server. Server address and root user and password will be emailed to you. If you are on windows, I suggest using putty to connect to the server, http://www.putty.org/
2. Change root password
Code: Select all
passwd
4. Update the server software with the latest updates and patches
Code: Select all
sudo apt-get update
sudo apt-get upgrade
In step 2, one of the MySQL modules listed is no longer available for version 13.x Use this instead...
Code: Select all
sudo apt-get install mysql-server php5-mysql
Setup Timekoin
1. Get timekoin software, and unzip it. (URL and file name will change based on future releases)
Code: Select all
wget "http://timekoin.org/images/downloads/timekoinserver_v3.11.zip"
sudo apt-get install unzip
sudo unzip timekoinserver_v3.11.zip -d ~/timekoinserver_v3.11
login w/ root MYSQL user
Code: Select all
mysql -u root -p
Code: Select all
CREATE USER 'tkuser'@'localhost' IDENTIFIED BY 'password';
Code: Select all
CREATE DATABASE timekoin;
Code: Select all
GRANT ALL PRIVILEGES ON timekoin.* TO 'tkuser'@'localhost';
Code: Select all
FLUSH PRIVILEGES;
Code: Select all
USE timekoin;
source ~/timekoinserver_v3.11/new_install_sql/timekoin.sql
exit
3. Make a directory in apache
Code: Select all
sudo mkdir /var/www/timekoin
Code: Select all
sudo cp -R ~/timekoinserver_v3.11/v3.11/* /var/www/timekoin/
Code: Select all
sudo nano /var/www/timekoin/configuration.php
7. Login with the default user/pass, timekoin/12345
8. Update username/pass in Options menu
9. Generate keys in the Options menu. If you already have keys, go to the Backup menu to restore them.
10. Set your domain and port in System menu. If you do not have domain, leave it blank and IP will be used automatically. I would also allow "Ambient Peer Restarts" so that the network may restart your server if it stops for some reason. NOTE: Because of default Ubuntu behavior, you must disable CLI mode and populate the "Local Server Port" field. Other linux flavors may not have this requirement.
11. Enable generation on the Generation tab.
12. Start Timekoin main and watchdog process on System tab.
13. Modify file permissions so that you can update the software from inside Timekoin
Code: Select all
sudo chown -R www-data:www-data /var/www/timekoin
sudo chmod -R 770 /var/www/timekoin
Code: Select all
sudo nano start_timekoin.sh
Code: Select all
#!/bin/bash
#
# A script to restart timekoin server
#
# In case this is a server reboot, give web server time to start
sleep 15
# restart the main and watchdog process
wget -qO- "http://localhost/timekoin/main.php?action=begin_main" &> /dev/null
wget -qO- "http://localhost/timekoin/watchdog.php?action=begin_watchdog" &> /dev/null
Code: Select all
sudo chmod 755 start_timekoin.sh
Code: Select all
sudo crontab -e
Code: Select all
@reboot /home/YOUR_USER_NAME_HERE/start_timekoin.sh
I appreciate any feedback and will update this post to incorporate new items and best practices.
If you found this helpful, tips are always welcome. Easy key: warmach