Developing Your Local Development Environment
Read the Manual
C is one of the original machine languages. C++ is a more advanced version of C. Python is easier to learn and a very versatile programming language. HTML, CSS and JavaScript are languages that we use to communicate with computers other than the one we are currently working with.
Download the PDF documentation for ZSH, C and C++, Python, HTML, CSS, Javascript, PostgreSQL, Nginx and Django. W3C is a great source of information about the languages of the Internet. Spend the next 2 years reading them all.
You don’t necessarily need to read all 2621 page of the PostgreSQL documentation. The first 766 pages will be a good start. Switch back and forth from reading the documentation to watching video tutorials.
You don’t have to memorize everything. You probably will not understand everything, especially when you first start studying a language. Get the knowledge into your long term memory, so that it will be familiar when you are reading it again or you’re actually writing code with the language.
Pay attention. Go back and reread paragraphs. Get through the stories as quickly as possible. You’ve got a lot to learn. No matter how learned you become, you can always learn more. Keep working on improving yourself. Look at each language from a variety of perspectives. Investigate how they all work together.
You’re going to have to get Python, PostgreSQL and Nginx installed globally. Install the latest version of Python using apt. You can install it from source, but I usually just use apt. You’ve also got to install the Python package manager, pip.
Keep in mind that these commands work in my KDE Neon laptop. KDE Neon is based on Ubuntu 18.04 LTS. You may have to adjust them to work properly in your computer.
Start with:
$ sudo apt update
…
Check the Python download page for the latest edition and then use the command:
$ sudo apt install python3.7 python3-pip
…
You’ve got to prepare your computer to install PostgreSQL by importing the GPG key for PostgreSQL packages.
$ sudo apt-get install wget ca-certificates
$ wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add –
…
Add the repository with
$ sudo sh -c ‘echo “deb http://apt.postgresql.org/pub/repos/apt/ lsb_release -cs
-pgdg main” >> /etc/apt/sources.list.d/pgdg.list’
…
Then install PostgreSQL
$ sudo apt install postgresql postgresql-contrib
…
Use
$ sudo apt install nginx
…
After installing Nginx, I had to use
$ sudo /etc/init.d/apache2 stop
…
to make port 80 available on my KDE Neon machine.
Get the command for installing the latest official version of Django from the official Django home page. And then
$ pip install Django==2.2.1
…
Install PHP using
$ sudo apt install php
…
Now I’ve got to figure out how to get PHP to use nginx instead of apache2. …
cd into /etc/nginx . Look at your sites-available and your sites-enabled files. Copy and back up your sites-enabled file. Then
$ sudo rm sites-enabled/default $ sudo cp sites-available/default sites-available/my-default $ sudo ln -s /etc/nginx/sites-available/my-default sites-enabled/default
…
I’m not 100% sure that fixed the problem, but hopefully PHP will recognize Nginx when I start using them. I’ve recorded this process so I can retrace my steps if I need to.
Getting Python, PostgreSQL and Nginx all set up to work together is a complex project. I have them all installed. I’m pretty sure each one is working fine. I also installed PHP. Now, I need to configure them all to work together.
I’m making progress and I have a lot of progress to make.
Set your system up so that you can spin up a Django or Drupal site when ever you want to start a new project. You can do WordPress or SquareSpace as well.
The important objective of this project is to get it set up so that you can work on your website on your local environment and then git-push your changes up to your live website on your commercial server using SSH.
Use a commercial website host for your live website, to make sure it is always available for your audience. Get your site secured with HTTPS.
You will primarily be editing your HTML, CSS and JavaScript in your local environment. You’ll edit your content in the website editor.
Write your stories using your favorite text editor. and then post them into your website editor. Edit the theme, the structure and the look and feel of your website in your local environment. Be an artist. Create beautiful entertaining education. Add value to our one universal commonwealth.