- 浏览: 2486893 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Sqlite Database 2019(1)Sqlite3 Installation and Docker phpsqliteadmin
Install SQLite database
On MAC, it already there
> sqlite3 -version
3.24.0 2018-06-04 14:10:15
On Ubuntu, it is already there as well
> sqlite3 -version
3.22.0 2018-01-22 18:45:57
On CentOS 7, it is already there as well
> sqlite3 -version
3.7.17 2013-05-20
We can also download from here
https://www.sqlite.org/download.html
> wget https://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gz
> tar zxvf sqlite-autoconf-3290000.tar.gz
Compile and install
> cd sqlite-autoconf-3290000
> ./configure --prefix=/usr/local
> make
> sudo make install
Check version again
> sqlite3 -version
3.29.0 2019-07-10
Command line tool to open one sqlite database file
> sqlite3 ./SpiderKeeper.db
Check all tables
> .tables
sk_job_execution sk_job_instance sk_project sk_spider
Exit if needed
> sqlite> .quit
Check database schema
> .schema sk_spider
CREATE TABLE sk_spider (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
spider_name VARCHAR(100),
project_id INTEGER NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX ix_sk_spider_project_id ON sk_spider (project_id);
> .schema sk_project
CREATE TABLE sk_project (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
project_name VARCHAR(50),
PRIMARY KEY (id)
);
> .schema sk_job_instance
CREATE TABLE sk_job_instance (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
spider_name VARCHAR(100) NOT NULL,
project_id INTEGER NOT NULL,
tags TEXT,
spider_arguments TEXT,
priority INTEGER,
"desc" TEXT,
cron_minutes VARCHAR(20),
cron_hour VARCHAR(20),
cron_day_of_month VARCHAR(20),
cron_day_of_week VARCHAR(20),
cron_month VARCHAR(20),
enabled INTEGER,
run_type VARCHAR(20),
PRIMARY KEY (id)
);
CREATE INDEX ix_sk_job_instance_spider_name ON sk_job_instance (spider_name);
CREATE INDEX ix_sk_job_instance_project_id ON sk_job_instance (project_id);
> .schema sk_job_execution
CREATE TABLE sk_job_execution (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
project_id INTEGER NOT NULL,
service_job_execution_id VARCHAR(50) NOT NULL,
job_instance_id INTEGER NOT NULL,
create_time DATETIME,
start_time DATETIME,
end_time DATETIME,
running_status INTEGER,
running_on TEXT,
PRIMARY KEY (id)
);
CREATE INDEX ix_sk_job_execution_project_id ON sk_job_execution (project_id);
CREATE INDEX ix_sk_job_execution_service_job_execution_id ON sk_job_execution (service_job_execution_id);
CREATE INDEX ix_sk_job_execution_job_instance_id ON sk_job_execution (job_instance_id);
There is a webUI tool, haha. I should use command line, but UI is easy as well.
https://www.phpliteadmin.org/
Currently, stable version is 1.9.8 https://www.phpliteadmin.org/download/
Then I get the file named phpLiteAdmin_v1-9-8.zip
Create directory, Unzip the file in that directory
> mkdir phpliteadmin-1.9.8
> unzip phpLiteAdmin_v1-9-8.zip
It seems need php and web server for that following this https://bitbucket.org/phpliteadmin/public/wiki/Installation
It may be better to directly use this docker
https://github.com/shadowcodex/phpliteadmin
> git clone https://github.com/shadowcodex/phpliteadmin
Use a text editor to change the configuration, I use sublime here, or you can directly use vi on the server
> subl phpliteadmin/
Make sure I have docker on my CentOS
> sudo yum install docker-ce
> sudo usermod -aG docker $(whoami)
> sudo systemctl enable docker.service
> sudo systemctl start docker.service
If there is permission issue, you may need to restart the machines.
If we can not find the docker-ce package there “ No package docker-ce available."
Solution:
https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/centos/#install-using-the-repository
> sudo yum install -y yum-utils device-mapper-persistent-data lvm2
> sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Then the install command will work
> sudo yum install docker-ce
Go to the directory of phpliteadmin
> chmod a+x go.sh
Start the service
> ./go.sh /home/carl/data
It is running fine now
> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1af127d6da44 shadowcodex/phpliteadmin "/bin/parent caddy -…" 3 seconds ago Up 2 seconds 80/tcp, 443/tcp, 0.0.0.0:2015->2015/tcp websql
Visit the webpage from this URL
http://centos-dev1:2015/phpliteadmin.php
Change the configuration, specially password here
> vi phpliteadmin.config.php
Restart the service
> ./go.sh /home/carl/data
The password is not working as designed. Open the debug=true, and I saw this in the logging
2019-09-04T22:55:22.608410410Z 04/Sep/2019:22:55:22 +0000 [ERROR 0 /phpliteadmin.php] PHP message: PHP Deprecated: crypt(): Supplied salt is not valid for DES. Possible bug in provided salt format. in /srv/phpliteadmin.php on line 4194
Plan to build the ENV my own, Check my PHP
Content in info.php
<?php phpinfo();?>
http://localhost:8081/info.php
Unzip the latest file
> unzip phpLiteAdmin_v1-9-8-1.zip
Copy them to my html directory
> cp ~/install/phpliteadmin.php ./html/
> cp ~/install/phpliteadmin.config.sample.php ./html/phpliteadmin.config.php
The docker thing is just normal php7, put the phpsqliteadmin under the html directory, that is it.
Check my centos7-sqlitephpadmin
References:
https://www.sqlite.org/download.html
https://www.yiibai.com/sqlite/installation.html
https://bitbucket.org/phpliteadmin/public/wiki/Installation
Install SQLite database
On MAC, it already there
> sqlite3 -version
3.24.0 2018-06-04 14:10:15
On Ubuntu, it is already there as well
> sqlite3 -version
3.22.0 2018-01-22 18:45:57
On CentOS 7, it is already there as well
> sqlite3 -version
3.7.17 2013-05-20
We can also download from here
https://www.sqlite.org/download.html
> wget https://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gz
> tar zxvf sqlite-autoconf-3290000.tar.gz
Compile and install
> cd sqlite-autoconf-3290000
> ./configure --prefix=/usr/local
> make
> sudo make install
Check version again
> sqlite3 -version
3.29.0 2019-07-10
Command line tool to open one sqlite database file
> sqlite3 ./SpiderKeeper.db
Check all tables
> .tables
sk_job_execution sk_job_instance sk_project sk_spider
Exit if needed
> sqlite> .quit
Check database schema
> .schema sk_spider
CREATE TABLE sk_spider (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
spider_name VARCHAR(100),
project_id INTEGER NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX ix_sk_spider_project_id ON sk_spider (project_id);
> .schema sk_project
CREATE TABLE sk_project (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
project_name VARCHAR(50),
PRIMARY KEY (id)
);
> .schema sk_job_instance
CREATE TABLE sk_job_instance (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
spider_name VARCHAR(100) NOT NULL,
project_id INTEGER NOT NULL,
tags TEXT,
spider_arguments TEXT,
priority INTEGER,
"desc" TEXT,
cron_minutes VARCHAR(20),
cron_hour VARCHAR(20),
cron_day_of_month VARCHAR(20),
cron_day_of_week VARCHAR(20),
cron_month VARCHAR(20),
enabled INTEGER,
run_type VARCHAR(20),
PRIMARY KEY (id)
);
CREATE INDEX ix_sk_job_instance_spider_name ON sk_job_instance (spider_name);
CREATE INDEX ix_sk_job_instance_project_id ON sk_job_instance (project_id);
> .schema sk_job_execution
CREATE TABLE sk_job_execution (
id INTEGER NOT NULL,
date_created DATETIME,
date_modified DATETIME,
project_id INTEGER NOT NULL,
service_job_execution_id VARCHAR(50) NOT NULL,
job_instance_id INTEGER NOT NULL,
create_time DATETIME,
start_time DATETIME,
end_time DATETIME,
running_status INTEGER,
running_on TEXT,
PRIMARY KEY (id)
);
CREATE INDEX ix_sk_job_execution_project_id ON sk_job_execution (project_id);
CREATE INDEX ix_sk_job_execution_service_job_execution_id ON sk_job_execution (service_job_execution_id);
CREATE INDEX ix_sk_job_execution_job_instance_id ON sk_job_execution (job_instance_id);
There is a webUI tool, haha. I should use command line, but UI is easy as well.
https://www.phpliteadmin.org/
Currently, stable version is 1.9.8 https://www.phpliteadmin.org/download/
Then I get the file named phpLiteAdmin_v1-9-8.zip
Create directory, Unzip the file in that directory
> mkdir phpliteadmin-1.9.8
> unzip phpLiteAdmin_v1-9-8.zip
It seems need php and web server for that following this https://bitbucket.org/phpliteadmin/public/wiki/Installation
It may be better to directly use this docker
https://github.com/shadowcodex/phpliteadmin
> git clone https://github.com/shadowcodex/phpliteadmin
Use a text editor to change the configuration, I use sublime here, or you can directly use vi on the server
> subl phpliteadmin/
Make sure I have docker on my CentOS
> sudo yum install docker-ce
> sudo usermod -aG docker $(whoami)
> sudo systemctl enable docker.service
> sudo systemctl start docker.service
If there is permission issue, you may need to restart the machines.
If we can not find the docker-ce package there “ No package docker-ce available."
Solution:
https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/centos/#install-using-the-repository
> sudo yum install -y yum-utils device-mapper-persistent-data lvm2
> sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Then the install command will work
> sudo yum install docker-ce
Go to the directory of phpliteadmin
> chmod a+x go.sh
Start the service
> ./go.sh /home/carl/data
It is running fine now
> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1af127d6da44 shadowcodex/phpliteadmin "/bin/parent caddy -…" 3 seconds ago Up 2 seconds 80/tcp, 443/tcp, 0.0.0.0:2015->2015/tcp websql
Visit the webpage from this URL
http://centos-dev1:2015/phpliteadmin.php
Change the configuration, specially password here
> vi phpliteadmin.config.php
Restart the service
> ./go.sh /home/carl/data
The password is not working as designed. Open the debug=true, and I saw this in the logging
2019-09-04T22:55:22.608410410Z 04/Sep/2019:22:55:22 +0000 [ERROR 0 /phpliteadmin.php] PHP message: PHP Deprecated: crypt(): Supplied salt is not valid for DES. Possible bug in provided salt format. in /srv/phpliteadmin.php on line 4194
Plan to build the ENV my own, Check my PHP
Content in info.php
<?php phpinfo();?>
http://localhost:8081/info.php
Unzip the latest file
> unzip phpLiteAdmin_v1-9-8-1.zip
Copy them to my html directory
> cp ~/install/phpliteadmin.php ./html/
> cp ~/install/phpliteadmin.config.sample.php ./html/phpliteadmin.config.php
The docker thing is just normal php7, put the phpsqliteadmin under the html directory, that is it.
Check my centos7-sqlitephpadmin
References:
https://www.sqlite.org/download.html
https://www.yiibai.com/sqlite/installation.html
https://bitbucket.org/phpliteadmin/public/wiki/Installation
发表评论
-
Stop Update Here
2020-04-28 09:00 262I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 430NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 311Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 322Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 294Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 380Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 374Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 327Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 397VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 336Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 415NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 360Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 293Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 208GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 391GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 275GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 264Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 259Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 252Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 236Serverless with NodeJS and Tenc ...
相关推荐
SQLite数据库系统设计与实现 英文原版PDF,非常好的SQLite源码学习文档
sqlite database browser 适合 Mac OS版本,可以轻松管理数据库sqlite文件数据,方便快捷哦
sqlite数据库编辑工具SQLiteDatabaseBrowser sqlite数据库编辑工具SQLiteDatabaseBrowser
SQLite Database Browser, SQLite数据库专用客户端工具。
pc6-SQLite Database Browser IPHONE存档修改器
sqlite数据库操作软件
SQLite,是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它包含在一个相对小的C库中。
码头工人-sqlite3 docker-sqlite3 基于 busybox:ubuntu-14.04 创建一个最小的 sqlite3 docker 镜像。 非常适合 sqlite3 仅数据容器。创造 make将创建一个名为 dbaulig/sqlite3 的 docker 镜像,将该镜像作为可分发...
SQLite Database browser 是一个 SQLite 数据库的轻量级 GUI 客户端,基于 Qt 库开发,主要是为非技术用户创建、修改和编辑 SQLite 数据库的工具
使用sqlite3开发时的必要工具,支持C++ builder和VC++ 的库文件,具体包含以下东西:sqlite3.dll,sqlite3.h, (C++ builder 和 vc++)sqlite3.lib,以及创建和查看sqlite3数据库的工具 SQLite Database Browser.exe。...
This book leads you through the essential concepts and new iOS 10 SDK and Swift 3 programming language APIs to build iPhone and iPad database driven applications using the defacto standard for data ...
SQLite数据库浏览器,很好地一款SQLite数据库浏览器,可以很方便的查询和修改
Sqlite解决database locked问题
sqlite database browser3是针对sqlite数据库而开发的一个可视化数据库浏览器,简称sqlite查看器,使用它用户可以用最简单、直观的方式创建、编辑、处理SQL数据库,可以创建需要的数据库并分别为其创建图表,百分百...
SQLite Database System Design and Implementation.pdf
类似phpMYadmin的一款工具,不过这个是用来管理SQLITE的
桌面数据库工具 SQLite Database 简单的数据库工具,小巧实用。
Android 的 SQLite Database
使用sqlite3所需要用到的库文件等