h1. Creating ToledoWinter.com Oct 23, 2014 1. Network Solutions - Register domain name 2. Digital Ocean - DNS - Add Domain: - - name=toledowinter.com - - ipaddress= - - Select a Droplet=soupmode.com - Create Domain 3. Digital Ocean - DNS - toledowinter.com - Add Record: - - CNAME - - Enter Name=WWW - - Enter Hostname=@ 4. Network Solutions - Manage Account - toledowinter.com - Change Where Domain Points - Domain Name Server - - NS1.DIGITALOCEAN.COM - - NS2.DIGITALOCEAN.COM - - NS3.DIGITALOCEAN.COM - Apply Changes - It may take 24 to 48 hours for the changes to take affect throughout the Internet 5. Digital Ocean Server - remote shell login - cd /home - mkdir toledowinter - cd toledowinter - within /home/toledowinter, execute - - git clone https://github.com/jrsawvel/Grebe.git - that will create a directory called Grebe, which contains the code - @cd /home@ - @chown -R owner:group toledowinter@ with the appropriate "owner" and "group" info - cd /home/toledowinter - mkdir posts - mkdir markup 6. MySQL Change to the directory that contains the database files. @cd /home/grebe/Grebe/sql@ This assumes that MySQL is installed. Create a new database and database user for Grebe. If planning to use an existing database, then skip these steps. Enter this command to get into the mysql command line interface: (it will ask for the root password) @mysql -uroot -p@ At the `mysql>` prompt, enter the following commands, one at a time: @create database toledoweatherdb;@ `create user 'toledoweather'@'localhost' identified by 'password_here';` `grant all privileges on toledoweatherdb.* to 'toledoweather'@'localhost';` `flush privileges;` `quit;` Create the Grebe database tables. `mysql -utoledoweather -pyourpassword -D toledoweatherdb < grebe-users.sql` `mysql -utoledoweather -pyourpassword -D toledoweatherdb < grebe-posts.sql` `mysql -utoledoweather -pyourpassword -D toledoweatherdb < grebe-tags.sql` `mysql -utoledoweather -pyourpassword -D toledoweatherdb < grebe-sessionids.sql` ## Perl scripts cd /home/toledowinter/Grebe/root chmod 755 grebe.pl cd api/v1 chmod 755 grebeapi.pl ## Edit Grebe Configuration Change directory to the location of the Config module. `cd /home/toledowinter/Grebe/lib/Config` Edit `Config.pm` and make the appropriate directory location change for the variable `$yml_file` which points to the location of the Yaml configuration file. `my $yml_file = "/home/toledowinter/Grebe/yaml/grebe.yml";` Change directory to the Yaml config file location. `cd /home/toledowinter/Grebe/yaml` Edit the file `grebe.yml` and make the appropriate changes. For testing, enable debug mode. `debug_mode: 1` Debug mode will send the password to the screen for account creation and requesting new password. If using the no-password-login feature, then the login activation link will be displayed in the browser and not emailed. If `read_template: 1`, then the following files need linked from the `Grebe/tmpl` directory to the `posts` directory. `ln -s /home/toledowinter/Grebe/tmpl/header.tmpl /home/toledowinter/posts` `ln -s /home/toledowinter/Grebe/tmpl/inc_headernav.tmpl /home/toledowinter/posts` `ln -s /home/toledowinter/Grebe/tmpl/footer.tmpl /home/toledowinter/posts` ## Access Site Open web browser and enter the following URL: `http://toledowinter.com` The site or blog app should load, displaying the default image header and other links. Create a user account: `http://toledowinter.com/signup` Login: `http://toledowinter.com/login` ## Nginx cd /etc/nginx/sites-available create file toledoweather.com Create a link to the new Nginx server block file. ln -s /etc/nginx/sites-available/toledowinter.com /etc/nginx/sites-enabled/ Restart Nginx. service nginx restart ## /etc/hosts cd /etc edit hosts file and add toledowinter.com entry ## memcached cd /etc cp memcached.conf memcached_toledowinter.conf edit the new config file and change the port number to 11214 restart memcached service memcached restart