Aspiring developers – start here

bjorn-karlsson

Getting started with Cortex City development is easy. But before you can do that, you need some basic infrastructure in place. Today I’ll help you set up that infrastructure on your local computer.

In 10-20 minutes you’ll have a basic but complete system up and running, including the following:

  • Apache (superb web server)
  • MySql (powerful database)
  • WordPress (wonderful website content management system)
  • PHP (easy-to-learn programming language, perfect for web development)

That’s the bare bone setup you will need to get started with Cortex City development. Or, you could use the setup to develop any kind of website, blog, online store, or even a line of business cloud application!

For those of you who are really new to this world, let me just quickly explain what these things actually do and how they relate to each other.


 

apache-logo

Apache is the world’s most widely used web server, and that essentially means it’s the software that delivers web pages to web browsers.

When you go to your favorite website, your web browser talks to the web server, which returns the web pages that you view and interact with.

Amazingly, the Apache web server it absolute free. It costs us nothing, yet delivers superb value.  

mysql-logo

MySQL is something called a relational database management system, typically abbreviated RDBMS. Most people don’t say that; they say it’s a database. Although incorrect, it’s close enough for our purposes.

What you need to know is that it’s a place where structured data can be stored and retrieved efficiently. It’s used by WordPress, which we’ll talk about next, to store things like users, blog posts, web pages, and so forth.

Many developers never need to understand the details of databases, but everyone needs to understand the basics.

Amazingly, MySQL is absolutely free. It costs us nothing, yet delivers superb value.

wordpress-logo

WordPress is the world’s most widely used web content management system. What’s that? It’s software that works in combination with a web server to deliver content to web browsers and other online systems.

Instead of manually coding web pages and back-end code for pages, blog posts, image galleries, or layouts, we let WordPress take care of the technicalities, leaving us to focus on content. It is a versatile tool that is used for blogs as well as corporate websites, and it really takes the pain and complexity out of publishing on the web.

Amazingly, WordPress is absolutely free. It costs us nothing, yet delivers superb value.

php-logo

PHP, which is a recursive acronym (don’t worry, computer scientists and general super-geeks invent such things for the fun of it), stands for PHP: Hypertext Preprocessor. It’s a programming language that has its origin in scripting, which is also programming but doesn’t sound as intimidating.

You use a programming language to develop any application imaginable. WordPress is built with PHP. And extensions to WordPress are usually programmed with PHP. Including the Cortex City WordPress plugin.

Although we are free to use any programming language in Cortex City development, our choice of WordPress for back-end purposes means that we need to know at least some PHP.

Amazingly, PHP is absolutely free. Is costs us nothing, yet delivers super value.

The technology we need to install are used by millions of people, so there are some great tools available. We’ll use those to get started in record time. Here’s what you need to do.


 

Install XAMPP

XAMPP is a complete web server solution, including a web server, a database system, and programming languages. That’s three of the four things we need in one go. As you’ll soon see, we’ll get the fourth one for free.

