LynxWiki Feed https://www.sapientier.com/LynxWiki/ A LynxWiki Syndication Feed v1.3.1.6 Copyright 2013, 2014 - J.W. Davidson https://www.sapientier.com/LynxWiki/Images/120px-Canadian_Lynx_side_head.png LynxWiki Feed https://www.sapientier.com/LynxWiki/ WordpressWebsiteUpdate0023 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/WordpressWebsiteUpdate WordpressWebsiteUpdate <p>The website upgrade will include the following activities:</p> <ul> <li> upgrade docker to 17.03.0-ce</li> <li> upgrade docker-compose to 1.11.2</li> <li> upgrade nginx from 1.6.2 to 1.10.3</li> <li> install Lets' Encrypt https certificates</li> <li> fix missing wp_metadata table</li> <li> Upgrade Wordpress from 4.4.1 to 4.7.3</li> <li> fix mysql performancedata table structure</li> <li> revise nginx configuration to support https</li> <li> upgrade php from 5.6.17 to 7.1.2</li> <li> revise docker-compose configuration to used fixed network addresses and wordpress package 4.7.3-php7.1-apache</li> <li> updgrade Wordpress plugins in use to latest version (except WP Bakery)</li> <li> backup pre-upgrade installation and post-upgrade backup</li> </ul> <h3 id="_1_Step_1_stop_website_down_10_-_15_minutes">Step 1: stop website (down 10 - 15 minutes)</h3> <pre> docker-compose down -v</pre> <h3 id="_2_Step_2_upgrade_docker">Step 2: upgrade docker</h3> <pre> apt-get update apt-get install -only-upgrade docker</pre> <h3 id="_3_Step_3_upgrade_docker_compose">Step 3: upgrade docker compose</h3> <pre> apt-get install -only-upgrade docker-compose</pre> <h3 id="_4_Step_4_upgrade_os">Step 4: upgrade os</h3> <pre> apt-get upgrade</pre> <h3 id="_5_Step_5_upgrade_nginx">Step 5: upgrade nginx</h3> <p>Edit the file <strong>/etc/apt/sources.list</strong> and add the following lines</p> <pre> deb http://nginx.org/packages/debian/ jessie nginx deb-src http://nginx.org/packages/debian/ jessie nginx</pre> <p>after saving the file</p> <pre> apt-get remove --purge nginx nginx-common apt-get update apt-get install nginx</pre> <p>Copy the file <strong>nginx.conf.nossl</strong> shown below to <strong>etc/nginx/nginx.conf</strong></p> <pre> systemctl restart nginx</pre> <h3 id="_6_Step_6_restart_website">Step 6: restart website</h3> <pre> docker-compose up -d</pre> <h3 id="_7_Step_7_install_Certbot_from_Lets_Encrypt">Step 7: install Certbot from Lets' Encrypt</h3> <p>Add the backports reference to the file <strong>/etc/apt/sources.list</strong></p> <pre> deb http://ftp.debian.org/debian jessie-backports main</pre> <p>then install Certbot</p> <pre> apt-get update sudo apt-get install certbot -t jessie-backports</pre> <h3 id="_8_Step_8_Fix_missing_wp_metadata_table">Step 8: Fix missing wp_metadata table</h3> <p>Using the dashboard, update to version 4.7.3, which will trigger a database update to add the missing table</p> <h3 id="_9_Step_9_Change_container_to_wordpress_473-php71-apache">Step 9: Change container to wordpress 4.7.3-php7.1-apache</h3> <p>Update the file docker-compose.yml to the one included below</p> <h3 id="_10_Step_10_Fix_structure_of_performance_data_table">Step 10: Fix structure of performance data table</h3> <p>Run the following commands</p> <pre> docker exec -it wpdocker_mysql_1 bash sudo mysql upgrade -u root -p sudo mysql -u root -p -e 'grant all privileges on wp01.* to "wp01User"@"172.18.0.5" identified by "valcom"' exit</pre> <h3 id="_11_Step_11_update_Wordpress_plugins">Step 11: update Wordpress plugins</h3> <p>In the dashboard, update each plugin that is activated</p> <h3 id="_12_Step_12_run_Certbot_to_get_certificates">Step 12: run Certbot to get certificates</h3> <pre> certbot certonly --webroot -w /var/www/html -d www.valcom.ca -d valcom.ca</pre> <h3 id="_13_Step_13_switch_nginx_to_proxy_">Step 13: switch nginx to proxy <strong>HTTPS</strong> (website will be down 20 - 30 seconds)</h3> <p>Copy the file <strong>nginx.copy.ssl</strong> to <strong>/etc/nginx/nginx.conf</strong></p> <pre> systemctl restart nginx</pre> <h3 id="_15_Step_14_fix_">Step 14: fix <strong>HTTPS</strong> references (web site will have minor errors until corrections saved)</h3> <p>Change <strong>http://</strong> to <strong>https://</strong> in the following locations using the dashboard</p> <pre> Envato Toolkit &gt; Themes &gt; Theme Options &gt; General &gt; Logo, Icons Envato Toolkit &gt; Themes &gt; Theme Options &gt; Skin &gt; Backgrounds Envato Toolkit &gt; Themes &gt; Theme Options &gt; Skin &gt; Breadcrumbs</pre> <p> <strong>Do not change settings in</strong> </p> <pre> Settings &gt; General &gt; Wordpress Address (URL) Settings &gt; General &gt; Site Address (URL)</pre> <p> <strong>_____________________________________________________________________</strong> </p> <p>The file: <strong>docker-compose.yml</strong></p> <pre> version: '2' services: mysql: image: mysql:5.5 restart: always environment: - MYSQL_ROOT_PASSWORD=valcom - MYSQL_DATABASE=wp01 - MYSQL_USER=wp01User - MYSQL_PASSWORD=valcom networks: valcomtest: ipv4_address: 172.18.0.4 volumes: - /home/valcom_web/wp_docker/mysql_data:/var/lib/mysql web: image: wordpress:4.7.3-php7.1-apache restart: always links: - mysql environment: - WORDPRESS_DB_PASSWORD=valcom - WORDPRESS_DB_NAME=wp01 - WORDPRESS_DB_USER=wp01User ports: - "127.0.0.3:8080:80" networks: valcomtest: ipv4_address: 172.18.0.5 working_dir: /var/www/html volumes: - /home/valcom_web/wp_docker/wp-content:/var/www/html/wp-content networks: valcomtest: driver: bridge ipam: driver: default config: - subnet: 172.18.0.0/24 gateway: 172.18.0.1</pre> <p>The file: <strong>nginx.conf.nossl</strong></p> <pre> worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; server { listen 80; server_name www.valcom.ca; location /.well-known/acme-challenge { root /var/www/html; } location / { proxy_pass http://172.17.0.3:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } }</pre> <p>The file <strong>nginx.conf.ssl</strong></p> <pre> user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:!DH+AES;!RSA+AESGCM:!RSA+AES:!aNULL:!MD5:!DSS:!EXP"; ssl_ecdh_curve secp384r1; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; ssl_prefer_server_ciphers on; map $sent_http_content_type $expires { default off; text/html.* epoch; text/css max; application/javascript max; image/jpeg max; image/png max; image/vnd.*icon max; } #gzip on; include /etc/nginx/conf.d/*.conf; upstream upstream_server { server 172.18.0.5:80; } server { listen 443 ssl http2 default_server; server_name www.valcom.ca; ssl_certificate /etc/letsencrypt/live/www.valcom.ca/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.valcom.ca/privkey.pem; add_header Strict-Transport-Security max-age=63072000; add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; location /.well-known/acme-challenge { root /var/www/html; } location / { proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_redirect off; proxy_pass http://upstream_server; expires $expires; } } server { listen 80; location /.well-known/acme-challenge { root /var/www/html; } location / { return 301 https://$host$request_uri; } } }</pre> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2017-03-16T20:09:28-04:00 ProxyNginxSSL0008 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/ProxyNginxSSL ProxyNginxSSL <p>This is the configuration of <strong>NGINX</strong> on a Mac as a reverse proxy with <strong>SSL</strong>.</p> <h2 id="_1__Configuration"> <strong>NGINX</strong> Configuration</h2> <p>Document root is at /usr/local/var/www</p> <p>Configuration file is at /usr/local/etc/nginx/nginx.conf (linked to /etc/nginx/nginx.conf)</p> <p>The config file can be edited on the mac using (from the configuration directory)</p> <pre> open -e nginx.conf</pre> <p>The nginx process must be restarted after changing the configuration</p> <pre> sudo nginx -s reload</pre> <p>The configuration file for <strong>NGINX</strong> supporting redirect to <strong>HTTPS</strong></p> <pre> worker_processes 1; events { worker_connections 1024; } http{ include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # Expires map map $sent_http_content_type $expires { default off; ~text/html.*charset=utf-8 epoch; text/css max; application/javascript max; image/svg\+xml max; ~image/ max; } upstream upstream_server { server localhost:5000; } server { listen 443 ssl default_server; listen [::]:443 ssl default_server; server_name sierra.sapientier.com; ssl_certificate /etc/letsencrypt/live/sierra.sapientier.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/sierra.sapientier.com/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:!DH+AES:!RSA+AESGCM:!RSA+AES:!aNULL:!MD5:!DSS:!EXP; ssl_ecdh_curve secp384r1; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; ssl_prefer_server_ciphers on; add_header Strict-Transport-Security max-age=63072000; add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; location /.well-known { root /usr/local/var/www; } location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://upstream_server; gzip on; gzip_types ~text/html.*charset=utf-8 text/css application/javascript image/svg.* ~image/; etag on; expires $expires; break; } } server { listen 80 default_server; listen [::]:80 default_server; server_name sierra.sapientier.com; location /.well-known { root /usr/local/var/www; } location / { return 301 https://$host$request_uri; } } } </pre> <fieldset class="Property"> <legend class="PropertyName">Note</legend> <div class="PropertyValue">compression for svg images is not yet working</div> </fieldset> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2017-03-02T10:58:10-05:00 IntroductionLynxJournal0005 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/IntroductionLynxJournal IntroductionLynxJournal <h2 id="_1_Overview">Overview</h2> <p>LynxJournal is a one-stop application for journalling, note taking and calendaring. At its core is the basic system, known as the Bullet Journal, but instead of a bound book this is electronic. LynxJournal easily copies notes from Web pages and stores them with notes added by yourself. Journal entries with dates and optional times are displayed on a calendar with monthly, weekly or daily views. Journal Entries are index for Full Text searches.</p> <h2 id="_2_Journal_Entries">Journal Entries</h2> <p>New Entries are created by clicking the Create New Entry on the page you want the entry to appear on. This will display an entry form to gather the data for the Journal Entry.</p> <p> <img src="/LynxWiki/Attachments/upload/Default/images/CreateJEntry.png" /> </p> <p>The only required items are the Entry type and the Entry Text. On the User Page there is a different editor that allows more complex notes to be entered or edited.</p> <p> <img src="/LynxWiki/Attachments/upload/Default/images/UserPageEditor.png" /> </p> <p>Once a Journal Entry has been saved it will have a set of actions that can be applied to the entry. These actions are shown beside each entry.</p> <p> <img src="/LynxWiki/Attachments/upload/Default/images/JEntryActions.png" /> </p> <p>You can see what each action does if you forget by hovering the mouse of the individual icons to get the tool tip. The available actions are:</p> <ul> <li> Edit Entry;</li> <li> Index Entry;</li> <li> Important Entry;</li> <li> Completed Entry;</li> <li> Scheduled Entry; and </li> <li> Delete Entry.</li> </ul> <p>If an entry is Indexed then it will show as a possible selection on the Journal Index Page.</p> <h2 id="_3_Journal_Pages">Journal Pages</h2> <p>LynxJournal has all the page types that would be found in a normal Bullet Journal, but it has some additional page types that make sense for an electronic implementation. The types are:</p> <ul> <li> Cover Page - added;</li> <li> Index - standard</li> <li> Future Logs - standard</li> <li> Monthly Log - standard</li> <li> Daily Log - standard</li> <li> User Pages - standard</li> <li> Calendar - added</li> <li> Search - added</li> <li> Export - added</li> </ul> <h3 id="_4_Cover_Page">Cover Page</h3> <p>Cover page is a page with a number of utility functions. First it is to be aesthetically pleasing. A user can upload any number of images and one will be selected at random to be displayed here. This page also allows the user to register, login or delete their account. It also serves as an introduction page and has some links to useful content about the application.</p> <h3 id="_5_Index">Index</h3> <p>The Index page contains links to entries in other pages so that they can easily be found and navigated to quickly. The index actions are shown below</p> <p> <img src="/LynxWiki/Attachments/upload/Default/images/IndexActions.png" /> </p> <p>The blue right arrow goes to the page with the entry and the red X deletes the index, but does not delete the content of the entry.</p> <h3 id="_6_Future_Logs">Future Logs</h3> <p>Future Logs display a means of getting entries for future months, up to 18 months in the future. It shows a cluster of 6 months at a time. The arrows at the top of the page move through the months on at a time in the direction indicated. Entries created in future months show in Monthly Logs automatically. Events and Tasks with dates automatically show in the Calendar view for the scheduled dates.</p> <h3 id="_7_Monthly_Log">Monthly Log</h3> <p>The monthly log is normally to input entries that will happen later in the current month. Date based entries in the Monthly Log automatically show on the Calendar.</p> <h3 id="_8_Daily_Log">Daily Log</h3> <p>The Daily Log is to record entries as they happen during the day. It allows events to be recorded for the day and to track tasks for a day. Date based entries in the Daily Log automatically show on the Calendar.</p> <h3 id="_9_User_Pages">User Pages</h3> <p>User Pages are mainly for longer notes or having task lists grouped together. Whatever makes sense. This can be used to replace the functionality of Evernote or OneNote. Web clips can easily be stored in a user page. A page can have a single web note or multiple web notes. Printing from these pages should give great results. </p> <h4 id="_10_Recommended_Tools_for_creating_User_Pages">Recommended Tools for creating User Pages</h4> <p>If using a Chrome Web Browser the extension Auto Copy is the best tool for doing web page copies. Auto Copy can be configured to automatically add the original link the page was taken from, and it will inline the images so that they are stored as part of the page, without requiring links that might disappear in the future.</p> <p>Microsoft Edge, Safari and Firefox all have a Reader View which presents the user with an uncluttered web page, that can easily be copied and pasted into a Journal Entry. </p> <p>The Safari reader view is the best way to get copies when using an iPad or iPhone.</p> <h3 id="_11_Calendar">Calendar</h3> <p>Calendar displays entries that have dates associated with them for the period selected for display. </p> <h3 id="_12_Search">Search</h3> <p>All entries are indexed for full text search. This page allows for the entry of search terms and the display of results that can be easily navigated to. Compound terms may be used to refine searches</p> <h3 id="_13_Export">Export</h3> <p>This creates a pdf of all pages in the user's journal which can be save to a local drive and printed at a later time.</p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-11-10T08:40:00-05:00 IronPython0001 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/IronPython IronPython <h2 id="_1_Level_2_Header_for_a_New_Page">Level 2 Header for a New Page</h2> <p>Edit the content of this message to create your new page. Add tags as required and then save the page.</p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-09-24T22:42:19-04:00 AspNetCore0001 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/AspNetCore AspNetCore <h2 id="_1_Installation_on_Linux">Installation on Linux</h2> <p> <a class="externalLink" title="" href="https://www.microsoft.com/net/core#ubuntu">ASP.Net Core Install</a> </p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-07-04T17:01:33-04:00 InvoiceDiagrams0002 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/LynxAccounts/InvoiceDiagrams InvoiceDiagrams <h3 id="_1_Invoice_Relationships">Invoice Relationships</h3> <p> <img src="/LynxWiki/Attachments/upload/Default/images/Invoice.png" /> </p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-06-06T08:25:51-04:00 AccountingPeriod0004 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/LynxAccounts/AccountingPeriod AccountingPeriod <h2 id="_1_Lookup_values_Used">Lookup values Used</h2> <p>The possible lookup values for AccountingPeriodType are:</p> <ul> <li> Fiscal Year</li> <li> Quarter</li> <li> Month</li> </ul> <h2 id="_2__Usage"> <a title="Click here to go to or create this topic" class="create" href="https://www.sapientier.com/LynxWiki/WikiTopic/Page/~/WikiRoot/WikiDir/AccountingPeriod">AccountingPeriod</a> Usage</h2> <p>Each Fiscal Year should be defined in the system. The definition of Quarters are optional but if they are used the Fiscal Year should be the parent of the quarter, and each month in the fiscal Year would have a Quarter defined as the parent accounting period. If Quarters are not used then each Month should have the Fiscal Year as the parent accounting period.</p> <p>Only one month should have the value for CurrentPeriod set to true. There must always be one Account Period with a CurrentPeriod value of true.</p> <p>The value for PeriodClosed should be the date the period is no longer current. Once the PeriodClosed has been entered it is not possible to create entries with an EntryDate within the period of the closed Accounting Period.</p> <p> <img src="/LynxWiki/Attachments/upload/Default/images/AccountingPeriod.png" /> </p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-05-27T17:51:05-04:00 HomePage0004 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/LynxAccounts/HomePage HomePage <h2 id="_1_Lynx_Accounts_Home_Page">Lynx Accounts Home Page</h2> <h3 id="_2_Initialize_Account_System">Initialize Account System</h3> <h4 id="_3_Set_up_Company_Information_for_the_Company_">Set up Company Information for the Company </h4> <h4 id="_4_Set_up_Bank_Information_for_the_Company">Set up Bank Information for the Company</h4> <h4 id="_5_Set_up_General_Ledger_Accounts_for_the_Company">Set up General Ledger Accounts for the Company</h4> <h4 id="_6_Set_up_Supplier_Companies_for_the_Company">Set up Supplier Companies for the Company</h4> <h4 id="_7_Set_up_Consultant_Firms_for_the_Company">Set up Consultant Firms for the Company</h4> <h4 id="_8_Set_up_Employees_for_the_Company">Set up Employees for the Company</h4> <h4 id="_9_Set_up_Client_Companies_for_the_Company">Set up Client Companies for the Company</h4> <h4 id="_10_Set_up_Projects_for_the_Company">Set up Projects for the Company</h4> <h3 id="_11_Import_Starting_Data_for_Company">Import Starting Data for Company</h3> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-05-19T18:12:43-04:00 DockerWordpressInstallOnDebian0029 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/TestDir/DockerWordpressInstallOnDebian DockerWordpressInstallOnDebian <h2 id="_1_Install_Debian_on_Target_Server">Install Debian on Target Server</h2> <p>The steps to install Debian 8 (Jessie) are as follows:</p> <ol> <li> Download the Debian Network install image from <a class="externalLink" href="https://www.debian.org/distrib/netinst">https://www.debian.org/distrib/netinst</a> selecting the <strong>amd64</strong> option under Small CD section</li> <li> Burn a CD from the downloaded image</li> <li> Boot the Target Server from the created CD</li> <li> Install Debian following the prompts as required (choose LXDE and Utilities in the software options)</li> </ol> <h2 id="_2_Install_Utilities_on_Target_Server">Install Utilities on Target Server</h2> <p>The utilities to be installed on the Server are:</p> <ol> <li> nginx web server for a reverse proxy</li> </ol> <pre> apt-get install nginx</pre> <ol> <li> curl and apt-transport-https for getting software</li> </ol> <pre> apt-get install curl apt-transport-https</pre> <ol> <li> Install MySQL Workbench using Synaptic</li> </ol> <h3 id="_3_Configure_">Configure <strong>nginx</strong></h3> <p>In the directory <strong>/etc/nginx</strong> copy the file <strong>default</strong> to <strong>default.orig</strong> in the directory <strong>/etc/nginx/sites-available</strong> and paste the contents of the configuration file below. Then stop and restart nginx.</p> <ul> <li> copy the file <strong>default</strong> to <strong>default.orig</strong></li> </ul> <pre> cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.orig</pre> <ul> <li> paste the contents below into the file <strong>/etc/nginx/sites-available/default</strong> using a text editor</li> </ul> <pre> server { listen 80; server_name www.valcom.ca; location / { proxy_pass http://172.17.0.3:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }</pre> <ul> <li> place a file <strong>500.html</strong> in <strong>/var/www/html</strong> so that the content is displayed to a web user when the website is unavailable due to maintenance.</li> <li> stop and start nginx (it is not yet ready to serve any content)</li> </ul> <pre> service nginx stop service nginx start</pre> <h2 id="_4_Install_Docker_and_Docker-Compose">Install Docker and Docker-Compose</h2> <p>The 2 docker related packages are:</p> <ol> <li> docker</li> <li> docker composer</li> </ol> <p>The installation of docker (<a class="externalLink" href="http://www.docker.io">http://www.docker.io</a>) is done by following the steps below:</p> <ul> <li> get the docker key for aptitude</li> </ul> <pre> apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D</pre> <ul> <li> create a new file <strong>/etc/apt/sources.list.d/docker.list</strong> (if there is an existing file delete the contents) and then enter the following line and save the file</li> </ul> <pre> deb https://apt.dockerproject.org/repo debian-jessie main</pre> <p>for LXLE the values used are</p> <pre> deb https://apt.dockerproject.org/repo ubuntu-trusty main</pre> <p /> <ul> <li> then update the aptitude repository information</li> </ul> <pre> apt-get update</pre> <ul> <li> verify that aptitude is getting docker from the correct repository</li> </ul> <pre> apt-cache policy docker-engine</pre> <ul> <li> install the docker engine</li> </ul> <pre> apt-get install docker-engine</pre> <ul> <li> install docker compose <strong>replace the version 1.5.2 in the command below with the current docker compose version</strong> which can be found at <a class="externalLink" href="https://docs.docker.com/compose/install/">https://docs.docker.com/compose/install/</a></li> </ul> <pre> curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` &gt; /usr/local/bin/docker-compose</pre> <ul> <li> ensure execute permissions are correct on docker compose</li> </ul> <pre> chmod +x /usr/local/bin/docker-compose</pre> <ul> <li> verify the docker-compose installation</li> </ul> <pre> docker-compose --version</pre> <p> <strong>NOTE: All commands that start with</strong> <i>docker</i> <strong>must be run as root user or preceeded by</strong> <i>sudo</i> </p> <h3 id="_5_Copy_an_Existing_Wordpress_Docker_Container_Set">Copy an Existing Wordpress Docker Container Set</h3> <p>if you do not have an existing Docker Container Set then follow the instructions in the section Configure Docker Containers for Use below. If you do have a container set then copy the directory <strong>wp_docker</strong> to the location you want to run the docker set from. Verify that the paths in the volume settings of the file <strong>docker-compose.yml</strong> match your location</p> <pre> web: image: wordpress links: - mysql environment: - WORDPRESS_DB_PASSWORD=valcom - VIRTUAL_HOST=www.valcom.ca ports: - 8080:80 working_dir: /var/www/html volumes: - /&lt;your location&gt;/wp-content:/var/www/html/wp-content mysql: image: mysql environment: - MYSQL_ROOT_PASSWORD=valcom - MYSQL_DATABASE=wp01 - MYSQL_USER=wp01User - MYSQL_PASSWORD=valcom volumes: - /&lt;your location&gt;/mysql_data:/var/lib/mysql</pre> <h3 id="_6_Configure_Docker_Containers_for_Use">Configure Docker Containers for Use</h3> <p>Create a directory <strong>wp_docker</strong> in <strong>/root/Downloads</strong> and create a file docker-compose.yml with the contents below:</p> <ul> <li> create the directory <strong>/root/Downloads/wp_docker</strong></li> </ul> <pre> mkdir /home/valcom_web/wp_docker touch /home/valcom_web/wp_docker/docker-compose.yml</pre> <ul> <li> using an editor paste the contents below into the new file <strong>docker-compose.yml</strong>, which will create 2 docker containers - one called web and the other mysql</li> </ul> <pre> web: image: wordpress links: - mysql environment: - WORDPRESS_DB_PASSWORD=valcom ports: - 8080:80 working_dir: /var/www/html volumes: - /home/valcom_web/wp_docker/wp-content:/var/www/html/wp-content mysql: image: mysql environment: - MYSQL_ROOT_PASSWORD=valcom - MYSQL_DATABASE=wp01 - MYSQL_USER=wp01User - MYSQL_PASSWORD=valcom volumes: - /home/valcom_web/wp_docker/mysql_data:/var/lib/mysql</pre> <h3 id="_7_Move_">Move MySQL Data for Use</h3> <ul> <li> copy the <strong>wp01</strong> and <strong>mysql</strong> directories from an existing wordpress installation. It is normally found in <strong>/var/lib/mysql</strong> and store it on a USB drive</li> <li> copy the <strong>wp01</strong> and <strong>mysql</strong> directories from the USB drive to /root/Downloads/wp_docker</li> </ul> <h3 id="_9_Move_Wordpress_Data_for_Use">Move Wordpress Data for Use</h3> <ul> <li> copy the <strong>wp-content</strong> directory from an existing wordpress installation. It is normally found in <strong>/srv/www/wordpress</strong> and store it on a USB direv. Ensure you get the directory that is full of files rather than one that is symlinked.</li> <li> copy the <strong>wp-content</strong> directory from the USB drive to <strong>/root/Downloads/wp_docker</strong></li> </ul> <h3 id="_10_Run_the_">Run the MySQL and Wordpress install</h3> <ul> <li> install MySQL, apache, php and wordpress by creating the docker containers for the first time which will cause the download and installation to happen automatically.</li> </ul> <pre> cd /home/valcom_web/wp_docker docker-compose up -d</pre> <h4 id="_12_Fix_Permissions_for_Wordpress">Fix Permissions for Wordpress</h4> <p>In the same directory as that which you started docker run the following command to ensure write permissions are working</p> <pre> chmod -R 764 wp-content cd wp-content chusr -R www-data . chgrp -R www-data .</pre> <h4 id="_13_Shutdown_Wordpress_and_">Shutdown Wordpress and MySQL</h4> <p>The following commands will shutdown wordpress and MySQL</p> <pre> docker stop wpdocker_web_1 docker stop wpdocker_mysql_1</pre> <h3 id="_14_Run_">Run MySQL Docker Container Alone</h3> <p>If the MySQL docker container is not running as part of the Wordpress execution it is still possible to run it alone using the following command</p> <pre> docker run --name mysql -v /home/valcom_web/wp_docker/mysql_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=valcom -d mysql:5.5</pre> <p>The standalone MySQL docker container is stopped and removed using the following command (no data is lost).</p> <pre> docker rm -f mysql</pre> <h3 id="_16_Configure_">Configure MySQL Workbench </h3> <ul> <li> create a MySQL connection in workbench at IP address 172.17.0.2 with password <strong>valcom</strong></li> </ul> <h3 id="_18_Troubleshoot_docker_installation">Troubleshoot docker installation</h3> <p>This introduces some of the docker troubleshooting commands</p> <h4 id="_19_Review_docker_container_network_properties">Review docker container network properties</h4> <pre> docker inspect wpdocker_mysql_1 docker inspect wpdocker_web_1</pre> <h4 id="_20_Determine_running_docker_containers">Determine running docker containers</h4> <pre> docker ps</pre> <h4 id="_21_Determine_all_defined_docker_containers">Determine all defined docker containers</h4> <pre> docker ps -a</pre> <h4 id="_22_Show_docker_container_logfiles">Show docker container logfiles</h4> <pre> docker logs wpdocker_mysql_1 docker logs wpdocker_web_1</pre> <h4 id="_23_Connect_to_a_mysql_instance_running_inside_a_docker_container">Connect to a mysql instance running inside a docker container</h4> <p>The command below starts a bash session in the container</p> <pre> docker exec -it wpdocker_mysql_1 bash</pre> <p>then issue a mysql command to connect to the mysql server in the container</p> <pre> mysql -u root -p --host 172.17.0.2</pre> <p>after that you will be in a mysql session on the command line</p> <h3 id="_24_Problems_with_mysql_connections">Problems with mysql connections</h3> <p>Somewhere in mysql 5.6 the permission for a user that granted access on localhost failed when the mysql instance was running on an internal network. The message for what the failure was did not get corrected until the latest version of mysql 5.7. In order to correct connection issues it may be necessary to issue a grant command using either "MySQL" Workbench or by executing a mysql command directly on the instance</p> <pre> grant all privileges on wp01.* to 'wp01User'@'172.17.0.3' identified by 'valcom';</pre> <p>Where <strong>wp01</strong> is the wordpress database name, <strong>wp01User</strong> is the wordpress user and <strong>172.17.0.3</strong> is the ip address of the web (not the mysql) container.</p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-05-17T19:04:38-04:00 PrivacyViolationSites0011 https://www.sapientier.com/LynxWiki/WikiTopic/Page/WikiRoot/WikiDir/PrivacyViolationSites PrivacyViolationSites <h2 id="_1_Current_Violators">Current Violators</h2> <p>This is a list of sites that violate privacy and do not respect Do-Not-Track requests and are offensive about a user blocking their ads or cookies:</p> <ul> <li> <a class="externalLink" href="http://www.forbes.com">http://www.forbes.com</a> </li> <li> <a class="externalLink" href="http://www.blockadblock.com">http://www.blockadblock.com</a> </li> <li> <a class="externalLink" href="http://www.wsj.com">http://www.wsj.com</a> - very few articles accessible without a subscription</li> <li> <a class="externalLink" href="https://www.foreignaffairs.com">https://www.foreignaffairs.com</a> </li> <li> <a class="externalLink" href="http://www.wired.com">http://www.wired.com</a> - has a stated policy to restrict access if an ad-blocker is used</li> </ul> <h2 id="_2_Possible_Violators">Possible Violators</h2> <p>This is a list of sites purported to be violators but not yet confirmed</p> <ul> <li> <a class="externalLink" href="http://www.gq.com">http://www.gq.com</a> - this site is awful anyway and is no loss if I never see it again</li> <li> <a class="externalLink" href="http://www.bild.de">http://www.bild.de</a> - seems to just be against AdBlock Plus, no issue with others?</li> </ul> <h2 id="_3_Reformed_Violators">Reformed Violators</h2> <p>This is the list of sites that have corrected their policies after initially being on either list above:</p> <hr class="Rule" /> <div class="cc"><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> <img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/deed.en_US"> Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</div> 2016-03-27T12:04:45-04:00