linux基本命令 docker部署常用镜像

常用操作

防火墙操作

查看防火状态
	systemctl status firewalld
	service  iptables status
暂时关闭防火墙
	systemctl stop firewalld
	service  iptables stop
永久关闭防火墙
	systemctl disable firewalld
	chkconfig iptables off
重启防火墙
	systemctl enable firewalld
	service iptables restart
永久关闭后重启
	chkconfig iptables on

开放对应端口

查看9090端口是否开启
	firewall-cmd --query-port=1935/tcp
先开启防火墙
	systemctl start firewalld.service
开放指定端口
	firewall-cmd --zone=public --add-port=1935/tcp --permanent
#--zone #作用域
#--add-port=1935/tcp  #添加端口,格式为:端口/通讯协议
#--permanent  #永久生效,没有此参数重启后失效
重启防火墙
	firewall-cmd --reload
查看端口号
	netstat -ntlp   #查看当前所有tcp端口·
	netstat -ntulp |grep 1935   #查看所有1935端口使用情况·

安装jdk1.8

	yum install java-1.8.0-openjdk* -y

安装vim

	yum install vim -y

Centos7将/dev/mapper/centos-home磁盘空间转移到/dev/mapper/centos-root

	#查看磁盘空间,每个人的磁盘名称可能不同
	df -h
	
	#备份home文件
	tar cvf /tmp/home.tar /home
	
	#卸载/home,如果无法卸载,先终止使用/home文件系统的进程再卸载
	umount /home        #(卸载)
	fuser -km /home/ 		#(终止)
	
	#删除/home所在的lv
	lvremove /dev/mapper/centos-home
	
	#扩展/root所在的lv
	lvextend -L +50G /dev/mapper/centos-root
	
	#扩展/root文件系统
	xfs_growfs /dev/mapper/centos-root
	
	#重新创建home lv (创建时计算好剩余的磁盘容量,建议比剩余小1G左右,如果刚好和剩余容量一样可能会报错)
	lvcreate -L 50G -n /dev/mapper/centos-home 
	
	#创建文件系统
	mkfs.xfs /dev/mapper/centos-home
	
	#挂载home
	mount /dev/mapper/centos-home
	
	#home文件恢复
	tar xvf /tmp/home.tar -C /home/
	
	#查看磁盘空间
	df -TH

安装docker

	 yum 包更新到最新
		yum update -y
		
	 安装需要的软件包,yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动以来的
		yum install -y yum-utils device-mapper-persistent-data lvm2
		
	 设置yum源
		yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
		
	 安装docker 
		# 安装最新版
		yum install -y docker-ce
		# 指定版本安装
		yum -y install docker-ce-20.10.9-3.el7

	 启动 docker
	 	systemctl start docker 
	 
	 停止docker 
	 	systemctl stop docker 
	 #执行命令之后会出现如下提示:主要的意思就是docker已经停止了,但是可以随时被唤醒,所以使用docker命令就会启动
	 	Warning: Stopping docker.service, but it can still be activated by:
  		docker.socket
	 
	 重启docker 
	 	systemctl restart docker

	 设置开机自启
	 	systemctl enable docker

	 查看docker状态
	 	systemctl status docker
	 
	 查看docker版本信息
	 	# 简单信息
	 	docker -v
	 	# 查看docker的版本号,包括客户端、服务端、依赖的Go等
	 	docker version
	 	# 查看系统(docker)层面信息,包括管理的images, containers数等
	 	docker info
	 	
	 卸载docker
		#查看已安装的docker
		yum list installed|grep docker
		#卸载
		yum -y remove + 查看已安装的名字

docker常用命令

查看镜像
	docker images
搜索镜像
	docker search 镜像名称
拉取镜像
	docker pull 镜像名称:版本号
删除镜像
	docker rmi 镜像名称:版本号
镜像信息
	vim /var/lib/docker/image/overlay2/repositories.json
查看正在运行的容器
	docker ps
查看所有容器
	docker ps -a
创建容器
	docker run -d -p 1337:1337 \
        --network kong-net \
        --name konga \
        -e "NODE_ENV=production"  \
        -e "DB_ADAPTER=postgres" \
        -e "DB_URI=postgresql://kong:[email protected]:5432/konga" \
        pantsel/konga
eg: \是换行的意思
run参数:
-rm
	在容器退出时自动清理容器内部的文件系统
	在Docker容器退出时,默认容器内部的文件系统仍然被保留,以方便调试并保留用户数据.
	但是,对于前台运行的容器,由于其只是在开发调试过程中短期运行,其用户数据并无保留的必要.
	启动时设置-rm选项,这样在容器退出时就能够自动清理容器内部的文件系统.
-i 保持容器运行
-p 端口映射
-e 传递环境变量
-t 为容器重新分配一个伪输入终端
-d 以守护进程模式运行容器,退出后容器不会停止
-it创建一个交互式容器,推出后容器容器停止运行
-id创建一个守护容器;退出后容器不停止运行
–-name为创建的容器命名
进入容器
	docker exec -it 容器名称 /bin/bash
	
	#eg:进入一个叫konga的容器
	docker exec -it konga /bin/bash
	
	# 在容器中执行了一个ping命令
	ping 127.0.0.1
	
	# 退出当前容器
	exit
启动容器
	docker start 容器名称或者容器id 
停止容器
	docker stop 容器名称或者容器id 
删除容器
	docker rm 容器名称或者容器id 
删除所有容器
	docker rm `docker ps -aq`
停止所有容器
	docker stop $(docker ps -a -q)
查看容器详细信息
	docker inspect 容器名称
容器文件位置
	cd /var/lib/docker/containers
删除所有镜像
	rm -rf /var/lib/docker
网络模式
bridge:桥接docker(默认创建时,不指定网络驱动,将使用bridge模式)
none:不配置网络
host:和宿主机共享网络
例如:当你在容器上使用80端口访问其他应用,使用的是宿主机的80端口.
container:容器网络连通(用的少,局限很大)
查看docker下的网络列表
	docker network ls
	rm -rf /var/lib/docker
查看docker下的网络列表
	docker network ls
查看单个网络详细信息
	docker network inspect networkname
创建网络
	docker network ls
查看docker下的网络列表
#不指定网络驱动时,默认创建的是bridge网络.
	docker network create networkname
删除网络
	docker network rm networkname
日志相关
	docker logs [OPTIONS] CONTAINER
 Options参数
	--details: 显示更多的信息
	--follow(-f): 跟踪实时日志
	--since string: 显示自某个timestamp之后的日志,或相对时间,如40m(即40分钟)
	--tail string: 从日志末尾显示多少行日志, 默认是all
	--timestamps(-t): 显示时间戳
	--until string: 显示自某个timestamp之前的日志,或相对时间,如40m(即40分钟)
# 查看容器mysql 最近30分钟的日志:
	docker logs --since 30m mysql
# 查看容器mysql 某时间之后的日志:
	docker logs -t --since="2019-11-02T13:23:37" mysql
#查看容器mysql 某时间段日志:
	docker logs -t --since="2019-11-02T13:23:37" --until "2019-11-03T12:23:37" mysql
配置国内加速

菜鸟教程

docker 容器内部安装vim
#更新安装源: 
apt-get update
#安装vim: 
apt-get install vim

docker安装mysql8

拉取镜像
	docker pull mysql
创建对应目录
	用来映射外部文件 在/usr/local/docker/mysql下创建对应目录
	mkdir data
	mkdir conf
	mkdir logs
	mkdir mysql-files
	在conf中创建配置文件 my.cnf 内容如下
[mysqld]

#pid-file        = /var/run/mysqld/mysqld.pid

#socket          = /var/run/mysqld/mysqld.sock

#datadir         = /var/lib/mysql

#socket = /usr/mysql/mysqld.sock

#pid-file = /usr/mysql/mysqld.pid

datadir = /usr/local/docker/mysql/data

character_set_server = utf8mb4

collation_server = utf8mb4_bin

secure-file-priv= /var/lib/mysql

symbolic-links=0

!includedir /etc/mysql/conf.d/
给整个mysql目录赋权
	chmod -R 777 mysql/*
创建容器
docker run -itd --name mysql \
-v /usr/local/docker/mysql/conf/my.cnf:/etc/mysql/my.cnf \
-v /usr/local/docker/mysql/data:/var/lib/mysql \
-v /usr/local/docker/mysql/log:/var/log/mysql \
-v /usr/local/docker/mysql/mysql-files:/var/lib/mysql-files/ \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=BdL2hv25meIFG8rQ mysql --lower_case_table_names=1
lower_case_table_names: 忽略大小写 ,mysql8 必须在这里配置 在配置文件中配置不会生效
修mysql密码以及可访问主机
进入容器
	docker exec -it mysql /bin/bash
连接mysql
	mysql -uroot -pBdL2hv25meIFG8rQ
使用mysql库
	use mysql
修改访问主机以及密码等,设置为所有主机可访问
	# mysql_native_password,mysql8.x版本必须使用这种模式,否则navicate无法正确连接
	ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'BdL2hv25meIFG8rQ';
刷新
	flush privileges;

docker 安装nacos

拉取镜像
	docker pull nacos/nacos-server
nacos sql
/*
 * Copyright 1999-2018 Alibaba Group Holding Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info   */
/******************************************/
CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) DEFAULT NULL,
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) DEFAULT NULL,
  `c_use` varchar(64) DEFAULT NULL,
  `effect` varchar(64) DEFAULT NULL,
  `type` varchar(64) DEFAULT NULL,
  `c_schema` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info_aggr   */
/******************************************/
CREATE TABLE `config_info_aggr` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) NOT NULL COMMENT 'datum_id',
  `content` longtext NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';


/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info_beta   */
/******************************************/
CREATE TABLE `config_info_beta` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info_tag   */
/******************************************/
CREATE TABLE `config_info_tag` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_tags_relation   */
/******************************************/
CREATE TABLE `config_tags_relation` (
  `id` bigint(20) NOT NULL COMMENT 'id',
  `tag_name` varchar(128) NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint(20) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`),
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = group_capacity   */
/******************************************/
CREATE TABLE `group_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = his_config_info   */
/******************************************/
CREATE TABLE `his_config_info` (
  `id` bigint(64) unsigned NOT NULL,
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) NOT NULL,
  `group_id` varchar(128) NOT NULL,
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL,
  `md5` varchar(32) DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text,
  `src_ip` varchar(50) DEFAULT NULL,
  `op_type` char(10) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`),
  KEY `idx_gmt_modified` (`gmt_modified`),
  KEY `idx_did` (`data_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';


/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = tenant_capacity   */
/******************************************/
CREATE TABLE `tenant_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';


CREATE TABLE `tenant_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) default '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) default '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';

CREATE TABLE `users` (
	`username` varchar(50) NOT NULL PRIMARY KEY,
	`password` varchar(500) NOT NULL,
	`enabled` boolean NOT NULL
);

CREATE TABLE `roles` (
	`username` varchar(50) NOT NULL,
	`role` varchar(50) NOT NULL,
	UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE
);

CREATE TABLE `permissions` (
    `role` varchar(50) NOT NULL,
    `resource` varchar(255) NOT NULL,
    `action` varchar(8) NOT NULL,
    UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
);

INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);

INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
启动容器
docker run -d \
-e MODE=standalone \
-e SPRING_DATASOURCE_PLATFORM=mysql \
-e MYSQL_SERVICE_HOST=数据库ip \
-e MYSQL_SERVICE_PORT=数据库端口 \
-e MYSQL_SERVICE_USER=数据库用户名 \
-e MYSQL_SERVICE_PASSWORD=数据库密码 \
-e MYSQL_SERVICE_DB_NAME=数据库 \
-p 8848:8848 \
--name nacos \
nacos/nacos-server
低版本nacos不支持mysql8 需要自己拉取源码修改

docker 安装redis

拉取镜像
	docker pull redis
创建目录 /usr/local/docker/redis/data 并赋权 
	chown -R 755 /usr/local/docker/redis/*
启动容器
	# requirepass 设置密码 
	docker run -itd -v /usr/local/docker/redis/data:/data --name redis -p 6379:6379 redis --requirepass 4W7mgMQe5XIC1viI 

docker安装mysql5.7

下载mysql镜像
	docker pull mysql:5.7
创建目录
	cd /usr/local
	/docker/mysql57
赋权
	chmod -R 755 文件夹名
启动mysql
	docker run -p 3306:3306 --name mysql57 -v  /usr/local/docker/mysql57/logs:/logs -v  /usr/local/docker/mysql57/data:/var/lib/mysql -e  MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7

docker安装tomcat

查询redis镜像
	docker search tomcat
安装最新镜像
	docker pull tomcat:latest
创建目录
	cd /usr/local/docker/
	mkdir tomcat
赋权
	chown  -R 755 tomcat/
 将war包上传到/usr/local/docker/tomcat/目录下
启动tomcat
	docker run -itd  --privileged=true -v /usr/local/docker/tomcat/:/usr/local/tomcat/webapps/  -p 38702:8080 tomcat
	
	nohup java -jar ruoyi-admin.jar & 
查看日志
首先进入容器
命令格式为:docker exec -it +容器id +命令
	docker exec -ti 镜像的id /bin/bash
在容器内进入日志目录 
	cd /home/edt/logs/

docker安装nginx

拉取Nginx镜像
	docker pull nginx:latest
创建文件夹及设置权限
	mkdir -p /data/nginx
	mkdir -p /data/nginx/conf.d
	mkdir -p /data/wwwroot/html
	chown -R 1000:1000 /data/nginx
在/data/nginx创建nginx.conf
	cd /data/nginx
	vim /data/nginx/nginx.conf
内容可以从nginx官网下载或者直接使用下面配置
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    client_max_body_size 20m;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
     
    gzip  on;
    gzip_buffers 32 4K;
    gzip_comp_level 6;
    gzip_min_length 100;
    gzip_types application/javascript text/css text/xml;
    #配置禁用gzip条件,支持正则。此处表示ie6及以下不启用gzip(因为ie低版本不支持)
    gzip_disable "MSIE [1-6]\."; 
    gzip_vary on;

    include /etc/nginx/conf.d/*.conf;
}
创建容器
docker run --name nginx --restart=always -p 80:80 \
	--network=host \
	-v /data/nginx/conf.d:/etc/nginx/conf.d \
	-v /data/nginx/nginx.conf:/etc/nginx/nginx.conf \
	-v /data/nginx/logs:/var/log/nginx \
	-v /data/nginx/cert:/etc/nginx/cert \
	-v /data/wwwroot:/data/wwwroot \
	-d nginx
进入目录/data/nginx/conf.d
	cd /data/nginx/conf.d
	
	vim /data/nginx/conf.d/default.conf
编辑default.conf配置文件
#配置内容如下
server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /data/wwwroot/html;
            index  index.html index.htm;
            try_files $uri $uri/ /index.html;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
}
切换到以下目录:
	cd /data/wwwroot/html
	
	vim /data/wwwroot/html/50x.html
创建50x.html、index.html文件(该步骤可省略)
#50x.html
<!DOCTYPE html>


Error<<span class="token operator">/</span>title>
<style>
    body <span class="token punctuation">{</span>
        width: 35em<span class="token punctuation">;</span>
        margin: 0 auto<span class="token punctuation">;</span>
        font<span class="token operator">-</span>family: Tahoma<span class="token punctuation">,</span> Verdana<span class="token punctuation">,</span> Arial<span class="token punctuation">,</span> sans<span class="token operator">-</span>serif<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<<span class="token operator">/</span>style>
<<span class="token operator">/</span>head>
<body>
<h1>An error occurred<span class="token punctuation">.</span><<span class="token operator">/</span>h1>
<p>Sorry<span class="token punctuation">,</span> the page you are looking <span class="token keyword">for</span> is currently unavailable<span class="token punctuation">.</span><br<span class="token operator">/</span>>
Please <span class="token keyword">try</span> again later<span class="token punctuation">.</span><<span class="token operator">/</span>p>
<p><span class="token keyword">If</span> you are the system administrator of this resource then you should check
the error log <span class="token keyword">for</span> details<span class="token punctuation">.</span><<span class="token operator">/</span>p>
<p><em>Faithfully yours<span class="token punctuation">,</span> nginx<span class="token punctuation">.</span><<span class="token operator">/</span>em><<span class="token operator">/</span>p>
<<span class="token operator">/</span>body>
<<span class="token operator">/</span>html>
</code></pre> 
  <pre><code class="prism language-powershell">	vim <span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>wwwroot<span class="token operator">/</span>html<span class="token operator">/</span>50x<span class="token punctuation">.</span>html
</code></pre> 
  <pre><code class="prism language-powershell">	<span class="token comment">#index.html</span>
<<span class="token operator">!</span>DOCTYPE html>
<html>
<head>
<title>Welcome to nginx<span class="token operator">!</span><<span class="token operator">/</span>title>
<style>
    body <span class="token punctuation">{</span>
        width: 35em<span class="token punctuation">;</span>
        margin: 0 auto<span class="token punctuation">;</span>
        font<span class="token operator">-</span>family: Tahoma<span class="token punctuation">,</span> Verdana<span class="token punctuation">,</span> Arial<span class="token punctuation">,</span> sans<span class="token operator">-</span>serif<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<<span class="token operator">/</span>style>
<<span class="token operator">/</span>head>
<body>
<h1>Welcome to nginx<span class="token operator">!</span><<span class="token operator">/</span>h1>
<p><span class="token keyword">If</span> you see this page<span class="token punctuation">,</span> the nginx web server is successfully installed and
working<span class="token punctuation">.</span> Further configuration is required<span class="token punctuation">.</span><<span class="token operator">/</span>p>

<p><span class="token keyword">For</span> online documentation and support please refer to
<a href=<span class="token string">"http://nginx.org/"</span>>nginx<span class="token punctuation">.</span>org<<span class="token operator">/</span>a><span class="token punctuation">.</span><br<span class="token operator">/</span>>
Commercial support is available at
<a href=<span class="token string">"http://nginx.com/"</span>>nginx<span class="token punctuation">.</span>com<<span class="token operator">/</span>a><span class="token punctuation">.</span><<span class="token operator">/</span>p>

<p><em>Thank you <span class="token keyword">for</span> <span class="token keyword">using</span> nginx<span class="token punctuation">.</span><<span class="token operator">/</span>em><<span class="token operator">/</span>p>
<<span class="token operator">/</span>body>
<<span class="token operator">/</span>html>
</code></pre> 
  <h5>重启容器</h5> 
  <pre><code class="prism language-powershell">	docker restart nginx
</code></pre> 
  <h5>访问页面域名或者ip,出现以下界面即为成功</h5> 
  <pre><code class="prism language-html">index.html
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.
</code></pre> 
  <h2>docker安装jenkins</h2> 
  <h5>拉取镜像</h5> 
  <pre><code class="prism language-powershell">	docker pull jenkins
</code></pre> 
  <h5>启动容器</h5> 
  <pre><code class="prism language-powershell">docker run \
  <span class="token operator">-</span>u root \
  <span class="token operator">-</span>d \
  <span class="token operator">--</span>name jenkins \
  <span class="token operator">-</span>p 8080:8080 \
  <span class="token operator">-</span>p 50000:50000 \
  <span class="token operator">-</span>v <span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>jenkins_home:<span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>jenkins_home \
  <span class="token operator">-</span>v <span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>run<span class="token operator">/</span>docker<span class="token punctuation">.</span>sock:<span class="token operator">/</span><span class="token keyword">var</span><span class="token operator">/</span>run<span class="token operator">/</span>docker<span class="token punctuation">.</span>sock \
  <span class="token operator">-</span>v <span class="token operator">/</span>etc<span class="token operator">/</span>localtime:<span class="token operator">/</span>etc<span class="token operator">/</span>localtime \
  jenkinsci<span class="token operator">/</span>blueocean
</code></pre> 
  <pre><code>访问 ip:8080进入页面,需要输入初始化密码安装完成后,
根据页面提示从指定文件获取初始密码,因为jenkins容器
的目录已经挂载到宿主机的/data/jenkins_home目录,可以
直接从/data/jenkins_home/secrets/initialAdminPassword获取
</code></pre> 
  <pre><code class="prism language-powershell">	<span class="token function">cat</span> <span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>jenkins_home<span class="token operator">/</span>secrets<span class="token operator">/</span>initialAdminPassword
</code></pre> 
  <h5>安装插件</h5> 
  <pre><code>插件路径:[Jenkins] -> [系统管理] -> [插件管理]
安装 所有SSH插件、所有git插件、所有maven插件
</code></pre> 
  <h5>全局参数配置</h5> 
  <pre><code>全局工具配置路径:[Jenkins] -> [系统管理] -> [全局工具配置]
安装JDK、Maven、Node、Git,可以选择自动安装,jenkins会帮助下载安装配置,也可以手动安装,安装完之后需要再指定安装目录
注意:因为这边是选择自动安装,所以在第一次构建任务安装maven后,再来配置maven的默认全局 settings路径
(插件安装路径:/var/jenkins_home/tools,可以在构建任务的”控制台输出“的详细信息中找到)
</code></pre> 
  <h5>系统配置</h5> 
  <pre><code>系统配置路径:[Jenkins] -> [系统管理] -> [系统配置]
配置ssh server,主要填写主机地址、端口、用户名、密码、部署服务的远程目录等信息;
</code></pre> 
  <h2>安装seata</h2> 
  <h5>拉取容器</h5> 
  <pre><code class="prism language-powershell"> 	docker pull seataio<span class="token operator">/</span>seata<span class="token operator">-</span>server:1<span class="token punctuation">.</span>2<span class="token punctuation">.</span>0
</code></pre> 
  <h5>启动容器</h5> 
  <pre><code class="prism language-powershell">	docker run <span class="token operator">-</span>d <span class="token operator">--</span>name seata<span class="token operator">-</span>server <span class="token operator">-</span>p 8091:8091 <span class="token operator">-</span>d  <span class="token operator">-</span>e SEATA_IP=ip  seataio<span class="token operator">/</span>seata<span class="token operator">-</span>server:1<span class="token punctuation">.</span>2<span class="token punctuation">.</span>0
</code></pre> 
  <h5>将docker文件拷贝到宿主机</h5> 
  <pre><code class="prism language-powershell">	docker <span class="token function">cp</span> seata<span class="token operator">-</span>server:<span class="token operator">/</span>seata<span class="token operator">-</span>server<span class="token operator">/</span>resources <span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>seata<span class="token operator">-</span>service
</code></pre> 
  <h5>进入到拷贝出的配置文件路径</h5> 
  <pre><code class="prism language-powershell">	 cd <span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>seata<span class="token operator">-</span>service
</code></pre> 
  <h5>修改file.conf配置文件</h5> 
  <pre><code class="prism language-powershell">	 <span class="token comment">## transaction log store, only used in seata-server</span>
    store <span class="token punctuation">{</span>
      <span class="token comment">## store mode: file、db</span>
      mode = <span class="token string">"db"</span>
    
      <span class="token comment">## file store property</span>
      file <span class="token punctuation">{</span>
        <span class="token comment">## store location dir</span>
        <span class="token function">dir</span> = <span class="token string">"sessionStore"</span>
        <span class="token comment"># branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions</span>
        maxBranchSessionSize = 16384
        <span class="token comment"># globe session size , if exceeded throws exceptions</span>
        maxGlobalSessionSize = 512
        <span class="token comment"># file buffer size , if exceeded allocate new buffer</span>
        fileWriteBufferCacheSize = 16384
        <span class="token comment"># when recover batch read size</span>
        sessionReloadReadSize = 100
        <span class="token comment"># async, sync</span>
        flushDiskMode = async
      <span class="token punctuation">}</span>
    
      <span class="token comment">## database store property</span>
     db <span class="token punctuation">{</span>
        <span class="token comment">## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc.</span>
        datasource = <span class="token string">"druid"</span>
        <span class="token comment">## mysql/oracle/postgresql/h2/oceanbase etc.</span>
        dbType = <span class="token string">"mysql"</span>
        driverClassName = <span class="token string">"com.mysql.cj.jdbc.Driver"</span>
        <span class="token comment">## if using mysql to store the data, recommend add rewriteBatchedStatements=true in jdbc connection param</span>
        url = <span class="token string">"jdbc:mysql://ip:host/seata-server?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"</span>
        user = <span class="token string">"user"</span>
        password = <span class="token string">"password"</span>
        minConn = 5
        maxConn = 100
        globalTable = <span class="token string">"global_table"</span>
        branchTable = <span class="token string">"branch_table"</span>
        lockTable = <span class="token string">"lock_table"</span>
        queryLimit = 100
        maxWait = 5000
      <span class="token punctuation">}</span>
    
    <span class="token punctuation">}</span>
</code></pre> 
  <h5>修改registry.conf配置文件</h5> 
  <pre><code class="prism language-powershell">	 registry <span class="token punctuation">{</span>
      <span class="token comment"># file 、nacos 、eureka、redis、zk、consul、etcd3、sofa</span>
      <span class="token function">type</span> = <span class="token string">"nacos"</span>
    	<span class="token comment">#nacos相关配置</span>
    	  nacos <span class="token punctuation">{</span>
    		application = <span class="token string">"seata-server"</span>
    		serverAddr = <span class="token string">"ip:host"</span>
    		<span class="token function">group</span> = <span class="token string">"SEATA_GROUP"</span>
    		namespace = <span class="token string">"1d7d9d31-60d4-4a92-8779-9354499caefd"</span>
    		cluster = <span class="token string">"default"</span>
    		username = <span class="token string">""</span>
    		password = <span class="token string">""</span>
    	  <span class="token punctuation">}</span>
    	  eureka <span class="token punctuation">{</span>
    		serviceUrl = <span class="token string">"http://localhost:8761/eureka"</span>
    		application = <span class="token string">"default"</span>
    		weight = <span class="token string">"1"</span>
    	  <span class="token punctuation">}</span>
    	  redis <span class="token punctuation">{</span>
    		serverAddr = <span class="token string">"localhost:6379"</span>
    		db = 0
    		password = <span class="token string">""</span>
    		cluster = <span class="token string">"default"</span>
    		timeout = 0
    	  <span class="token punctuation">}</span>
    	  zk <span class="token punctuation">{</span>
    		cluster = <span class="token string">"default"</span>
    		serverAddr = <span class="token string">"127.0.0.1:2181"</span>
    		sessionTimeout = 6000
    		connectTimeout = 2000
    		username = <span class="token string">""</span>
    		password = <span class="token string">""</span>
    	  <span class="token punctuation">}</span>
    	  consul <span class="token punctuation">{</span>
    		cluster = <span class="token string">"default"</span>
    		serverAddr = <span class="token string">"127.0.0.1:8500"</span>
    	  <span class="token punctuation">}</span>
    	  etcd3 <span class="token punctuation">{</span>
    		cluster = <span class="token string">"default"</span>
    		serverAddr = <span class="token string">"http://localhost:2379"</span>
    	  <span class="token punctuation">}</span>
    	  sofa <span class="token punctuation">{</span>
    		serverAddr = <span class="token string">"127.0.0.1:9603"</span>
    		application = <span class="token string">"default"</span>
    		region = <span class="token string">"DEFAULT_ZONE"</span>
    		datacenter = <span class="token string">"DefaultDataCenter"</span>
    		cluster = <span class="token string">"default"</span>
    		<span class="token function">group</span> = <span class="token string">"SEATA_GROUP"</span>
    		addressWaitTime = <span class="token string">"3000"</span>
    	  <span class="token punctuation">}</span>
    	  file <span class="token punctuation">{</span>
    		name = <span class="token string">"file.conf"</span>
    	  <span class="token punctuation">}</span>
    	config <span class="token punctuation">{</span>
    	  <span class="token comment"># file、nacos 、apollo、zk、consul、etcd3</span>
    	  <span class="token function">type</span> = <span class="token string">"nacos"</span>
    
    	  nacos <span class="token punctuation">{</span>
    			  serverAddr = <span class="token string">"ip:host"</span>
    			  <span class="token function">group</span> = <span class="token string">"DEFAULT_GROUP"</span>
    			  namespace = <span class="token string">"1d7d9d31-60d4-4a92-8779-9354499caefd"</span>
    			  cluster = <span class="token string">"default"</span>
    			  username = <span class="token string">""</span>
    			  password = <span class="token string">""</span>   
    	  <span class="token punctuation">}</span>
    	  consul <span class="token punctuation">{</span>
    		serverAddr = <span class="token string">"127.0.0.1:8500"</span>
    	  <span class="token punctuation">}</span>
    	  apollo <span class="token punctuation">{</span>
    		appId = <span class="token string">"seata-server"</span>
    		apolloMeta = <span class="token string">"http://ip:8801"</span>
    		namespace = <span class="token string">"application"</span>
    	  <span class="token punctuation">}</span>
    	  zk <span class="token punctuation">{</span>
    		serverAddr = <span class="token string">"127.0.0.1:2181"</span>
    		sessionTimeout = 6000
    		connectTimeout = 2000
    		username = <span class="token string">""</span>
    		password = <span class="token string">""</span>
    	  <span class="token punctuation">}</span>
    	  etcd3 <span class="token punctuation">{</span>
    		serverAddr = <span class="token string">"http://localhost:2379"</span>
    	  <span class="token punctuation">}</span>
    	  file <span class="token punctuation">{</span>
    		name = <span class="token string">"file.conf"</span>
    	  <span class="token punctuation">}</span>
    	<span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
</code></pre> 
  <h5>将修改好的配置文件拷贝到docker容器</h5> 
  <pre><code class="prism language-powershell">	docker <span class="token function">cp</span> registry<span class="token punctuation">.</span>conf seata<span class="token operator">-</span>server:<span class="token operator">/</span>seata<span class="token operator">-</span>server<span class="token operator">/</span>resources
    docker <span class="token function">cp</span> file<span class="token punctuation">.</span>conf seata<span class="token operator">-</span>server:<span class="token operator">/</span>seata<span class="token operator">-</span>server<span class="token operator">/</span>resources
</code></pre> 
  <h5>重启seata-server容器</h5> 
  <pre><code class="prism language-powershell">	 docker restart seata<span class="token operator">-</span>server
</code></pre> 
  <h5>查看日志确定当前容器是否启动成功</h5> 
  <pre><code class="prism language-powershell">	 docker logs <span class="token operator">-</span>f <span class="token operator">-</span>t <span class="token operator">--</span>tail 300 seata<span class="token operator">-</span>server
</code></pre> 
  <h5>启动成功日志如下</h5> 
  <pre><code class="prism language-powershell">	 2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:25:03<span class="token punctuation">.</span>932639708Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:25:03<span class="token punctuation">.</span>929 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>server<span class="token punctuation">.</span>ParameterParser<span class="token punctuation">.</span>init:90 <span class="token operator">-</span>The server is running in container<span class="token punctuation">.</span>
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:25:03<span class="token punctuation">.</span>988965910Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:25:03<span class="token punctuation">.</span>987 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>config<span class="token punctuation">.</span>FileConfiguration<span class="token punctuation">.</span><init>:121 <span class="token operator">-</span>The configuration file used is registry<span class="token punctuation">.</span>conf
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:25:04<span class="token punctuation">.</span>016571862Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:25:04<span class="token punctuation">.</span>016 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>config<span class="token punctuation">.</span>FileConfiguration<span class="token punctuation">.</span><init>:121 <span class="token operator">-</span>The configuration file used is file<span class="token punctuation">.</span>conf
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:25:05<span class="token punctuation">.</span>296386746Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:25:05<span class="token punctuation">.</span>295 INFO <span class="token namespace">[main]</span>com<span class="token punctuation">.</span>alibaba<span class="token punctuation">.</span>druid<span class="token punctuation">.</span>pool<span class="token punctuation">.</span>DruidDataSource<span class="token punctuation">.</span>init:947 <span class="token operator">-</span><span class="token punctuation">{</span>dataSource<span class="token operator">-</span>1<span class="token punctuation">}</span> inited
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:25:05<span class="token punctuation">.</span>530374240Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:25:05<span class="token punctuation">.</span>529 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>core<span class="token punctuation">.</span>rpc<span class="token punctuation">.</span>netty<span class="token punctuation">.</span>RpcServerBootstrap<span class="token punctuation">.</span><span class="token function">start</span>:155 <span class="token operator">-</span>Server started <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> 
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:28:11<span class="token punctuation">.</span>138642684Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:28:11<span class="token punctuation">.</span>137 INFO <span class="token namespace">[ShutdownHook]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>core<span class="token punctuation">.</span>rpc<span class="token punctuation">.</span>netty<span class="token punctuation">.</span>RpcServer<span class="token punctuation">.</span>destroy:69 <span class="token operator">-</span>destroyed rpcServer
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:28:13<span class="token punctuation">.</span>319503007Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:28:13<span class="token punctuation">.</span>316 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>server<span class="token punctuation">.</span>ParameterParser<span class="token punctuation">.</span>init:90 <span class="token operator">-</span>The server is running in container<span class="token punctuation">.</span>
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:28:13<span class="token punctuation">.</span>378379605Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:28:13<span class="token punctuation">.</span>376 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>config<span class="token punctuation">.</span>FileConfiguration<span class="token punctuation">.</span><init>:121 <span class="token operator">-</span>The configuration file used is registry<span class="token punctuation">.</span>conf
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:28:13<span class="token punctuation">.</span>400914066Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:28:13<span class="token punctuation">.</span>400 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>config<span class="token punctuation">.</span>FileConfiguration<span class="token punctuation">.</span><init>:121 <span class="token operator">-</span>The configuration file used is file<span class="token punctuation">.</span>conf
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:28:14<span class="token punctuation">.</span>683544245Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:28:14<span class="token punctuation">.</span>682 INFO <span class="token namespace">[main]</span>com<span class="token punctuation">.</span>alibaba<span class="token punctuation">.</span>druid<span class="token punctuation">.</span>pool<span class="token punctuation">.</span>DruidDataSource<span class="token punctuation">.</span>init:947 <span class="token operator">-</span><span class="token punctuation">{</span>dataSource<span class="token operator">-</span>1<span class="token punctuation">}</span> inited
    2021<span class="token operator">-</span>08<span class="token operator">-</span>19T03:28:14<span class="token punctuation">.</span>901163968Z 2021<span class="token operator">-</span>08<span class="token operator">-</span>19 03:28:14<span class="token punctuation">.</span>900 INFO <span class="token namespace">[main]</span>io<span class="token punctuation">.</span>seata<span class="token punctuation">.</span>core<span class="token punctuation">.</span>rpc<span class="token punctuation">.</span>netty<span class="token punctuation">.</span>RpcServerBootstrap<span class="token punctuation">.</span><span class="token function">start</span>:155 <span class="token operator">-</span>Server started <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre> 
  <h5>将修改好的配置文件拷贝到docker容器</h5> 
  <pre><code class="prism language-powershell">	 nohup <span class="token punctuation">.</span><span class="token operator">/</span>seata<span class="token operator">-</span>server<span class="token punctuation">.</span>sh <span class="token operator">-</span>h ip <span class="token operator">-</span>p 8091  >log<span class="token punctuation">.</span>out 2>1 &
</code></pre> 
  <h5>解决脚本运行失败问题</h5> 
  <pre><code class="prism language-powershell">	 sh nacos<span class="token operator">-</span>config<span class="token punctuation">.</span>sh <span class="token operator">-</span>h ip <span class="token operator">-</span>p 8848 <span class="token operator">-</span>g SEATA_GROUP <span class="token operator">-</span>t 7c43eda4<span class="token operator">-</span>1e24<span class="token operator">-</span>4e77<span class="token operator">-</span>89ef<span class="token operator">-</span>9b7efc5c889e
</code></pre> 
  <h5>开放seata端口</h5> 
  <pre><code class="prism language-powershell">	 firewall<span class="token operator">-</span>cmd <span class="token operator">--</span><span class="token function">add-port</span>=8091<span class="token operator">/</span>tcp <span class="token operator">--</span>permanent
    firewall<span class="token operator">-</span>cmd <span class="token operator">--</span>reload
</code></pre> 
  <h2>docker安装mongo</h2> 
  <h5>拉取镜像</h5> 
  <pre><code class="prism language-powershell">	docker pull mongo
</code></pre> 
  <h5>创建对应文件夹 和 配置文件</h5> 
  <pre><code>/usr/local/docker/mongo/data  /usr/local/docker/mongo/conf /usr/local/docker/mongo/log
conf 下创建mongodb.conf 配置文件 内容如下:
</code></pre> 
  <pre><code class="prism language-powershell">port=27017
<span class="token comment">#数据库文件存放目录</span>
dbpath=<span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>docker<span class="token operator">/</span>mongo<span class="token operator">/</span><span class="token keyword">data</span>
<span class="token comment">#日志文件存放路径</span>
logpath=<span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>docker<span class="token operator">/</span>mongo<span class="token operator">/</span>log
<span class="token comment">#使用追加方式写日志</span>
logappend=true
<span class="token comment">#以守护线程的方式运行,创建服务器进程</span>
fork=true
<span class="token comment">#最大同时连接数</span>
maxConns=100
<span class="token comment">#不启用验证</span>
<span class="token comment">#noauth=true</span>
<span class="token comment">#每次写入会记录一条操作日志</span>
journal=true
<span class="token comment">#存储引擎有mmapv1、wiredTiger、mongorocks</span>
storageEngine=wiredTiger
<span class="token comment">#访问IP</span>
bind_ip=0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0
<span class="token comment">#用户验证</span>
<span class="token comment">#auth=true</span>
</code></pre> 
  <h5>启动容器</h5> 
  <pre><code class="prism language-powershell">docker run <span class="token operator">-</span>d <span class="token operator">-</span>p 27017:27017 <span class="token operator">-</span>v <span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>docker<span class="token operator">/</span>mongo<span class="token operator">/</span><span class="token keyword">data</span>:<span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>db <span class="token operator">-</span>v <span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>docker<span class="token operator">/</span>mongo<span class="token operator">/</span>conf:<span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>conf <span class="token operator">-</span>v <span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>docker<span class="token operator">/</span>mongo<span class="token operator">/</span>log:<span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>log <span class="token operator">--</span>name mongo mongo
</code></pre> 
  <h2>docker安装 rabbitmq</h2> 
  <h5>拉取镜像</h5> 
  <pre><code class="prism language-powershell">docker pull rabbitmq:management
</code></pre> 
  <h5>启动容器</h5> 
  <pre><code class="prism language-powershell">docker run <span class="token operator">-</span>d <span class="token operator">--</span>name rabbitmq <span class="token operator">-</span>e RABBITMQ_DEFAULT_USER=admin <span class="token operator">-</span>e RABBITMQ_DEFAULT_PASS=kRa9Pj3ItJO12c7S <span class="token operator">-</span>p 15672:15672 <span class="token operator">-</span>p 5672:5672 <span class="token operator">-</span>p 25672:25672 <span class="token operator">-</span>p 61613:61613 <span class="token operator">-</span>p 1883:1883 rabbitmq:management
</code></pre> 
  <pre><code>启动之后 通过http:ip:15672 访问   用户名:admin 密码:kRa9Pj3ItJO12c7S  如果没有设置RABBITMQ_DEFAULT_PASS 
和RABBITMQ_DEFAULT_USER 的话 用户名和密码 都是guest
</code></pre> 
  <h2>docker 安装orcale11g</h2> 
  <h5>拉取镜像</h5> 
  <pre><code class="prism language-powershell">docker pull registry<span class="token punctuation">.</span>cn<span class="token operator">-</span>hangzhou<span class="token punctuation">.</span>aliyuncs<span class="token punctuation">.</span>com<span class="token operator">/</span>helowin<span class="token operator">/</span>oracle_11g
</code></pre> 
  <h5>启动容器</h5> 
  <pre><code class="prism language-powershell">docker run <span class="token operator">-</span>d <span class="token operator">-</span>p 1521:1521 <span class="token operator">-</span>v <span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>oracle:<span class="token operator">/</span><span class="token keyword">data</span><span class="token operator">/</span>oracle <span class="token operator">--</span>name oracle11 registry<span class="token punctuation">.</span>cn<span class="token operator">-</span>hangzhou<span class="token punctuation">.</span>aliyuncs<span class="token punctuation">.</span>com<span class="token operator">/</span>helowin<span class="token operator">/</span>oracle_11g
</code></pre> 
  <h5>进入容器</h5> 
  <pre><code class="prism language-powershell"><span class="token comment">#进入容器</span>
docker exec <span class="token operator">-</span>it oracle11 <span class="token operator">/</span>bin<span class="token operator">/</span>bash
<span class="token comment">#切换用户 root 密码 helowin</span>
su root
<span class="token comment">#编辑profile配置文件 在文件最后面加上以下内容</span>
export ORACLE_HOME=<span class="token operator">/</span>home<span class="token operator">/</span>oracle<span class="token operator">/</span>app<span class="token operator">/</span>oracle<span class="token operator">/</span>product<span class="token operator">/</span>11<span class="token punctuation">.</span>2<span class="token punctuation">.</span>0<span class="token operator">/</span>dbhome_2
export ORACLE_SID=helowin
export PATH=<span class="token variable">$ORACLE_HOME</span><span class="token operator">/</span>bin:<span class="token variable">$PATH</span>
<span class="token comment">#加载环境变量</span>
source <span class="token operator">/</span>etc<span class="token operator">/</span>profile
<span class="token comment">#创建软连接</span>
ln <span class="token operator">-</span>s <span class="token variable">$ORACLE_HOME</span><span class="token operator">/</span>bin<span class="token operator">/</span>sqlplus <span class="token operator">/</span>usr<span class="token operator">/</span>bin
<span class="token comment">#切换到oracle用户 注意空格-前后都有空格</span>
 su <span class="token operator">-</span> oracle
<span class="token comment">#登录sqlplus并修改sys、system用户密码</span>
sqlplus <span class="token operator">/</span>nolog
conn <span class="token operator">/</span>as sysdba
<span class="token comment"># 修改system用户账号密码</span>
alter user system identified by system<span class="token punctuation">;</span>
<span class="token comment">#修改sys用户账号密码</span>
alter user sys identified by system<span class="token punctuation">;</span>
<span class="token comment">#创建内部管理员账号密码</span>
create user test identified by test<span class="token punctuation">;</span>
<span class="token comment">#将dba权限授权给内部管理员账号和密码</span>
grant connect<span class="token punctuation">,</span>resource<span class="token punctuation">,</span>dba to test<span class="token punctuation">;</span>
<span class="token comment">#修改密码规则策略为密码永不过期</span>
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED<span class="token punctuation">;</span> 
<span class="token comment">#修改数据库最大连接数据</span>
alter system <span class="token function">set</span> processes=1000 scope=spfile<span class="token punctuation">;</span>
<span class="token comment">#重启数据库</span>
conn <span class="token operator">/</span>as sysdba
<span class="token comment">#关闭数据库</span>
shutdown immediate<span class="token punctuation">;</span>
<span class="token comment">#启动数据库</span>
startup<span class="token punctuation">;</span>
<span class="token comment">#退出</span>
<span class="token keyword">exit</span><span class="token punctuation">;</span>
</code></pre> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1647467800937140224"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(linux,linux,docker)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1882599955357560832.htm"
                           title="如何理解Linux的根目录?与widows系统盘有何区别?" target="_blank">如何理解Linux的根目录?与widows系统盘有何区别?</a>
                        <span class="text-muted">学堂在线</span>
<a class="tag" taget="_blank" href="/search/Linux%E7%B3%BB%E7%BB%9F/1.htm">Linux系统</a><a class="tag" taget="_blank" href="/search/windows%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/1.htm">windows操作系统</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/php/1.htm">php</a>
                        <div>文章目录Linux根目录1.Linux根目录的理解2.根目录空间大小限制Linux根目录与Windows系统盘(通常指C盘)对比:1.目录结构和组织方式2.文件系统特点3.系统启动和运行机制4.空间管理方式Linux根目录`1.Linux根目录的理解定义:在Linux系统中,根目录(用符号“/”表示)是整个文件系统的最顶层目录。它是所有其他目录和文件的起点。就像一棵大树的树根一样,所有的分支(其他</div>
                    </li>
                    <li><a href="/article/1882596676158418944.htm"
                           title="[4-3-2].Redis笔记" target="_blank">[4-3-2].Redis笔记</a>
                        <span class="text-muted">1.01^1000</span>
<a class="tag" taget="_blank" href="/search/%E4%B8%83/1.htm">七</a><a class="tag" taget="_blank" href="/search/%E4%B8%AD%E9%97%B4%E4%BB%B6/1.htm">中间件</a><a class="tag" taget="_blank" href="/search/redis/1.htm">redis</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a>
                        <div>后端学习大纲第1步:Redis初识[0401].第01节:Redis初识[0402].第02节:Redis配置文件第2步:搭建单点环境[0403].第03节:在Linux环境中搭建Redis6.2.8环境[0404].第04节:在Linux环境中搭建Redis7.0.0环境(与6.2.8过程类似)第3步:Redis开发操作:3.1.数据类型介绍:[0409].第09节:Redis中的键(KEY)常</div>
                    </li>
                    <li><a href="/article/1882594146607230976.htm"
                           title="linux 权限的设置与查看 chmod 与 ls -l 等相关命令" target="_blank">linux 权限的设置与查看 chmod 与 ls -l 等相关命令</a>
                        <span class="text-muted">drebander</span>
<a class="tag" taget="_blank" href="/search/%E8%84%9A%E6%9C%AC/1.htm">脚本</a>
                        <div>本文为转载文章出处:http://blog.csdn.net/sinchb/article/details/11746427本文着重介绍与Linux文件权限相关等问题,比如用户与用户组,文件权限,文件默认权限和文件特殊权限等。Linux为什么需要那么多的权限限制呢?其实这些都是为了“安全起见”啊!如果你的Linux系统里存了你给心上人写的情书,或者是某亚洲岛国的动作大片,你总不希望谁都可以翻翻看吧</div>
                    </li>
                    <li><a href="/article/1882584052838494208.htm"
                           title="【成人版python基础入门】第一章 开篇——与 Python 的浪漫相遇" target="_blank">【成人版python基础入门】第一章 开篇——与 Python 的浪漫相遇</a>
                        <span class="text-muted">精通代码大仙</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>开篇——与Python的浪漫相遇在这个数字化日益menjadi成主流的时代,掌握一门编程语言似乎已经成为了每个人不可推卸的责任。如果你正在寻找一种既强大又易学的语言,那么Python就是你心中的“白月光”。这不仅仅是因为它简洁明了的语法,良好的社区支持,更因为它那无可比拟的跨平台性——无论你的电脑是Windows、MacOS还是Linux,Python都将无差别地陪伴在你身边。现在,让我们一起进入</div>
                    </li>
                    <li><a href="/article/1882583170063331328.htm"
                           title="Linux上安装JDK环境变量配置" target="_blank">Linux上安装JDK环境变量配置</a>
                        <span class="text-muted">jamesge2010</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>jdk:jdk-8u241-linux-x64.tar.gz1,makedir/usr/local/java(建立java目录)2,上传JDK至java目录3,tarzxvfjdk-8u241-linux-x64.tar.gz(解压jdk)4,在命令行输入:vi/etc/profile在最后添加如下内容exportJAVA_HOME=/usr/local/java/jdk1.8.0_241expo</div>
                    </li>
                    <li><a href="/article/1882583170583425024.htm"
                           title="Linux的几个特殊权限" target="_blank">Linux的几个特殊权限</a>
                        <span class="text-muted">jamesge2010</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>1.ACL权限2.SetUID、SetGID、StickyBit权限3.chattr权限4.sudo权限1.ACL权限ACL权限指给文件或目录除用户、组和其他人外额外赋予的权限,赋予权限的用户既不是当前文件或目录的所属用户和所属组也不是其他人。所以给予的ACL权限不受ll显示的rwx限制,给予ACL权限后在文件或目录后会有+标记。(1)查看分区ACL权限是否开启(默认为开启)dumpe2fs-h/</div>
                    </li>
                    <li><a href="/article/1882566523214688256.htm"
                           title="【PostgreSQL实战1】基于openEuler部署PostgreSQL" target="_blank">【PostgreSQL实战1】基于openEuler部署PostgreSQL</a>
                        <span class="text-muted">云计算老王</span>
<a class="tag" taget="_blank" href="/search/postgresql/1.htm">postgresql</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a>
                        <div>【PostgreSQL实战1】基于openEuler部署PostgreSQL目录【PostgreSQL实战1】基于openEuler部署PostgreSQL前言一、PostgreSQL是什么?二、环境准备2.1操作系统2.2内存2.3CPU2.4关闭selinux2.5关闭防火墙三、部署安装3.1创建用户名3.2创建目录3.3安装依赖3.4安装包下载3.5编译安装3.6配置环境变量3.7初始化3.</div>
                    </li>
                    <li><a href="/article/1882554914710810624.htm"
                           title="linux下使用脚本实现对进程的内存占用自动化监测" target="_blank">linux下使用脚本实现对进程的内存占用自动化监测</a>
                        <span class="text-muted">浪小满</span>
<a class="tag" taget="_blank" href="/search/%E5%B8%B8%E7%94%A8%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3/1.htm">常用问题解决</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%87%AA%E5%8A%A8%E5%8C%96/1.htm">自动化</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E5%86%85%E5%AD%98%E5%8D%A0%E7%94%A8%E6%83%85%E5%86%B5%E7%9B%91%E6%B5%8B/1.htm">内存占用情况监测</a>
                        <div>linux系统中常用cat/proc/{pid}/status和pmap-x{pid}来监测某个进程的内存资源占用情况。其中注意各参数的含义如下:VmSize:表示进程当前虚拟内存大小VmPeak:表示进程所占用最大虚拟内存大小VmRSS:表示进程当前占用物理内存的大小(与procrank中的RSS,pmap中的RSS一样)VmLck:表示被锁定的内存大小VmHWM:表示进程所占用物理内存的峰值V</div>
                    </li>
                    <li><a href="/article/1882541555684798464.htm"
                           title="docker如何学习与使用入门" target="_blank">docker如何学习与使用入门</a>
                        <span class="text-muted">杨半仙儿还未成仙儿</span>
<a class="tag" taget="_blank" href="/search/java%E4%B8%93%E6%A0%8F/1.htm">java专栏</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>学习和使用Docker的入门可以分为以下几个步骤。Docker是一个功能强大的工具,通过容器化技术使得应用开发和部署更加高效、简便。以下是一个逐步的学习路径,帮助你从入门到熟练掌握Docker。1.理解容器化的概念在学习Docker之前,先了解容器化的基本概念是非常重要的。容器化是一种将应用及其依赖项(如库、工具、配置文件等)打包到独立环境中的技术,这样容器中的应用就可以在不同环境下稳定运行。容器</div>
                    </li>
                    <li><a href="/article/1882540035966824448.htm"
                           title="在Linux系统中删除文件和目录的具体命令是什么?" target="_blank">在Linux系统中删除文件和目录的具体命令是什么?</a>
                        <span class="text-muted">若木胡</span>
<a class="tag" taget="_blank" href="/search/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%9F%A5%E8%AF%86/1.htm">计算机知识</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>在Linux系统中删除文件和目录的命令一、删除文件rm命令(基本用法)语法:rm[选项]文件路径。例如,要删除当前目录下的test.txt文件,可在终端输入rmtest.txt。注意事项:这是一个比较危险的命令,因为文件一旦被删除就很难恢复。在执行删除操作之前,最好确认一下文件是否真的不再需要。强制删除(-f选项)功能:通常情况下,如果文件是只读的,rm命令会提示你是否要删除。使用-f选项可以强制</div>
                    </li>
                    <li><a href="/article/1882533607172534272.htm"
                           title="磁盘满了影响mysql性能吗,Linux Server磁盘满导致的mysql数据库错误" target="_blank">磁盘满了影响mysql性能吗,Linux Server磁盘满导致的mysql数据库错误</a>
                        <span class="text-muted">妙面爸</span>
<a class="tag" taget="_blank" href="/search/%E7%A3%81%E7%9B%98%E6%BB%A1%E4%BA%86%E5%BD%B1%E5%93%8Dmysql%E6%80%A7%E8%83%BD%E5%90%97/1.htm">磁盘满了影响mysql性能吗</a>
                        <div>因为博主在服务器上安装了一些文件存储服务,有几次出现了文件占满磁盘后导致数据库出错,在删除了多余文件之后也无法重启数据库。所有与数据库相关的服务均报错无法启动,比如Wordpress的数据库连接错误,Nextcloud的500错误等。在磁盘满后,请不要立即重启服务器或数据库服务,应首先清理出磁盘空间,让数据库服务将缓存写入后再关闭或重启!若直接重启就会导致博主遇到的这种错误。以下内容仅供参考,请根</div>
                    </li>
                    <li><a href="/article/1882533229072805888.htm"
                           title="linux环境下 xampp mysql 启动失败问题排查 日志文件过大占用存储空间导致网站瘫痪..." target="_blank">linux环境下 xampp mysql 启动失败问题排查 日志文件过大占用存储空间导致网站瘫痪...</a>
                        <span class="text-muted">weixin_34166847</span>
<a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/1.htm">操作系统</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                        <div>问题现象网站莫名其妙的连接不上mysql了,导致网站瘫痪;没有改任何程序,怎么回事呢?马上用xshell和xftp工具连接linux服务器来排查问题启动xamppmysql/opt/lampp/lamppstartmysql启动xamppmysql![/opt/lampp/bin/mysql.server:line260:kill:(11145)-Nosuchprocess](https://up</div>
                    </li>
                    <li><a href="/article/1882525658496692224.htm"
                           title="Git 高亮增强插件 diff-so-fancy" target="_blank">Git 高亮增强插件 diff-so-fancy</a>
                        <span class="text-muted">Gilgod</span>
<a class="tag" taget="_blank" href="/search/git/1.htm">git</a>
                        <div>macorlinuxhttps://github.com/so-fancy/diff-so-fancy#cd/usr/local/binwgethttps://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy#chmod777/usr/local/bin/d</div>
                    </li>
                    <li><a href="/article/1882520992832614400.htm"
                           title="Python进阶—高级语法" target="_blank">Python进阶—高级语法</a>
                        <span class="text-muted">Echo.py</span>
<a class="tag" taget="_blank" href="/search/Python%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95/1.htm">Python基础语法</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>目录文章目录目录1、在==和is之间选择2、元组的相对不可变性3、字典中的键映射多个值4、Linux5、python中字典的key要求6、编码7、进制之间的转换8、关系运算符(时间处理)9、时间处理模块❶常用时间处理方法❷转化为13位时间戳10、三元运算符11、成员运算符12、For循环机制13、变量的分类14、闭包(函数的嵌套)15、函数(方法)的执行流程16、匿名函数17、Django和Fla</div>
                    </li>
                    <li><a href="/article/1882509518764568576.htm"
                           title="Docker入门学习" target="_blank">Docker入门学习</a>
                        <span class="text-muted">_Eden_</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>一、容器1.将单个操作系统中的资源划分到孤立的组中,在孤立的组中平衡有冲突的资源使用需求2.Docker提供了容器管理的工具可以无需关注底层操作,使用效果类似于轻量级的虚拟机,并且容器的创建和停止相对于虚拟机来说比较快;虽然不同容器之间为了保证一定的安全性采取安全隔离,但是在某些情况下需要消息共享灯可以利用通信机制进行通信二、虚拟化虚拟化的核心是对资源进行抽象呈现出来来打破实体结构之间不可切割的障</div>
                    </li>
                    <li><a href="/article/1882499564213170176.htm"
                           title="使用 Docker 部署 MySQL 服务并实现远程连接" target="_blank">使用 Docker 部署 MySQL 服务并实现远程连接</a>
                        <span class="text-muted">漓°</span>
<a class="tag" taget="_blank" href="/search/Docker/1.htm">Docker</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/bash/1.htm">bash</a>
                        <div>简介DockerDocker是一个开放源代码软件,是一个开放平台,用于开发应用、交付(shipping)应用、运行应用。Docker允许用户将基础设施(Infrastructure)中的应用单独分割出来,形成更小的颗粒(容器),从而提高交付软件的速度。Docker容器与虚拟机类似,但二者在原理上不同。容器是将操作系统层虚拟化,虚拟机则是虚拟化硬件,因此容器更具有便携性、高效地利用服务器。容器更多的</div>
                    </li>
                    <li><a href="/article/1882497422274392064.htm"
                           title="在WSL 2 (Ubuntu 22.04)安装Docker Ce 启动错误解决" target="_blank">在WSL 2 (Ubuntu 22.04)安装Docker Ce 启动错误解决</a>
                        <span class="text-muted">梦想画家</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a><a class="tag" taget="_blank" href="/search/%E5%B7%A5%E5%85%B7%E8%BD%AF%E4%BB%B6/1.htm">工具软件</a><a class="tag" taget="_blank" href="/search/ubuntu/1.htm">ubuntu</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/wsl2/1.htm">wsl2</a>
                        <div>查看WSL版本在Windows命令提示符(CMD)或PowerShell中,你可以使用以下命令来查看已安装的WSL发行版及其版本信息:wsl-l-v(base)PSC:\Users\Lenovo>wsl-l-vNAMESTATEVERSION*Ubuntu-22.04Running2docker启动报错failedtostartdaemon:Errorinitializingnetworkcont</div>
                    </li>
                    <li><a href="/article/1882496036270829568.htm"
                           title="Navicat 连接远程服务器里 docker 中的 mysql(已解决)" target="_blank">Navicat 连接远程服务器里 docker 中的 mysql(已解决)</a>
                        <span class="text-muted">辞寒oo</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a>
                        <div>1.开启端口映射在docker中,我们需要将允许外界访问的端口通过配置文件映射出来,本文不需要将3306端口映射,但是该部分还是有实际用途的,因此在此记录。着急可以跳过第一部分。在创建并运行镜像的时候,我们会初始化参数,例如:dockerrun-p20000:22-p3000:3000--namemy_docker_sercer-itddocker_image:1.0#创建并运行docker_im</div>
                    </li>
                    <li><a href="/article/1882495280226562048.htm"
                           title="大模型管理工具:Ollama" target="_blank">大模型管理工具:Ollama</a>
                        <span class="text-muted">m0_37559973</span>
<a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%A8%A1%E5%9E%8B/1.htm">大模型</a><a class="tag" taget="_blank" href="/search/Ollama/1.htm">Ollama</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%A8%A1%E5%9E%8B%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7/1.htm">大模型管理工具</a>
                        <div>目录一、Ollama介绍二、Linux安装Ollama2.1一键安装2.2手动安装三、使用Ollama3.1配置模型下载路径3.2运行模型3.3常用命令四、模型管理4.1官方模型库4.2导入自定义模型五、RESTAPI六、WebUI一、Ollama介绍Ollama是一个基于Go语言开发的可以本地运行大模型的开源框架,同时提供RESTAPI管理和使用大模型。二、Linux安装Ollama2.1一键安</div>
                    </li>
                    <li><a href="/article/1882489857075376128.htm"
                           title="Git的下载与安装及常用命令" target="_blank">Git的下载与安装及常用命令</a>
                        <span class="text-muted">小宝哥Code</span>
<a class="tag" taget="_blank" href="/search/Unity%E5%BC%95%E6%93%8E/1.htm">Unity引擎</a><a class="tag" taget="_blank" href="/search/git/1.htm">git</a>
                        <div>Git的下载与安装指南Git是目前广泛使用的分布式版本控制系统,适用于代码管理和团队协作。以下是Git的下载与安装步骤。一、Git下载1.官方网站下载访问Git官方网站下载页面:GitDownloads,选择适合您操作系统的版本。2.选择操作系统Windows:点击下载Windows版本。MacOS:点击下载MacOS版本。Linux/Unix:根据发行版选择包管理器安装。二、Git安装1.Win</div>
                    </li>
                    <li><a href="/article/1882489854969835520.htm"
                           title="Sqlite+Springboot配置相对路径和绝对路径 yml Linux" target="_blank">Sqlite+Springboot配置相对路径和绝对路径 yml Linux</a>
                        <span class="text-muted">小诺大人</span>
<a class="tag" taget="_blank" href="/search/springboot/1.htm">springboot</a><a class="tag" taget="_blank" href="/search/sqlite3/1.htm">sqlite3</a><a class="tag" taget="_blank" href="/search/sqlite/1.htm">sqlite</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/maven/1.htm">maven</a>
                        <div>Sqlite配置相对路径和绝对路径yml相对路径(windows和Linux通用)在resource资源文件夹下新建文件夹db里面存放demo.db数据库spring.datasource.driver-class-name=org.sqlite.JDBCspring.datasource.url=jdbc:sqlite::resource:db/demo.dbspring.datasource.</div>
                    </li>
                    <li><a href="/article/1882484558381772800.htm"
                           title="【包邮送书】你好!Python" target="_blank">【包邮送书】你好!Python</a>
                        <span class="text-muted">Mindtechnist</span>
<a class="tag" taget="_blank" href="/search/%E7%B2%89%E4%B8%9D%E7%A6%8F%E5%88%A9/1.htm">粉丝福利</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C/1.htm">网络</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/1.htm">机器学习</a>
                        <div>欢迎关注博主Mindtechnist或加入【智能科技社区】一起学习和分享Linux、C、C++、Python、Matlab,机器人运动控制、多机器人协作,智能优化算法,滤波估计、多传感器信息融合,机器学习,人工智能等相关领域的知识和技术。关注公粽号《机器和智能》回复关键词“python项目实战”即可获取美哆商城视频资源!博主介绍:CSDN博客专家,CSDN优质创作者,CSDN实力新星,CSDN内容</div>
                    </li>
                    <li><a href="/article/1882484432074502144.htm"
                           title="解决 WSL 2 中 Ubuntu 22.04 安装 Docker 后无法启动的问题" target="_blank">解决 WSL 2 中 Ubuntu 22.04 安装 Docker 后无法启动的问题</a>
                        <span class="text-muted">CodeDevMaster</span>
<a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Docker/1.htm">Docker</a><a class="tag" taget="_blank" href="/search/ubuntu/1.htm">ubuntu</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>问题场景安装Docker后,执行sudoservicedockerstart启动Docker,提示启动成功root@Dev:~#sudoservicedockerstart*StartingDocker:docker[OK]执行sudoservicedockerstatus查看Docker状态,发现Docker已停止运行root@Dev:~#sudoservicedockerstatus*Dock</div>
                    </li>
                    <li><a href="/article/1882482164013002752.htm"
                           title="用C在安卓手机上开发" target="_blank">用C在安卓手机上开发</a>
                        <span class="text-muted">zhumin726</span>
<a class="tag" taget="_blank" href="/search/c%E8%AF%AD%E8%A8%80/1.htm">c语言</a><a class="tag" taget="_blank" href="/search/%E5%AE%89%E5%8D%93/1.htm">安卓</a>
                        <div>在安卓手机上进行C语言开发需要一些特定的工具和设置。通常,C语言用于编写安卓的底层代码,如性能关键的模块或与硬件直接交互的部分。我们可以使用AndroidNDK(NativeDevelopmentKit)来开发这些部分。以下是如何在安卓手机上使用C进行开发的详细步骤。工具和环境配置1.安装TermuxTermux是一个Android终端仿真器,可以让您在Android设备上运行Linux环境。我们</div>
                    </li>
                    <li><a href="/article/1882480271291379712.htm"
                           title="嵌入式基础篇--了解和搭建开发环境" target="_blank">嵌入式基础篇--了解和搭建开发环境</a>
                        <span class="text-muted">雯宝</span>
<a class="tag" taget="_blank" href="/search/microsoft/1.htm">microsoft</a>
                        <div>文章目录1.开发环境搭建2.LinuxC编程入门3.ARMV7和ARMV8架构4.ARM汇编5.BSP工程管理1.开发环境搭建1.虚拟机Vmware的安装:在PC主机下安装Linux系统,方便切换windows和Linux系统2.在虚拟机Vmware中安装Ubuntu操作系统:便于基于Linux系统的开发3.Ubuntu交叉编译工具链安装4.SourceInsight安装:用于在Windows下代</div>
                    </li>
                    <li><a href="/article/1882474724865404928.htm"
                           title="Linux 运维" target="_blank">Linux 运维</a>
                        <span class="text-muted">Li huichao</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>Linux运维tarnetstatfirewall-cmd(防火墙)yumnpmtar解压.tar:tar-xvf文件.tar解压.tar.gz、.tgz:tar-xvzf文件.tar.gz解压.tar.bz2:tar-xvjf文件.tar.bz2解压.tar.xz:tar-xvJf文件.tar.xz解压并指定解压目录:tar-xvJf文件.tar.xz-C目标目录netstat获取所有应用程序监</div>
                    </li>
                    <li><a href="/article/1882471827800911872.htm"
                           title="在docker中安装FastDFS容器,并且阿里云服务器配置" target="_blank">在docker中安装FastDFS容器,并且阿里云服务器配置</a>
                        <span class="text-muted">童小纯</span>
<a class="tag" taget="_blank" href="/search/%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2%28%E9%98%BF%E9%87%8C%E4%BA%91%E7%89%88%29/1.htm">项目部署(阿里云版)</a><a class="tag" taget="_blank" href="/search/%E4%B8%AD%E9%97%B4%E4%BB%B6%E5%A4%A7%E5%85%A8---%E5%85%A8%E9%9D%A2%E8%AF%A6%E8%A7%A3/1.htm">中间件大全---全面详解</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E9%98%BF%E9%87%8C%E4%BA%91/1.htm">阿里云</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>1、拉取FastDFS镜像dockerpulldelron/fastdfs2、创建tracker容器dockerrun-dti--network=host--nametracker--privileged=true-v/var/fdfs/tracker:/var/fdfs-v/etc/localtime:/etc/localtimedelron/fastdfstracker3、创建storage容</div>
                    </li>
                    <li><a href="/article/1882471069227479040.htm"
                           title="阿里云docker镜像仓库" target="_blank">阿里云docker镜像仓库</a>
                        <span class="text-muted">Ai君臣</span>
<a class="tag" taget="_blank" href="/search/%E9%98%BF%E9%87%8C%E4%BA%91/1.htm">阿里云</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E8%AE%A1%E7%AE%97/1.htm">云计算</a>
                        <div>一、阿里云控制台搜:容器镜像服务二、选个人版,企业版收费设置命名空间andy设置仓库名例如llama三、使用1、登录dockerlogin--username=***registry.cn-hangzhou.aliyuncs.com2、本地镜像打个tagdockertag[ImageId]registry.cn-hangzhou.aliyuncs.com/命名空间/llama:v13、推送dock</div>
                    </li>
                    <li><a href="/article/1882471069701435392.htm"
                           title="Linux 使用 docker 安装 Nginx 代理服务器" target="_blank">Linux 使用 docker 安装 Nginx 代理服务器</a>
                        <span class="text-muted">liupeng_blog</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/nginx/1.htm">nginx</a>
                        <div>文章目录个人知识库Nginx简介环境要求一.新建文件目录1.1.新建docker-compose.yml1.2.编写docker-compose.yml二.文件赋权限三、新建nginx.conf四.启动容器4.1.启动并下载镜像4.2.停止并删除容器五.访问Nginx六.DockerHub官网更多知识平台个人知识库云网站:http://www.liupeng.cloud语雀:https://www</div>
                    </li>
                    <li><a href="/article/1882470184837509120.htm"
                           title="docker pull 镜像失败 Error response from daemon: Get “https://registry-1.docker.io/v2/“: net/http: reque" target="_blank">docker pull 镜像失败 Error response from daemon: Get “https://registry-1.docker.io/v2/“: net/http: reque</a>
                        <span class="text-muted">jjw_zyfx</span>
<a class="tag" taget="_blank" href="/search/docker%2Fk8s/1.htm">docker/k8s</a><a class="tag" taget="_blank" href="/search/Java/1.htm">Java</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/http/1.htm">http</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>解决方法:多加几个docker的镜像源,步骤如下:使用vim打开/etc/docker/daemon.json这个文件vim/etc/docker/daemon.json填写内容如下:{"registry-mirrors":["https://docker.211678.top","https://docker.1panel.live","https://hub.rat.dev","https:/</div>
                    </li>
                                <li><a href="/article/4.htm"
                                       title="java的(PO,VO,TO,BO,DAO,POJO)" target="_blank">java的(PO,VO,TO,BO,DAO,POJO)</a>
                                    <span class="text-muted">Cb123456</span>
<a class="tag" taget="_blank" href="/search/VO/1.htm">VO</a><a class="tag" taget="_blank" href="/search/TO/1.htm">TO</a><a class="tag" taget="_blank" href="/search/BO/1.htm">BO</a><a class="tag" taget="_blank" href="/search/POJO/1.htm">POJO</a><a class="tag" taget="_blank" href="/search/DAO/1.htm">DAO</a>
                                    <div>转: 
http://www.cnblogs.com/yxnchinahlj/archive/2012/02/24/2366110.html 
  
------------------------------------------------------------------- 
 O/R Mapping 是 Object Relational Mapping(对象关系映</div>
                                </li>
                                <li><a href="/article/131.htm"
                                       title="spring ioc原理(看完后大家可以自己写一个spring)" target="_blank">spring ioc原理(看完后大家可以自己写一个spring)</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>         最近,买了本Spring入门书:spring In Action 。大致浏览了下感觉还不错。就是入门了点。Manning的书还是不错的,我虽然不像哪些只看Manning书的人那样专注于Manning,但怀着崇敬 的心情和激情通览了一遍。又一次接受了IOC 、DI、AOP等Spring核心概念。 先就IOC和DI谈一点我的看法。IO</div>
                                </li>
                                <li><a href="/article/258.htm"
                                       title="MyEclipse 2014中Customize Persperctive设置无效的解决方法" target="_blank">MyEclipse 2014中Customize Persperctive设置无效的解决方法</a>
                                    <span class="text-muted">Kai_Ge</span>
<a class="tag" taget="_blank" href="/search/MyEclipse2014/1.htm">MyEclipse2014</a>
                                    <div>高高兴兴下载个MyEclipse2014,发现工具条上多了个手机开发的按钮,心生不爽就想弄掉他!
结果发现Customize Persperctive失效!!
有说更新下就好了,可是国内Myeclipse访问不了,何谈更新...
so~这里提供了更新后的一下jar包,给大家使用! 
1、将9个jar复制到myeclipse安装目录\plugins中
2、删除和这9个jar同包名但是版本号较</div>
                                </li>
                                <li><a href="/article/385.htm"
                                       title="SpringMvc上传" target="_blank">SpringMvc上传</a>
                                    <span class="text-muted">120153216</span>
<a class="tag" taget="_blank" href="/search/springMVC/1.htm">springMVC</a>
                                    <div>  
@RequestMapping(value = WebUrlConstant.UPLOADFILE)
	@ResponseBody
	public Map<String, Object> uploadFile(HttpServletRequest request,HttpServletResponse httpresponse) {
		try {
			// </div>
                                </li>
                                <li><a href="/article/512.htm"
                                       title="Javascript----HTML DOM 事件" target="_blank">Javascript----HTML DOM 事件</a>
                                    <span class="text-muted">何必如此</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a>
                                    <div>HTML DOM 事件允许Javascript在HTML文档元素中注册不同事件处理程序。 
 
事件通常与函数结合使用,函数不会在事件发生前被执行! 
 
 
注:DOM: 指明使用的 DOM 属性级别。 
 
1.鼠标事件 
属性               </div>
                                </li>
                                <li><a href="/article/639.htm"
                                       title="动态绑定和删除onclick事件" target="_blank">动态绑定和删除onclick事件</a>
                                    <span class="text-muted">357029540</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/jquery/1.htm">jquery</a>
                                    <div>因为对JQUERY和JS的动态绑定事件的不熟悉,今天花了好久的时间才把动态绑定和删除onclick事件搞定!现在分享下我的过程。 
 
     在我的查询页面,我将我的onclick事件绑定到了tr标签上同时传入当前行(this值)参数,这样可以在点击行上的任意地方时可以选中checkbox,但是在我的某一列上也有一个onclick事件是用于下载附件的,当</div>
                                </li>
                                <li><a href="/article/766.htm"
                                       title="HttpClient|HttpClient请求详解" target="_blank">HttpClient|HttpClient请求详解</a>
                                    <span class="text-muted">7454103</span>
<a class="tag" taget="_blank" href="/search/apache/1.htm">apache</a><a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%8D%8F%E8%AE%AE/1.htm">网络协议</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%BA%94%E7%94%A8/1.htm">网络应用</a><a class="tag" taget="_blank" href="/search/Security/1.htm">Security</a>
                                    <div>HttpClient 是 Apache Jakarta Common 下的子项目,可以用来提供高效的、最新的、功能丰富的支持 HTTP 协议的客户端编程工具包,并且它支持 HTTP 协议最新的版本和建议。本文首先介绍 HTTPClient,然后根据作者实际工作经验给出了一些常见问题的解决方法。HTTP 协议可能是现在 Internet 上使用得最多、最重要的协议了,越来越多的 Java 应用程序需</div>
                                </li>
                                <li><a href="/article/893.htm"
                                       title="递归 逐层统计树形结构数据" target="_blank">递归 逐层统计树形结构数据</a>
                                    <span class="text-muted">darkranger</span>
<a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a>
                                    <div>将集合递归获取树形结构: 
 
 
/** 
 * 
 * 递归获取数据 
 * @param alist:所有分类 
 * @param subjname:对应统计的项目名称 
 * @param pk:对应项目主键 
 * @param reportList: 最后统计的结果集 
 * @param count:项目级别 
 */ 
 
 public void getReportVO(Arr</div>
                                </li>
                                <li><a href="/article/1020.htm"
                                       title="访问WEB-INF下使用frameset标签页面出错的原因" target="_blank">访问WEB-INF下使用frameset标签页面出错的原因</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/struts2/1.htm">struts2</a>
                                    <div><frameset rows="61,*,24" cols="*" framespacing="0" frameborder="no" border="0">          </div>
                                </li>
                                <li><a href="/article/1147.htm"
                                       title="MAVEN常用命令" target="_blank">MAVEN常用命令</a>
                                    <span class="text-muted">avords</span>

                                    <div>Maven库: 
http://repo2.maven.org/maven2/ 
Maven依赖查询: 
http://mvnrepository.com/ 
Maven常用命令: 1. 创建Maven的普通java项目:    mvn archetype:create    -DgroupId=packageName </div>
                                </li>
                                <li><a href="/article/1274.htm"
                                       title="PHP如果自带一个小型的web服务器就好了" target="_blank">PHP如果自带一个小型的web服务器就好了</a>
                                    <span class="text-muted">houxinyou</span>
<a class="tag" taget="_blank" href="/search/apache/1.htm">apache</a><a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/PHP/1.htm">PHP</a><a class="tag" taget="_blank" href="/search/%E8%84%9A%E6%9C%AC/1.htm">脚本</a>
                                    <div>最近单位用PHP做网站,感觉PHP挺好的,不过有一些地方不太习惯,比如,环境搭建。PHP本身就是一个网站后台脚本,但用PHP做程序时还要下载apache,配置起来也不太很方便,虽然有好多配置好的apache+php+mysq的环境,但用起来总是心里不太舒服,因为我要的只是一个开发环境,如果是真实的运行环境,下个apahe也无所谓,但只是一个开发环境,总有一种杀鸡用牛刀的感觉。如果php自己的程序中</div>
                                </li>
                                <li><a href="/article/1401.htm"
                                       title="NoSQL数据库之Redis数据库管理(list类型)" target="_blank">NoSQL数据库之Redis数据库管理(list类型)</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/redis/1.htm">redis</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/NoSQL/1.htm">NoSQL</a>
                                    <div>3.list类型及操作 
        List是一个链表结构,主要功能是push、pop、获取一个范围的所有值等等,操作key理解为链表的名字。Redis的list类型其实就是一个每个子元素都是string类型的双向链表。我们可以通过push、pop操作从链表的头部或者尾部添加删除元素,这样list既可以作为栈,又可以作为队列。 
  &nbs</div>
                                </li>
                                <li><a href="/article/1528.htm"
                                       title="谁在用Hadoop?" target="_blank">谁在用Hadoop?</a>
                                    <span class="text-muted">bingyingao</span>
<a class="tag" taget="_blank" href="/search/hadoop/1.htm">hadoop</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98/1.htm">数据挖掘</a><a class="tag" taget="_blank" href="/search/%E5%85%AC%E5%8F%B8/1.htm">公司</a><a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E5%9C%BA%E6%99%AF/1.htm">应用场景</a>
                                    <div>Hadoop技术的应用已经十分广泛了,而我是最近才开始对它有所了解,它在大数据领域的出色表现也让我产生了兴趣。浏览了他的官网,其中有一个页面专门介绍目前世界上有哪些公司在用Hadoop,这些公司涵盖各行各业,不乏一些大公司如alibaba,ebay,amazon,google,facebook,adobe等,主要用于日志分析、数据挖掘、机器学习、构建索引、业务报表等场景,这更加激发了学习它的热情。</div>
                                </li>
                                <li><a href="/article/1655.htm"
                                       title="【Spark七十六】Spark计算结果存到MySQL" target="_blank">【Spark七十六】Spark计算结果存到MySQL</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a>
                                    <div>package spark.examples.db

import java.sql.{PreparedStatement, Connection, DriverManager}

import com.mysql.jdbc.Driver
import org.apache.spark.{SparkContext, SparkConf}

object SparkMySQLInteg</div>
                                </li>
                                <li><a href="/article/1782.htm"
                                       title="Scala: JVM上的函数编程" target="_blank">Scala: JVM上的函数编程</a>
                                    <span class="text-muted">bookjovi</span>
<a class="tag" taget="_blank" href="/search/scala/1.htm">scala</a><a class="tag" taget="_blank" href="/search/erlang/1.htm">erlang</a><a class="tag" taget="_blank" href="/search/haskell/1.htm">haskell</a>
                                    <div>    说Scala是JVM上的函数编程一点也不为过,Scala把面向对象和函数型编程这两种主流编程范式结合了起来,对于熟悉各种编程范式的人而言Scala并没有带来太多革新的编程思想,scala主要的有点在于Java庞大的package优势,这样也就弥补了JVM平台上函数型编程的缺失,MS家.net上已经有了F#,JVM怎么能不跟上呢? 
    对本人而言</div>
                                </li>
                                <li><a href="/article/1909.htm"
                                       title="jar打成exe" target="_blank">jar打成exe</a>
                                    <span class="text-muted">bro_feng</span>
<a class="tag" taget="_blank" href="/search/java+jar+exe/1.htm">java jar exe</a>
                                    <div>今天要把jar包打成exe,jsmooth和exe4j都用了。 
遇见几个问题。记录一下。 
两个软件都很好使,网上都有图片教程,都挺不错。 
 
首先肯定是要用自己的jre的,不然不能通用,其次别忘了把需要的lib放到classPath中。 
困扰我很久的一个问题是,我自己打包成功后,在一个同事的没有装jdk的电脑上运行,就是不行,报错jvm.dll为无效的windows映像,如截图 
最后发现</div>
                                </li>
                                <li><a href="/article/2036.htm"
                                       title="读《研磨设计模式》-代码笔记-策略模式-Strategy" target="_blank">读《研磨设计模式》-代码笔记-策略模式-Strategy</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/1.htm">设计模式</a>
                                    <div>声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/ 
 
 




/*
策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化

简单理解:
1、将不同的策略提炼出一个共同接口。这是容易的,因为不同的策略,只是算法不同,需要传递的参数</div>
                                </li>
                                <li><a href="/article/2163.htm"
                                       title="cmd命令值cvfM命令" target="_blank">cmd命令值cvfM命令</a>
                                    <span class="text-muted">chenyu19891124</span>
<a class="tag" taget="_blank" href="/search/cmd/1.htm">cmd</a>
                                    <div>     cmd命令还真是强大啊。今天发现jar -cvfM aa.rar @aaalist 就这行命令可以根据aaalist取出相应的文件 
  例如: 
     在d:\workspace\prpall\test.java 有这样一个文件,现在想要将这个文件打成一个包。运行如下命令即可比如在d:\wor</div>
                                </li>
                                <li><a href="/article/2290.htm"
                                       title="OpenJWeb(1.8) Java Web应用快速开发平台" target="_blank">OpenJWeb(1.8) Java Web应用快速开发平台</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%A1%86%E6%9E%B6/1.htm">框架</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86/1.htm">项目管理</a><a class="tag" taget="_blank" href="/search/%E4%BC%81%E4%B8%9A%E5%BA%94%E7%94%A8/1.htm">企业应用</a>
                                    <div>  
  OpenJWeb(1.8) Java Web应用快速开发平台的作者是我们技术联盟的成员,他最近推出了新版本的快速应用开发平台  OpenJWeb(1.8),我帮他做做宣传 
 
  OpenJWeb快速开发平台以快速开发为核心,整合先进的java 开源框架,本着自主开发+应用集成相结合的原则,旨在为政府、企事业单位、软件公司等平台用户提供一个架构透</div>
                                </li>
                                <li><a href="/article/2417.htm"
                                       title="Python 报错:IndentationError: unexpected indent" target="_blank">Python 报错:IndentationError: unexpected indent</a>
                                    <span class="text-muted">daizj</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/tab/1.htm">tab</a><a class="tag" taget="_blank" href="/search/%E7%A9%BA%E6%A0%BC/1.htm">空格</a><a class="tag" taget="_blank" href="/search/%E7%BC%A9%E8%BF%9B/1.htm">缩进</a>
                                    <div>    IndentationError: unexpected indent 是缩进的问题,也有可能是tab和空格混用啦 
 
    Python开发者有意让违反了缩进规则的程序不能通过编译,以此来强制程序员养成良好的编程习惯。并且在Python语言里,缩进而非花括号或者某种关键字,被用于表示语句块的开始和退出。增加缩进表示语句块的开</div>
                                </li>
                                <li><a href="/article/2544.htm"
                                       title="HttpClient 超时设置" target="_blank">HttpClient 超时设置</a>
                                    <span class="text-muted">dongwei_6688</span>
<a class="tag" taget="_blank" href="/search/httpclient/1.htm">httpclient</a>
                                    <div>HttpClient中的超时设置包含两个部分: 
1. 建立连接超时,是指在httpclient客户端和服务器端建立连接过程中允许的最大等待时间 
2. 读取数据超时,是指在建立连接后,等待读取服务器端的响应数据时允许的最大等待时间 
  
在HttpClient 4.x中如下设置: 
  
  
HttpClient httpclient = new DefaultHttpC</div>
                                </li>
                                <li><a href="/article/2671.htm"
                                       title="小鱼与波浪" target="_blank">小鱼与波浪</a>
                                    <span class="text-muted">dcj3sjt126com</span>

                                    <div>一条小鱼游出水面看蓝天,偶然间遇到了波浪。  小鱼便与波浪在海面上游戏,随着波浪上下起伏、汹涌前进。  小鱼在波浪里兴奋得大叫:“你每天都过着这么刺激的生活吗?简直太棒了。”  波浪说:“岂只每天过这样的生活,几乎每一刻都这么刺激!还有更刺激的,要有潮汐变化,或者狂风暴雨,那才是兴奋得心脏都会跳出来。”  小鱼说:“真希望我也能变成一个波浪,每天随着风雨、潮汐流动,不知道有多么好!”  很快,小鱼</div>
                                </li>
                                <li><a href="/article/2798.htm"
                                       title="Error Code: 1175 You are using safe update mode and you tried to update a table" target="_blank">Error Code: 1175 You are using safe update mode and you tried to update a table</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a>
                                    <div> 
 快速高效用:SET SQL_SAFE_UPDATES = 0;下面的就不要看了! 
 今日用MySQL Workbench进行数据库的管理更新时,执行一个更新的语句碰到以下错误提示: 
 Error Code: 1175 
 You are using safe update mode and you tried to update a table without a WHERE that </div>
                                </li>
                                <li><a href="/article/2925.htm"
                                       title="枚举类型详细介绍及方法定义" target="_blank">枚举类型详细介绍及方法定义</a>
                                    <span class="text-muted">gaomysion</span>
<a class="tag" taget="_blank" href="/search/enum/1.htm">enum</a><a class="tag" taget="_blank" href="/search/javaee/1.htm">javaee</a>
                                    <div>转发 
http://developer.51cto.com/art/201107/275031.htm 
 
枚举其实就是一种类型,跟int, char 这种差不多,就是定义变量时限制输入的,你只能够赋enum里面规定的值。建议大家可以看看,这两篇文章,《java枚举类型入门》和《C++的中的结构体和枚举》,供大家参考。 
 
枚举类型是JDK5.0的新特征。Sun引进了一个全新的关键字enum</div>
                                </li>
                                <li><a href="/article/3052.htm"
                                       title="Merge Sorted Array" target="_blank">Merge Sorted Array</a>
                                    <span class="text-muted">hcx2013</span>
<a class="tag" taget="_blank" href="/search/array/1.htm">array</a>
                                    <div>Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. 
Note:You may assume that nums1 has enough space (size that is</div>
                                </li>
                                <li><a href="/article/3179.htm"
                                       title="Expression Language 3.0新特性" target="_blank">Expression Language 3.0新特性</a>
                                    <span class="text-muted">jinnianshilongnian</span>
<a class="tag" taget="_blank" href="/search/el+3.0/1.htm">el 3.0</a>
                                    <div>Expression Language 3.0表达式语言规范最终版从2013-4-29发布到现在已经非常久的时间了;目前如Tomcat 8、Jetty 9、GlasshFish 4已经支持EL 3.0。新特性包括:如字符串拼接操作符、赋值、分号操作符、对象方法调用、Lambda表达式、静态字段/方法调用、构造器调用、Java8集合操作。目前Glassfish 4/Jetty实现最好,对大多数新特性</div>
                                </li>
                                <li><a href="/article/3306.htm"
                                       title="超越算法来看待个性化推荐" target="_blank">超越算法来看待个性化推荐</a>
                                    <span class="text-muted">liyonghui160com</span>
<a class="tag" taget="_blank" href="/search/%E8%B6%85%E8%B6%8A%E7%AE%97%E6%B3%95%E6%9D%A5%E7%9C%8B%E5%BE%85%E4%B8%AA%E6%80%A7%E5%8C%96%E6%8E%A8%E8%8D%90/1.htm">超越算法来看待个性化推荐</a>
                                    <div>  
       一提到个性化推荐,大家一般会想到协同过滤、文本相似等推荐算法,或是更高阶的模型推荐算法,百度的张栋说过,推荐40%取决于UI、30%取决于数据、20%取决于背景知识,虽然本人不是很认同这种比例,但推荐系统中,推荐算法起的作用起的作用是非常有限的。 
      就像任何</div>
                                </li>
                                <li><a href="/article/3433.htm"
                                       title="写给Javascript初学者的小小建议" target="_blank">写给Javascript初学者的小小建议</a>
                                    <span class="text-muted">pda158</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a>
                                    <div>  一般初学JavaScript的时候最头痛的就是浏览器兼容问题。在Firefox下面好好的代码放到IE就不能显示了,又或者是在IE能正常显示的代码在firefox又报错了。     如果你正初学JavaScript并有着一样的处境的话建议你:初学JavaScript的时候无视DOM和BOM的兼容性,将更多的时间花在 了解语言本身(ECMAScript)。只在特定浏览器编写代码(Chrome/Fi</div>
                                </li>
                                <li><a href="/article/3560.htm"
                                       title="Java 枚举" target="_blank">Java 枚举</a>
                                    <span class="text-muted">ShihLei</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/enum/1.htm">enum</a><a class="tag" taget="_blank" href="/search/%E6%9E%9A%E4%B8%BE/1.htm">枚举</a>
                                    <div>注:文章内容大量借鉴使用网上的资料,可惜没有记录参考地址,只能再传对作者说声抱歉并表示感谢! 
  
一 基础  1)语法 
  
 
      枚举类型只能有私有构造器(这样做可以保证客户代码没有办法新建一个enum的实例) 
      枚举实例必须最先定义 
   2)特性   
 
     &nb</div>
                                </li>
                                <li><a href="/article/3687.htm"
                                       title="Java SE 6 HotSpot虚拟机的垃圾回收机制" target="_blank">Java SE 6 HotSpot虚拟机的垃圾回收机制</a>
                                    <span class="text-muted">uuhorse</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/HotSpot/1.htm">HotSpot</a><a class="tag" taget="_blank" href="/search/GC/1.htm">GC</a><a class="tag" taget="_blank" href="/search/%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/1.htm">垃圾回收</a><a class="tag" taget="_blank" href="/search/VM/1.htm">VM</a>
                                    <div>官方资料,关于Java SE 6 HotSpot虚拟机的garbage Collection,非常全,英文。 
http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html 
  Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning 
&</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html><script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>