Your Own Server: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
 
(4 intermediate revisions by the same user not shown)
Line 83: Line 83:
I will first mention 3 possible web servers than can run on a Microsoft Windows personal computer (or server box):
I will first mention 3 possible web servers than can run on a Microsoft Windows personal computer (or server box):
#You might choose '''Apache 2''' as it is probably the most comprehensive, so if you have enough space on your PC, install it following instructions at the official site [https://httpd.apache.org/download.cgi] (or one of many other web sites that give instructions for installing apache2 on Microsoft Windows).
#You might choose '''Apache 2''' as it is probably the most comprehensive, so if you have enough space on your PC, install it following instructions at the official site [https://httpd.apache.org/download.cgi] (or one of many other web sites that give instructions for installing apache2 on Microsoft Windows).
#You might choose ‘’’Uniform Server’’’, which is extremely simple as it comes as a package including PHP script, and MariaSQL database in one package from [http://www.uniformserver.com/], although you may need to update to a newer release of PHP from [https://windows.php.net/download/] and a newer phpMyAdmin from [https://www.phpmyadmin.net/downloads/] as Uniform Server tends to issue upgrades very rarely.
#You might choose ‘’’Uniform Server’’’, which is extremely simple as it comes as a package including PHP script, and MariaDB database in one package from [http://www.uniformserver.com/], although you may need to update to a newer release of PHP from [https://windows.php.net/download/] and a newer phpMyAdmin from [https://www.phpmyadmin.net/downloads/] as Uniform Server tends to issue upgrades very rarely.
#You might choose to install the Abyss web server from [aprelium.com]
#You might choose to install the Abyss web server from [aprelium.com]


Line 188: Line 188:




=== Install Maria database ===
=== Install MariaDB database ===


MySQL database software is controlled by Oracle and not made available for inclusion in Raspberry Pi repository.
MySQL database software is controlled by Oracle and not made available for inclusion in Raspberry Pi repository.


MariaSQL is an alternative that has largely similar command syntax so is likely to work with code (like MX) designed to work with MySQL. Since the MX developer (Mark Crossley) actually uses Maria DB, we can have plenty of confidence it is suitable.  
MariaDB is an alternative that has largely similar command syntax so is likely to work with code (like MX) designed to work with MySQL. Since the MX developer (Mark Crossley) actually uses MariaDB, we can have plenty of confidence it is suitable.  


To install this database server, we type <code>sudo apt install mariadb-server php-mysql -y</code>.
To install this database server, we type <code>sudo apt install mariadb-server php-mysql -y</code>.
Line 214: Line 214:
===Getting web and database servers ready for use===
===Getting web and database servers ready for use===


We need to create a user for PhpMyAdmin (or adMiner or whatever) to access our database and another for Cumulus to use to access the database tables. At the moment our database access has the single '''root@localhost''' user we created when we installed MariaDB.  The initial password was set then, and we need to use it to get access to MariDB monitor where we can insert some SQL commands to create these two users.  
We need to create a user for PhpMyAdmin (or adMiner or whatever) to access our database and another for Cumulus to use to access the database tables. At the moment our database access has the single '''root@localhost''' user we created when we installed MariaDB.  The initial password was set then, and we need to use it to get access to MariaDB monitor where we can insert some SQL commands to create these two users.  


Most tools, like PhpMyAdmin, on first start up will ask for username (here I choose "admin") and password, thereafter the tool should use same log-in (by default you see log-in screen each time you restart or if it is left idle for a long time), let us create a user called 'admin' for it.  
Most tools, like PhpMyAdmin, on first start up will ask for username (here I choose "admin") and password, thereafter the tool should use same log-in (by default you see log-in screen each time you restart or if it is left idle for a long time), let us create a user called 'admin' for it.  
Line 234: Line 234:


As I type this, Cumulus MX has no exception handling if the username and password defined in the settings do not exist in the database, therefore in this situation it will crash out (with message press Enter to close).
As I type this, Cumulus MX has no exception handling if the username and password defined in the settings do not exist in the database, therefore in this situation it will crash out (with message press Enter to close).


=== Installing Adminer, or PhpMyAdmin ===
=== Installing Adminer, or PhpMyAdmin ===
Line 330: Line 329:
=== Restarting Web Server ===
=== Restarting Web Server ===


After all these installs, we need to restart your web server (so it loads the PHP and MariaDB), if you have installed apache 2 do this by typing <code>sudo service apache2 restart</code> or  (if we just want the Apache configuration reloaded) by typing <code>sudo systemctl reload apache2</code>.  Similar commands apply for other web servers.
After all these installs, we need to restart your web server (so it loads the PHP and MariaDB), if you have installed apache 2 do this by typing <code>sudo systemctl restart apache2</code> or  (if we just want the Apache configuration reloaded) by typing <code>sudo systemctl reload apache2</code>.  Similar commands apply for other web servers.


We will need to restart Apache (or whichever web server we installed) any time we change our php.ini files, database passwords, and anything else that is checked when the web server starts.
We will need to restart Apache (or whichever web server we installed) any time we change our php.ini files, database passwords, and anything else that is checked when the web server starts.

Navigation menu