XAMPP-Logo

  • Download XAMPP from Apache Friends, here.
  • Click the downloaded file to start the installation.
  • Say “Yes” and “OK” to all the questions asked by the installation program. (If you know what you’re doing, feel free to operate differently, but if you’re new to this, my advice is to go with all default settings.)
  • The installation fires up a web page at bitnami, where you can choose to download WordPress. Go ahead and click the download button. (To go the the web page manually, follow this link, then select “local install”.
  • When the installation is done, the XAMPP control panel will be started.
    XMPP-control-panel
  • Go ahead and start Apache and MySQL – just click the Start buttons.
    XAMPP-control-panel-services-running
  • Almost there — we now have a complete web server stack up and running!
wordpress-logo

By now the wordpress installer should be downloaded, so go ahead and start that application (at the time of this writing, the file name is bitnami-wordpress-4.2.1-0-module-windows-installer)

  • Again, click “yes” and “OK” whenever you can. There are a couple of configuration screens where you need to enter information, see below.
  • The admin account needs to be configured. I suggest that you use the same account name that you already have in Cortex City, just to make it easy to remember. You don’t need to fill in a password for MySQL, we’re running with the defaults so it’s not password-protected. The application password is the one you’ll use later on for logging in to WordPress. If you can’t think of a password right now, I suggest you use “secret”.
    bitnami-wordpress-admin-setup
  • You’ll also need to give a name to the WordPress installation. On my machine I use “Cortex City Local Dev”. That way I’ll always be able to see if I’m working with the local installation or the live site!
    bitnami-wordpress-blogname-setup
  • When asked about SMTP settings, I think you should just skip it for now. We can always go back and set it up later. If you want to, it’s possible to use a Gmail account here — but don’t use your personal one because the password will not be protected.
    bitnami-wordpress-SMTP-setup
  • Almost there…just one screen left on the installation. All you need to do is click “Finish”
    bitnami-wordpress-setup-done

You’ll now be presented with the home page of your local WordPress installation, as promised, we are up and running in just a few minutes!

wordpress-after-installation

 

Before leaving you to play with your new toy — which incidentally is the most widely used web setup on the Internet — we’ll update your WordPress installation so you have all the latest versions of plugins and themes.

  • In your web browser that is showing your WordPress site, enter the address “http://127.0.0.1/wordpress/wp-admin”
  • You’ll be presented with a login form
    wordpress-admin
  • Use the credentials from the WordPress setup a few minutes ago (where I had the user “mayor”, and you probably have the password “secret”…

You’re now in the administration part of your WordPress site, and you’ll see that there are a number of updates available. Select Updates, and click the checkbox to select all available updates, then click Update Plugins. After a minute or so, it’s done.

wordpress-update-all-plugins

 


 

That’s it! A complete web server stack, and the world’s most popular web site content management system. Mission accomplished.

Start playing around with it, and stay tuned for more information. The next steps will involve getting the basic set of plugins and themes for WordPress, the source code for Cortex City, and then we can get serious.

If you want to learn more about WordPress — and I hope you do — visit WordPress.org and start from there.

Let me know if you have any problems following these instructions. Just post a comment and ask for help, and we’ll try to get you back on track.

Thank you for reading,
Bjorn “The Mayor” Karlsson

 

Posted in Cortex City
Tags: , , ,
2 comments on “Aspiring developers – start here
  1. Imre says:

    Nice one Björn. Here are a few more tips about what you could do if you wish to publish your website and make it more secure too. You might want to consider:
    Deploying your webserver as a Virtual machine is more practicle, easier to take down, backup restart etc.

    Virtualbox is free and lets you run a Linux server or distro like ubuntu.
    ubuntu is also free and more secure than a Windows machine and there are abundance of resuorces online about configuring ubuntu/Linux as a secure webserver). Check out this guide for the Top 10 Linux Server distros .

    Check out the FAQ to learn more about ubuntu

    Using ubuntu server will allow you to automatically install Apache, MySQL and PHP (LAMP).

    To securely publishing your website:

    Use your router to forward incoming traffic from TCP port 80 to your web server.

    Use dynamic DNS if your ISP does not provide static IP adresses. This will provide redirection to your webserver even if your IP adress changes. .

    A list of DDNS providers can be found here .

    To stop sending information to potential hackers about the webserver for error pages like “404 Not found”, check out this guide.

    Make your site less voulnerable to DDOS attacks by limiting the size of file uplads and header annd body requests timouts to prevent attackers slowing down system resources. Check out http://httpd.apache.org/docs/trunk/misc/security_tips.html

    Secure remote access with SSH key authentication using this guide.

    Secure against brute force attacks by limiting the number of logons a user tries to make using a TCP wrapper like DenyHosts.

    • Bjorn Bjorn says:

      Thank you Imre, seems like some solid advice. The steps I described in the article are for a sandbox environment only — you need to lock it down before going live, as you suggest.

      One thought…if you want people to think more about the importance of security, why not write an article about it? People here love to read! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

*