MPOS - ranchimall/stratum-mining GitHub Wiki
- Ubuntu version:
Ubuntu 18.04.5 LTS
Update your server:
sudo apt-get update
sudo apt-get dist-upgrade
- Apache version:
Apache/2.4.29 (Ubuntu)
Install the folowing dependencies
sudo apt-get install git
sudo apt-get install build-essential libcurl4-openssl-dev libdb5.3-dev libdb5.3++-dev mysql-server
sudo apt-get install memcached php7.0-memcached php7.0-mysqlnd php7.0-curl php7.0-json php7.0-curl libapache2-mod-php7.0
sudo apt-get install php-mbstring php7.0-mbstring php7.0-xml
sudo apache2ctl -k stop; sleep 2; sudo apache2ctl -k start
Note: php5 can also be used instead of php7.0 if needed.
Open localhost
in browser and check if apache home page is displayed.
Move into the default webroot of Ubuntu
cd /var/www
Fetch the latest version of MPOS
:
sudo git clone git://github.com/MPOS/php-mpos.git MPOS
Change the folder permission
sudo chmod -R 777 MPOS
(optional) If required, ownership of the folder can also be changed to user
sudo chown -R <user> MPOS
Install MPOS
cd MPOS
sudo git checkout master
php composer.phar install
Note: Skip this step if its already done while installing stratum-mining
- MySQL version:
mysql Ver 14.14 Distrib 5.7.34
Install mySQL
sudo apt-get install mysql-server
If the secure installation does not launch automatically after the installation completes, enter the following command:
sudo mysql_secure_installation
This utility prompts you to define the mysql root password and other security-related options, including removing remote access to the root user and setting the root password. Create a database from the template
cd ~
sudo mysql -p -e "create database mpos"
sudo mysql -p mpos < sql/base_structure.sql
Recommended (optional) Create and use a SQL user instead of root. Remember to give access to the database to the user.
Change templates folder permission to www-data
sudo chown -R www-data templates/compile templates/cache logs
We need to configure the project to work on our newly installed server:
sudo cp include/config/global.inc.dist.php include/config/global.inc.php
Now edit the configuration file and adjust the settings to match your database and cryptocoin RPC Client:
$config['db']['host'] = 'localhost';
$config['db']['user'] = 'root';
$config['db']['pass'] = 'root';
$config['db']['port'] = 3306;
$config['db']['name'] = 'mpos';
[...]
$config['wallet']['type'] = 'http';
$config['wallet']['host'] = 'localhost:19334';
$config['wallet']['username'] = 'testnet';
$config['wallet']['password'] = 'testnet';
[...]
$config['gettingstarted']['stratumurl'] = 'localhost';
You will also need to set up a proper, random! $config['SALT']
and another $config['SALTY']
secret! If you forgot that, you will get an error message after installing MPOS: You absolutely SHOULD NOT leave your SALT or SALTY default changing them will require registering again. SALT and SALTY must be a minimum of 24 characters or you will get an error message: 'SALT or SALTY is too short, they should be more than 24 characters and changing them will require users to register again.
Edit any other configurations as required in the config file.
To allow your site to send messages you need to set up the mail server.
sudo apt-get install postfix
Accept internet server
and keep the defaults. This will set up Postfix.
Change the default email id [email protected]
in the following files:
include/config/admin_settings.inc.php
include/classes/mail.class.php
In /etc/apache2/sites-available/000-default.conf
change the ServerName
and DocumentRoot
value as
ServerName <www.example.com>
DocumentRoot /var/www/MPOS/public/
If you are using Nginx and changing the port for apache, then change the http port in the following files:
include/classes/user.class.php: line 668
include/pages/login.inc.php: line 35
include/pages/account/reset_failed.inc.php: line 7
Note: For Nginx ServerName
is not required in the apache site conf file above.
Open the website in a browser and MPOS homepage should be displayed.
For Miners, The quickstart guide can be found here.