{"id":303,"date":"2018-12-19T21:06:15","date_gmt":"2018-12-19T21:06:15","guid":{"rendered":"https:\/\/www.douglaskirk.ca\/?page_id=303"},"modified":"2018-12-22T04:12:06","modified_gmt":"2018-12-22T04:12:06","slug":"server-setup","status":"publish","type":"page","link":"https:\/\/www.douglaskirk.ca\/index.php\/server-setup\/","title":{"rendered":"Server Setup"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"303\" class=\"elementor elementor-303 elementor-bc-flex-widget\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a04413e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a04413e\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-66 elementor-top-column elementor-element elementor-element-d090a7b\" data-id=\"d090a7b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4d9e88f elementor-widget elementor-widget-text-editor\" data-id=\"4d9e88f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: inherit;\">My Linux server is hosted on a powerful pink Toshiba Portege M800 that\u00a0<\/span><span style=\"font-size: inherit;\">I had purchased it for my wife at Best Buy one Christmas. and it performed well till it&#8217;s battery and speed caught up with it.<\/span><\/p><p><span style=\"font-size: inherit;\">Now it&#8217;s a little Ubuntu 18.04 Server running my two websites and a Minecraft server for my boys.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-82f5e13\" data-id=\"82f5e13\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-435b58c elementor-widget elementor-widget-image\" data-id=\"435b58c\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"614\" height=\"409\" src=\"https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/Toshiba-Portege-M800.jpeg\" class=\"attachment-large size-large wp-image-306\" alt=\"\" srcset=\"https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/Toshiba-Portege-M800.jpeg 614w, https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/Toshiba-Portege-M800-300x200.jpeg 300w, https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/Toshiba-Portege-M800-360x240.jpeg 360w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-41a92a0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"41a92a0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f4169ad\" data-id=\"f4169ad\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ff0c689 elementor-widget elementor-widget-heading\" data-id=\"ff0c689\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">My Server Notes<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4dbd559 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4dbd559\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-da9336f\" data-id=\"da9336f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3429d74 elementor-widget elementor-widget-text-editor\" data-id=\"3429d74\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>My goal in this section is to list a few helpful things I came across.<\/p><p>Please note this is a ongoing scrap page of misc notes. A work in progress.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ef4e72d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ef4e72d\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bae217c\" data-id=\"bae217c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ee5f997 elementor-widget elementor-widget-text-editor\" data-id=\"ee5f997\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>www.digitalocean.com is a very useful site that I referenced to setup this site with.<\/p><p>The first being:<\/p><p>How To Install WordPress with LAMP on Ubuntu 18.04<\/p><pre><span style=\"font-size: inherit;\">https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-wordpress-with-lamp-on-ubuntu-18-04<\/span><\/pre><p>The second being:<\/p><p>How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04<\/p><pre>https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04<\/pre><p>After creating my site, I soon realised that the last time I did this much work, I didn&#8217;t have my database backed up and it was not a good day. What make for an even worst day is when you realise that the backup you protected doesn&#8217;t seem to work the way you had thought, and something seems to be missing. With that, I like to do a dry run at rebuilding a mirrored site on another systems and verify everything.<\/p><p>WordPress relies on mysql to deal with it&#8217;s database, so another site I came across explained how to create a backup easily.<\/p><p>How To Copy a MySQL Database<\/p><pre>http:\/\/www.mysqltutorial.org\/mysql-copy-database\/<\/pre><p>I noticed a bunch of errors viewing the wordpress database with phpmyadmin and found a solution at stackoverflow.<\/p><pre>https:\/\/stackoverflow.com\/questions\/48001569\/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b48d3a6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b48d3a6\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-dcca3f4\" data-id=\"dcca3f4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-406220d elementor-widget elementor-widget-image\" data-id=\"406220d\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/phpmyadmin_error-1024x576.png\" class=\"attachment-large size-large wp-image-315\" alt=\"\" srcset=\"https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/phpmyadmin_error-1024x576.png 1024w, https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/phpmyadmin_error-300x169.png 300w, https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/phpmyadmin_error-768x432.png 768w, https:\/\/www.douglaskirk.ca\/wp-content\/uploads\/2018\/12\/phpmyadmin_error.png 1366w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ddc657f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ddc657f\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-957f6fe\" data-id=\"957f6fe\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9ed833a elementor-widget elementor-widget-text-editor\" data-id=\"9ed833a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><\/p><p><span style=\"font-size: inherit;\">Note the changes in red.<\/span><\/p><pre>|| <span style=\"color: #ff0000;\">(<\/span>(count($analyzed_sql_results['select_expr']<span style=\"color: #ff0000;\">)<\/span> == 1) <br \/>&amp;&amp; <span style=\"color: #ff0000;\">(<\/span>(count($analyzed_sql_results['select_tables'])<span style=\"color: #ff0000;\">)<\/span> == 1);<\/pre><p><span style=\"font-size: inherit;\">\u00a0|| (count($analyzed_sql_results[&#8216;select_expr&#8217;] == 1)<\/span><\/p><p>\u00a0&amp;&amp; count($analyzed_sql_results[&#8216;select_tables&#8217;]) == 1;<\/p><p>rockstar@mini:~$\u00a0<\/p><p>https:\/\/www.howtogeek.com\/323390\/how-to-fix-windows-and-linux-showing-different-times-when-dual-booting\/<\/p><p>timedatectl set-local-rtc 1 &#8211;adjust-system-clock<\/p><p>https:\/\/www.a2hosting.com\/kb\/installable-applications\/optimization-and-configuration\/wordpress2\/resetting-the-wordpress-administrator-password<\/p><p>UPDATE `wp_users` SET `user_pass` = MD5( &#8216;PASSWORD&#8217; ) WHERE `wp_users`.`user_login` = &#8220;USERNAME&#8221;;<\/p><p>https:\/\/www.digitalocean.com\/community\/tutorials\/initial-server-setup-with-ubuntu-18-04<\/p><p>Step 5 \u2014 Verifying Certbot Auto-Renewal<\/p><p>Let&#8217;s Encrypt&#8217;s certificates are only valid for ninety days. This is to encourage users to automate their certificate renewal process. The certbot package we installed takes care of this for us by adding a renew script to \/etc\/cron.d. This script runs twice a day and will automatically renew any certificate that&#8217;s within thirty days of expiration.<\/p><p>To test the renewal process, you can do a dry run with certbot:<\/p><p>sudo certbot renew &#8211;dry-run<\/p><p>If you see no errors, you&#8217;re all set. When necessary, Certbot will renew your certificates and reload Apache to pick up the changes. If the automated renewal process ever fails, Let\u2019s Encrypt will send a message to the email you specified, warning you when your certificate is about to expire.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e8ca5fc elementor-widget elementor-widget-image\" data-id=\"e8ca5fc\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.douglaskirk.ca\/wp-content\/plugins\/elementor\/assets\/images\/placeholder.png\" title=\"\" alt=\"\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>My Linux server is hosted on a powerful pink Toshiba Portege M800 that\u00a0I had purchased it for my wife at Best Buy one Christmas. and it performed well till it&#8217;s battery and speed caught up with it. Now it&#8217;s a little Ubuntu 18.04 Server running my two websites and a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/template-fullwidth.php","meta":{"footnotes":""},"class_list":["post-303","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/pages\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":10,"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/pages\/303\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/pages\/303\/revisions\/322"}],"wp:attachment":[{"href":"https:\/\/www.douglaskirk.ca\/index.php\/wp-json\/wp\/v2\/media?parent=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}