stack

5 februari 2018

http://www.socialcoin.nl/wp-content/uploads/2017/12/CJ-Socialcoins-05.pdf

 

chain-on-raspberry-pi

https://www.multichain.com/qa/6276/how-build-multichain-for-raspberry-any-build-instructions|buildinstructions]]

I’m trying to build multichain for Raspberry PI. I’m looking for any documentation or build instructions on the same. If anyone tried this? please suggest. I have built multichain on ubuntu 12.04 machine and now trying to cross compile for Raspberry Pi.
i have successfully compiled and run MultiChain on Raspberry/openSuse 64 bits:

- https://en.opensuse.org/HCL:Raspberry_Pi3
  openSUSE-Leap42.2-ARM-**X11**-raspberrypi3.aarch64-2017.02.02-Build1.101.raw	stable
- compile instructions:

zypper in -t pattern devel_C_C++
zypper in libdb-4_8-devel
zypper in libopenssl-devel

wget https://github.com/MultiChain/multichain/archive/master.zip
unzip master.zip

free
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free
sudo make install


./autogen.sh
./configure
make

Compilation take some time, so be ready to wait for it.
This was on 17-9-2017 , so may be it is still compiling or not πŸ™‚
have a lot of fun
Peter Bosch
pi@pi2B ~ $ wget https://github.com/MultiChain/multichain/archive/master.zip

Install Apache2 With PHP5 And MySQL (LAMP) WordPress On Linux openSUSE leap 42.2

LAMP stands for Linux, Apache,MySQL and PHP, of course Linux can be any variant (Debian/Redhat), here is the small tutorial about installing AMP stack on openSUSE 13.2., MySQL is replaced by MariaDB as a default database.

youtube WordPress on openSUSE-Leap42.2-ARM-X11

install-wordpress-on-opensuse-13-2-with-lamp

configuratie
D:/raspberry/suse/openSUSE-Leap42.2-ARM-X11-raspberrypi3.aarch64-2017.02.02-Build1.101.raw
zypper update
zypper dist-upgrade
ssh-keygen -R 192.168.2.65
ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.2.65
ssh root@192.168.2.65
zypper in nano
hostnamectl set-hostname suse65
zypper in apache2
zypper in php7 php7-mysql apache2-mod_php7 php7-zlib
zypper install mysql

crontab

env EDITOR=nano crontab -e
# m h  dom mon dow   command
# β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0 - 59)
# β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ hour (0 - 23)
# β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of month (1 - 31)
# β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ month (1 - 12)
# β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of week (0 - 6) (Sunday to Saturday;
# β”‚ β”‚ β”‚ β”‚ β”‚                                       7 is also Sunday on some systems)
# β”‚ β”‚ β”‚ β”‚ β”‚
# β”‚ β”‚ β”‚ β”‚ β”‚
# * * * * *  command to execute
  15 * * * *  rsync -avz -e ssh pi@192.168.2.20:/var/www/*.jpg /var/www
#1 0 * * * . /home/pi/bash/daily.bsh
MAILTO=""
#0 0 * * * sudo mount -a
#1 0 * * * . /media/sambashare/usb1_1/raspberry/bash/daily.bsh
#0 5 * * 1 . /home/pi/get_dokuwiki.bsh
#15 * * * *  . /home/pi/bash/camera.sh
1 0 * * * rsync -avz -e ssh pi@192.168.2.66:/var/www/html/my/dokuwiki/ /var/www/html/my/dokuwiki

apache2

linux:~ # cd /srv/www/
linux:/srv/www # cd htdocs/
linux:/srv/www/htdocs # nano index.html

/srv/www/htdocs/site/index.html

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Mijn eerste JavaScript</title>
<script>
        alert('Hello World');
</script>
</head>

<body>
<div id="mijnDiv"></div>



</body>
</html>
linux:/srv/www/htdocs # systemctl start apache2
To make the apache to start during the every boot, type the following on terminal and hit enter.
suse65:/srv/www/htdocs/site # systemctl enable apache2.service
Created symlink from /etc/systemd/system/httpd.service to /usr/lib/systemd/system/apache2.service.
Created symlink from /etc/systemd/system/apache.service to /usr/lib/systemd/system/apache2.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/apache2.service to /usr/lib/systemd/system/apache2.service.

linux:/srv/www/htdocs # systemctl enable apache2
Created symlink from /etc/systemd/system/httpd.service to /usr/lib/systemd/system/apache2.service.
Created symlink from /etc/systemd/system/apache.service to /usr/lib/systemd/system/apache2.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/apache2.service to /usr/lib/systemd/system/apache2.service.

|systemctl restart apache2|
rsync -avz -e ssh pi@192.168.2.66:/var/www/html/my/dokuwiki/ /srv/www/htdocs/site/dokuwiki
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Mijn eerste JavaScript</title>
<script>
        alert('Hello World');
</script>
</head>

<body>
<div id="mijnDiv"></div>

</body>
</html>
suse65:/var/log/apache2 # tail error_log

php7

zypper in php7 php7-mysql apache2-mod_php7 php7-zlib php7-curl php7-zip php7-pdo php7-tidy php7-snmp php7-pear php7-opcache php7-iconv php7-iconv php7-gmp php7-soap php7-sqllite php7-json php7-pgsql php7-gettext php7-zlib php7-zip php7-mysql php7-mcrypt php7-ldap php7-intl php7-imap php7-gd php7-fgm php7-devel php7-dba php7-bz2 php7-bcmatch

LETOP !Β suse65:/var/log/apache2 # zypper in php7-zlib

a2enmod php7

systemctl restart apache2

/srv/www/htdocs/site/phpinfo.php

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

mysql

zypper install mysql
var/adm/update-messages/mariadb-0.0.32-0.10.1)

You just installed MySQL server for the first time.

You can start it using:
 rcmysql start
 rcmysql start
linux:~ # systemctl enable mysql
Created symlink from /etc/systemd/system/multi-user.target.wants/mysql.service to /usr/lib/systemd/system/mysql.service.

During first start empty database will be created for your automatically.

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h <hostname> password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
 rcmysql start 
linux:~ # /usr/bin/mysqladmin -u root password linux
linux:~ # mysql --user=root --password=linux
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.0.32-MariaDB SLE 12 SP1 package

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
YEAH
log suse65:/var/log/mysql # tail mysqld.log

finally Install WordPress

-wordpress-on-opensuseΒ youtube_wordpress-on-opensuse-42-2Β WordPress is the most widely used open source web blogging and content management software written in php and MySQL.

mysql -u root -p
CREATE DATABASE SocialCoinChain;
CREATE USER ‘peter_bosch’@’localhost’ IDENTIFIED BY ‘new-password’;
GRANT ALL ON SocialCoinChain.* TO ‘peter_bosch’@’localhost’;
FLUSH PRIVILEGES;

​|EXIT;|

linux:~ # mysql --user=root --password=linux
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.0.32-MariaDB SLE 12 SP1 package

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE SocialCoinChain;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> CREATE USER 'peter'@'localhost' IDENTIFIED BY 'new-password';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL ON SocialCoinChain.* TO 'peter'@'localhost';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> ​EXIT;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '​EXIT' at line 1
MariaDB [(none)]> exit
Bye
wget http://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
mv wordpress/* /srv/www/htdocs
chown -R wwwrun /srv/www/htdocs

truckje optioneel

|cp /srv/www/htdocs/wp-config-sample.php /srv/www/htdocs/wp-config.php|
|<del>nano /srv/www/htdocs/wp-config.php</del>|


// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'peter_bosch');

/** MySQL database password */
define('DB_PASSWORD', 'new-password');

/** MySQL hostname */
define('DB_HOST', '127.0.0.1');

Open your browser and visitΒ http://192.168.2.65/.

http://86.86.102.241/

http://86.86.102.241/wp-admin/install.phpΒ define(‘DB_HOST’, ‘127.0.0.1’); dat weer wel

|systemctl status mysql.service|


linux:/var/log/apache2 # tail -20 error_log

[Fri Feb 02 22:04:41.474741 2018] [:error] [pid 1517] [client 192.168.2.30:54642] PHP Fatal error:  Uncaught Error: Call to undefined function gzinflate() in /srv/www/htdocs/wp-includes/class-requests.php:947\nStack trace:\n#0 /srv/www/htdocs/wp-includes/class-requests.php(886): Requests::compatible_gzinflate('\\xB5\\x9D\\xEBs\\x9BJ\\xB2\\xC0\\xFF\\x15\\xCA\\x9F\\xCEV\\xE5...')\n#1 /srv/www/htdocs/wp-includes/class-requests.php(835): Requests::compatible_gzinflate('\\x1F\\x8B\\x08\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\xB5\\x9D\\xEBs\\x9B...')\n#2 /srv/www/htdocs/wp-includes/class-requests.php(675): Requests::decompress('\\x1F\\x8B\\x08\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\xB5\\x9D\\xEBs\\x9B...')\n#3 /srv/www/htdocs/wp-includes/class-requests.php(383): Requests::parse_response(Array, 'http://api.word...', Array, Array, Array)\n#4 /srv/www/htdocs/wp-includes/class-http.php(370): Requests::request('http://api.word...', Array, Array, 'POST', Array)\n#5 /srv/www/htdocs/wp-includes/class-http.php(589): WP_Http->request('http://api.word...', Array)\n#6 /srv/www/htdocs/wp-includes/http.php(187): WP_Http->post('http://api.word...', Array)\n#7 /srv/www/htdocs/wp-admi in /srv/www/htdocs/wp-includes/class-requests.php on line 947

It must be installed separately by downloading the php-mysql RPM. 

WordPress config

-no-working-transports-found-error

Loaded Configuration File/etc/php7/apache2/php.ini ;extension=php_openssl.dll

youtube no-working-transports-found-error

wp could not resolve host

multichain-web-demo-master

suse64:~ # multichaind chain1 -daemon

MultiChain Core Daemon build 1.0 beta 2 protocol 10008

MultiChain server starting
Other nodes can connect to this node using:
multichaind chain1@192.168.2.64:4795

Node started

 

suse64:~ # netstat -ant | grep LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:4794 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:4795 0.0.0.0:* LISTEN
tcp 0 0 :::3306 :::* LISTEN
tcp 0 0 :::80 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
tcp 0 0 ::1:25 :::* LISTEN
tcp 0 0 ::1:4794 :::* LISTEN
tcp 0 0 :::4795 :::* LISTEN