Docker and RaspberryPi 2017 - Docker NodeJS MariaDB
I download and install the latest version.
Install Docker
>curl -s https://packagecloud.io/install/repositories/Hypriot/Schatzkiste/script.deb.sh | sudo bash
>sudo apt-get install docker-hypriot=1.11.1-1
This does not work.
Find the deb package from here https://blog.hypriot.com/downloads/
download and have this file on raspberryPi docker-hypriot_1.11.1-1_armhf.deb
>sudo dpkg -i docker-hypriot_1.11.1-1_armhf.deb
>sudo usermod -aG docker carl
>sudo systemctl enable docker.service
Install NodeJS on RaspberryPi
My current raspberryPi is the old one I think. It is v6.
uname -a
Linux raspberrypi2 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l GNU/Linux
wget https://nodejs.org/dist/v8.5.0/node-v8.5.0-linux-armv6l.tar.gz
Directly unzip the file and add it the class path.
>node --version && npm --version
v8.5.0
5.3.0
>python -V
Python 2.7.13
Install MySQL Database
>sudo apt-get install mysql-server
>sudo apt-get install mysql-client
I do not know the root password, I try to reset that.
>sudo service mysql stop
>sudo mysqld_safe --skip-grant-tables
>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0
>use mysql;
>update user set authentication_string=password(‘xxxxxx') where user='root';
>sudo service mysql start
Not working, try again
>mysql --version
mysql Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
>sudo systemctl stop mariadb
>mysql -u root
>use mysql
>update user set password=password('kaishi') where user = 'root';
>FLUSH PRIVILEGES;
Kill the old services and start the new one
>sudo systemctl start mariadb
This one Worked
http://ikasten.io/2017/01/08/whats-the-default-password-of-root-user-in-mariadb/
> sudo mysql_secure_installation
>sudo mysql -u root
>create database pricemonitor;
>GRANT ALL ON pricemonitor.* TO pricemonitor@localhost IDENTIFIED BY ‘xxxxxx';
Then this works
>mysql -u pricemonitor -h localhost -p
Local login is fine, set up remote login
https://mariadb.com/kb/en/library/configuring-mariadb-for-remote-client-access/
>sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf
#bind-address 127.0.0.1
Stop the DB
>sudo systemctl stop mariadb
Start the DB
>sudo systemctl start mariadb
References:
https://blog.hypriot.com/downloads/
http://raspberrywebserver.com/sql-databases/using-mysql-on-a-raspberry-pi.html
https://stackoverflow.com/questions/10895163/how-to-find-out-the-mysql-root-password
https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password
分享到:
相关推荐
docker-raspberry-pi-cross-compiler, 在 Docker 容器中,树莓派 交叉编译器和 sysroot Docker 容器中的 树莓派 交叉编译器树莓派的easy-to-use all-in-one交叉编译器。项目可以作为 sdthirlwall/raspberry-pi-cross...
docker-arm_20.10.6 资源
docker-compose-linux-x86-64-2.3.3
docker-compose 创建并运行 docker-compose up -d 停止docker docker-compose stop 删除docker docker-compose rm --all
docker-compose-Linux-x86-64
"Docker-compose-nodejs-haproxy-源码.rar" 提示我们这个压缩包文件包含了使用 Docker Compose 配置的 Node.js 应用程序与 HAProxy 的源代码。Docker Compose 是一个工具,用于定义和运行多容器的 Docker 应用。Node...
docker-compose-linux-x86_64
docker-ce-rootless-extras-20.10.14-3.el8.x86_64.rpm
docker-compose压缩包,将下载的docker-compose文件放到`/usr/local/bin`目录下 ```shell cd /usr/local/bin #进入上述目录,对文件重命名,然后赋予执行权限 mv docker-compose-Linux-x86_64 docker-compose sudo ...
最新版本的docker client for windows, 方便VSCODE使用,通过配置DOCK TCP HOST啥的连接docker 实例。 docker --version Docker version 20.10.17, build 100c701 ...docker-compose version 1.29.2, build 5becea4c
docker-compose v2.17.2
docker-mariadb-backup 该容器可用于定期备份MySQL,MariaDB和MariaDB Galera群集实例。 用法示例,它将每天03:00备份数据库。 您可以在端口18080上使用集成的HTTP服务器检查上次运行的时间: docker run -d \ -v...
1、免积分,不需要VIP,直接下载即可(如果后期被系统修改要VIP,可随意私信我要); 2、由于网上关于 aarch64 的资源特别少,尤其是 docker 这一块的,其他网友写的...3、本资源适用于docker-compose-linux-aarch64
在arm版本的服务器上可用的docker-compose, 可执行文件
$mv docker-compose-Linux-x86_64 docker-compose $chmod +x docker-compose $docker-compose version --------------------------------------------------------------- docker-compose version 1.24.0, build 0...
docker-compose-window-2.14.2.exe免费下载
Docker Compose 是一个用于定义和运行多容器Docker应用程序的命令行工具
Docker Compose 是一个用于定义和运行多容器Docker应用程序的命令行工具
Docker Compose 是一个用于定义和运行多容器Docker应用程序的命令行工具