TooBasic: Installation
Requirements
To be able to install TooBasic you at least need:
We also recommend to install some of this tools depending on what kind of site you are going to build.
- Memcache or Memcached server
- and their PHP libraries.
- MariaDB or MySQL
- and MySQL libraries for PHP.
- perhaps phpMyAdmin too.
- SQLite 3
- and its PHP libraries.
- PostgreSQL
- and its PHP libraries.
Linux preconditions
If you are using a standard Linux installation you'll
have to make sure of installing our required packages using apt, rpm, yum or
whatever packages manager you use.
After that you'll probably end up with a default root directory at
/var/www/html with a simple index file.
Checks
Once you've installed everything make sure that php is included in your PATH
settings.
Try running something like which php in a console and if you are ok it will
return a full path otherwise you'll have to use its full path all the time or
change your PATH settings.
Do the same check with Git running which git.
Microsoft windows
Installing PHP and others
If you are using a Windows installation, we recommend you to use XAMPP to save you from more than one headache. Such package holds many of our requirements and it's really easy to install.
Supposing that you installed it at C:\xampp you'll have a directory at C:\xampp\htdocs that will be your root directory.
Installing Git
To install Git you may visit this link and follow the instructions.
Checks
Make sure that php.exe is included in your PATH settings.
Try running something like where php.exe in a command window (cmd) and if you
are ok it will return a full path otherwise you'll have to use its full path all
the time or change your PATH settings.
Following our suppositions, php should be at C:\xampp\php\php.exe.
Do the same check with Git running where git
Installing TooBasic
Here we suppose that:
- you've read the above topics
phpandgitare available in your PATH settings, otherwise you know how to invoke them.- You known where is you default root directory and we are going to refer to it as ROOTDIR from now on.
Step 1: location
Open a terminal and go to your ROOTDIR directory and inside it create a new folder, for example, one called mysite; then go into this new folder. Generally speaking, do something like this (Linux example):
$ cd /var/www/html
$ mkdir mysite
$ cd mysite
If you prefer you can remove all contents inside your ROOTDIR directory and perform the installation there, but for this guide we are going to use a sub-folder.
Step 2: basic installation
After you created your site directory and you are in it, you may clone TooBasic by running something like this:
$ git clone https://github.com/daemonraco/toobasic.git .
This may take some time depending on your connection.
Step 3: git submodules
The last instalation step will be to download some required submodules, in this case Smarty. But don't worry, just run these two commands and wait until they finish (the second one takes some time):
$ git submodule init
$ git submodule update
Final check
If there were no errors, you should have a working page that you can access at:
Post installation
After you installed TooBasic you may find some known issues that you can solve as we explain below.
Linux
After installing under a standard Linux environment you may find some permission issues. A simple but not so polite way to solve this would be:
$ sudo chmod -v 0777 /var/www/html/mysite/cache
$ cd /var/www/html/mysite/cache
$ sudo find . -type d | xargs sudo chmod -v 0777
$ sudo find . -type f | xargs sudo rm -v
$ git checkout .
This will give access to everyone to some dynamic directories and restart any file that can cause an issue. The final line is to avoid Git conflicts.
Versions
By default, cloning from Github installs the master
branch which is our newest but stable branch, let say our closed for testing
branch.
If you prefer, you can use a more stable version switching to our branch v1.0.0
or if you like the danger, switch to our development branch dev.
Suggestions
Here you have a few links you may want to visit: