Login to your pi pi ssh using Putty. First update all the packages.
sudo apt-get update
& sudo apt-get upgrade
Become root sudo su
Then install Apache, PHP, MySQL in and phpMyAdmin order to be able to run OSPOS.
sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server php-pear php5-mysql phpmyadmin apache2-utils php5-gd php5-intl -y
Add the user name and password for MySQL and phpMyAdmin.
Configure Date and Time according to your location for the server to run correctly.
-
sudo dpkg-reconfigure tzdata
Select your time Zone Modify the PHP files for the Time zone. -
goto
nano /etc/php5/cli/php.ini
and find "Date" by scrolling down or by Ctrl+W and remove ; from the line and modify like thisdate.timezone = Asia/Kolkata
. -
goto
nano /etc/php5/apache2/php.ini
and find "Date" by scrolling down or by Ctrl+W and remove ; from the line and modify like thisdate.timezone = Asia/Kolkata
. -
Modify Apache 2 for the PHPMYADMIN. goto
nano /etc/apache2/apache2.conf
and Add the next code to the bottom of the lineInclude /etc/phpmyadmin/apache.conf
. -
restart Apache and check if it's working correctly
/etc/init.d/apache2 restart
.
-
Download OSPOS
git clone https://github.com/jekkos/opensourcepos
. -
Rename PHP file
cp -r opensourcepos/application/config/database.php.tmpl opensourcepos/application/config/database.php
.
3.Modify application/config/database.php to connect to your database.
nano opensourcepos/application/config/database.php
.
go to the bottom of the file and modify this to your database
$db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '12345678', 'database' => 'opensourcepos',
- Copy This Files to apache.
cp -r opensourcepos /var/www/html
- Change the permissions
chmod -Rv 755 cache* /var/www/html/opensourcepos
. - Restart Apache
/etc/init.d/apache2 restart
.
Please do not use a Web Browser with a lot of addons as it can create problems with OSPOS. Install Firefox if you are using Chrome with a lot of addons.
- Download the Source form
https://github.com/jekkos/opensourcepos
. - Go to your PI's ip address e.g
http://192.168.3.116/phpmyadmin
. - Create a database name as above saved in configuration file.
- As it's a local installation, to improve performance set in
application/config/config.php
$config['ospos_xss_clean'] = FALSE;
- Please note that this will disable the Cross Site Scripting protection, but assuming it's a standalone installation you should not suffer this issue but please consider carefully this point before proceeding - - Select that Database and Click import and select the database file from previously downloaded file.
- After successfully importing the database login to OSPOS.
- Restart apache
/etc/init.d/apache2 restart
- Go to your PI's ip address e.g
http://192.168.3.116/opensourcepos
. - Enjoy!!!.
Although Apache and MySQL are popular choices, on Raspberry PI alternatives could be considered like Nginx + PHP-FPM + MariaDB on Arch Linux. Here how to.
Some background article that explains how to install a LEMP stack, and another one here. If you succeed in this alternative installation please let us know the full instructions that we update this wiki page.
See this wiki page for an installation guide on Ubuntu 16.04.