使用docker compose一键部署WordPress博客的方法

目录
  • 1、创建wordpress项目目录
  • 2、创建docker-compose.yml配置文件
  • 3、一键启动wordpress项目
  • 4、查看相关信息参数
  • 5、配置wordpress

1、创建wordpress项目目录

[root@docker ~]# mkdir wordpress
[root@docker ~]# cd wordpress/
[root@docker wordpress]# 

2、创建docker-compose.yml配置文件

[root@docker wordpress]# touch docker-compose.yml
[root@docker wordpress]# vim docker-compose.yml
[root@docker wordpress]# cat docker-compose.yml
version: "3.3"

services:
  db:
    image: mysql:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: somewordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
  wordpress:
    depends_on:
      - db
    image: wordpress:latest
      - wordpress_data:/var/www/html
    ports:
      - "8000:80"
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
volumes:
  db_data: {}
  wordpress_data: {}
[root@docker wordpress]#

3、一键启动wordpress项目

docker-compose up -d

命令运行执行过程如下所示

[root@docker wordpress]# docker-compose up -d
Creating network "wordpress_default" with the default driver
Creating volume "wordpress_db_data" with default driver
Creating volume "wordpress_wordpress_data" with default driver
Pulling wordpress (wordpress:latest)...
latest: Pulling from library/wordpress
a2abf6c4d29d: Pull complete
c5608244554d: Pull complete
2d07066487a0: Pull complete
1b6dfaf1958c: Pull complete
32c5e6a60073: Pull complete
90cf855b27cc: Pull complete
8b0f1068c586: Pull complete
5355461305e8: Pull complete
ad1eec592342: Pull complete
e03fbc76cb78: Pull complete
1f5796e48b39: Pull complete
72fbe8e1d4e7: Pull complete
96edece66175: Pull complete
5f46f0743de2: Pull complete
c9f9671a5e1f: Pull complete
3f543dcd35b1: Pull complete
c88e21a0c2a0: Pull complete
964b4457a910: Pull complete
0d55fb9a64ef: Pull complete
fb009ff7c567: Pull complete
4f058a67a50d: Pull complete
Digest: sha256:fc33b796b04162a0db2e9ea9b4c361a07058b21597b1317ad9ab3ea4593de241
Status: Downloaded newer image for wordpress:latest
Creating wordpress_db_1 ... done
Creating wordpress_wordpress_1 ... done

4、查看相关信息参数

查看正在运行的容器

[root@docker wordpress]# docker ps
CONTAINER ID   IMAGE              COMMAND                  CREATED              STATUS              PORTS                                   NAMES
74dde54efbe0   wordpress:latest   "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:8000->80/tcp, :::8000->80/tcp   wordpress_wordpress_1
f22bc03ae9ca   mysql:5.7          "docker-entrypoint.s…"   About a minute ago   Up About a minute   3306/tcp, 33060/tcp                     wordpress_db_1
[root@docker wordpress]#

查看wordpress镜像

[root@docker wordpress]# docker images
REPOSITORY        TAG                IMAGE ID       CREATED         SIZE
wordpress         latest             c3c92cc3dcb1   4 months ago    616MB
mysql             5.7                c20987f18b13   4 months ago    448MB

查看wordpress镜像详细信息参数

[root@docker wordpress]# docker image inspect wordpress
[
    {
        "Id": "sha256:c3c92cc3dcb1a903fed0374a837f38d716ae104d0e4c9705bddb53a76419534d",
        "RepoTags": [
            "wordpress:latest"
        ],
        "RepoDigests": [
            "wordpress@sha256:fc33b796b04162a0db2e9ea9b4c361a07058b21597b1317ad9ab3ea4593de241"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2021-12-22T12:22:44.907734362Z",
        "Container": "76e81f08668906b548f73ef1272100f6fa94ce50eb13bcb9701750958ccb9f7c",
        "ContainerConfig": {
            "Hostname": "76e81f086689",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "APACHE_CONFDIR=/etc/apache2",
                "APACHE_ENVVARS=/etc/apache2/envvars",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
                "PHP_VERSION=7.4.27",
                "PHP_URL=https://www.php.net/distributions/php-7.4.27.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-7.4.27.tar.xz.asc",
                "PHP_SHA256=3f8b937310f155822752229c2c2feb8cc2621e25a728e7b94d0d74c128c43d0c"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "CMD [\"apache2-foreground\"]"
            ],
            "Image": "sha256:946e01a0332f0a94ab8098875adfccd45de7853714478cdc675c160bc190fa95",
            "Volumes": {
                "/var/www/html": {}
            },
            "WorkingDir": "/var/www/html",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {},
            "StopSignal": "SIGWINCH"
        },
        "DockerVersion": "20.10.7",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "APACHE_CONFDIR=/etc/apache2",
                "APACHE_ENVVARS=/etc/apache2/envvars",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
                "PHP_VERSION=7.4.27",
                "PHP_URL=https://www.php.net/distributions/php-7.4.27.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-7.4.27.tar.xz.asc",
                "PHP_SHA256=3f8b937310f155822752229c2c2feb8cc2621e25a728e7b94d0d74c128c43d0c"
            ],
            "Cmd": [
                "apache2-foreground"
            ],
            "Image": "sha256:946e01a0332f0a94ab8098875adfccd45de7853714478cdc675c160bc190fa95",
            "Volumes": {
                "/var/www/html": {}
            },
            "WorkingDir": "/var/www/html",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": null,
            "StopSignal": "SIGWINCH"
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 616019481,
        "VirtualSize": 616019481,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/10e7ab6038414fc88332b2eae4cfb14dda92edab7760b81e2dcbae95be47eaeb/diff:/var/lib/docker/overlay2/2884bfc529cfa8044e82537076f6b15f0cb003b549b952668e276039bdceef9a/diff:/var/lib/docker/overlay2/e8e3a23fdb1faa46be8380d0476acd576a49a97befb0a018c65db5addac6c3a3/diff:/var/lib/docker/overlay2/aa9b79869b43445fbdc6a31f3f6bd4d902bbff010a9a6e109856e9ceea4bf4ad/diff:/var/lib/docker/overlay2/c139cd93e615ec61b79e69c94f4319f797b485b76d48f00ce9faa77c195fc452/diff:/var/lib/docker/overlay2/136d4761234aca9c82ca233753f250a46169f5401e51518811614ded12ebefa4/diff:/var/lib/docker/overlay2/f78ed7733ca7b5d5ef0f02ac04f98eb8c1e22f37a93a9f0278b7f3108c6f3a48/diff:/var/lib/docker/overlay2/6cdeaa8faad2381a61ae21c133a6bdcdb61cf558cf6e89fc9e8db7c352301d1f/diff:/var/lib/docker/overlay2/0b4cea44728b2d74bf39fb69f9ccb6402e2117ebf4d54b8f2d14653d032ba12f/diff:/var/lib/docker/overlay2/d27e9fcb57f79408927a6e2910086bad36d88291a601e877f028513840399bc3/diff:/var/lib/docker/overlay2/2f2b18318c209c0184b5766670808285e0545c1e68a1658efb511636d1033f28/diff:/var/lib/docker/overlay2/ed9a87da9254ad473c92a820295874ab67d88c492647ff1bb78e160b05c7dcc7/diff:/var/lib/docker/overlay2/dd7b9486ac80666eefc319070f00aeb1f26f1df1dda5301f57ab4c24ba2771b3/diff:/var/lib/docker/overlay2/0450b509c683bec9e8bad207d87a7eb505d69f086961be46e0c8df868ab1144e/diff:/var/lib/docker/overlay2/d55a71f8bab352884cdce71228f76973a7734a3a0a8a3facba3f496059346ba4/diff:/var/lib/docker/overlay2/2fe09d1aa764b041a3f27dd4399390e14b3fb64b4464fd5b26afef2a3a56f4bf/diff:/var/lib/docker/overlay2/87ba02c078abca0b51ee759547e0313ed0dbe26581ce034742ba938bfea5bf88/diff:/var/lib/docker/overlay2/d7ff4ef14ccaae7407682309049ce6158f389e4bd205b68886ac758461733422/diff:/var/lib/docker/overlay2/2e2cb15add20c5ba711c5273f1fdddb7f1a54d488952a8816d5b470f583b07b7/diff:/var/lib/docker/overlay2/b806a2064e4e38e04f61fc73eddb216c2de6d65ff83772fe4eb05a63887b0b00/diff",
                "MergedDir": "/var/lib/docker/overlay2/ae8ebfb3d264d1e16727a7b1ae2e717969a8907c5749ad6523f399b909b3bb06/merged",
                "UpperDir": "/var/lib/docker/overlay2/ae8ebfb3d264d1e16727a7b1ae2e717969a8907c5749ad6523f399b909b3bb06/diff",
                "WorkDir": "/var/lib/docker/overlay2/ae8ebfb3d264d1e16727a7b1ae2e717969a8907c5749ad6523f399b909b3bb06/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:2edcec3590a4ec7f40cf0743c15d78fb39d8326bc029073b41ef9727da6c851f",
                "sha256:2a3138346faa8ee4b6576fcbb2c6fee83f0bbe068d9bba5e3319929fcd8c7ada",
                "sha256:0fdfbbf7aebd824633c30eeb27764703e6542240276c77be96a361a0317a1048",
                "sha256:ee0ca96d307e2b44287feb00422347eca7e232623cd296836bc4fa667a5afb66",
                "sha256:6e4300c6b758e4eb09040760786bb6f80a2e9292a99473e04b5437ba49f223a5",
                "sha256:5649286863133a7dc1abc7e4df13abfb2ba9d9873f8b279e74321a4e4317cfcd",
                "sha256:6c39776a30a0f2123685eb293379f7662f41947245a4bb436612d12ac500e84d",
                "sha256:23946094ff3f63e854aa094f023dcb277ffec1ab69d8799c0ac0105d1f611bc1",
                "sha256:b299cffd87cbd3caccb7cc2d1bddf236693585f041fe9fde441d9a82feb20ff8",
                "sha256:56543a169be6589b8408e4aaa230e529870dafedd5cf191ced84a9ba13cd60b4",
                "sha256:55d40777afe64bab763a7d744513ddb93a29b3f5802ca0575fe03c0a8ed67dc9",
                "sha256:7446d340e7f8da0e738b0a1a9fb6a1fe906e7e9d238447a44519e6d1e225d30f",
                "sha256:10dfb82106c4667a9e465437331fe459e6d50369832b38d0a88b862f1cfa71e7",
                "sha256:d390f2d56bd85a24191a667840c3836506f73d69522ab793dcb41965f269f9a9",
                "sha256:0d79fe9ffe74abce48ccf46c394e162115ec5a40cf57e993f8c7f3041e1205f4",
                "sha256:4793c0a2ad02c5fab0556045d0a182c69218d0a8e892f32047b0666e472b406b",
                "sha256:a4e2d002482e345abd2cb9e92f0d86fd5af455752be758bc9b3c80c55ecacbce",
                "sha256:f0287c40b0d61bcb53f04716fab390a45d96af7f9e7104bce13793edc4a516c7",
                "sha256:98b68a8435741330255aa4c24df32f82b356e44fe0089dc288e3d74ef6722ac5",
                "sha256:8f1b90d2be40e2da876dc34793e4938ea1591b2f54e396f931564ee07ad1d585",
                "sha256:c7ae1aefcc695d00e45dd1cd3517ac92893f07c0915261609d044636e6d2c86b"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

查看wordpress的网络信息

[root@docker wordpress]# docker network ls
NETWORK ID     NAME                       DRIVER    SCOPE
6da4ea82dc8f   bridge                     bridge    local
6122e04c63b8   composetest_default        bridge    local
2fff17891e10   host                       host      local
7aa928301028   mynet                      bridge    local
e09cdd0344b3   none                       null      local
6e65d674deba   redis                      bridge    local
366cc0a1f57b   wordpress_default          bridge    local
531566df42e7   xybdiy_workpress_default   bridge    local

查看wordpress容器的网络详细信息

[root@docker wordpress]# docker network inspect 366cc0a1f57b
[
    {
        "Name": "wordpress_default",
        "Id": "366cc0a1f57b7b23ddfb5e46e3f6a48040294e61fc66a4065a2bfe163b48681c",
        "Created": "2022-04-23T22:58:30.173133699+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "74dde54efbe05c5e7a5f57c174272d9ab68f333b358f517e0763eea9040c9a47": {
                "Name": "wordpress_wordpress_1",
                "EndpointID": "919b186d0fb0d56026300450432091abcde8ebb411b5ae1db400297aa6f2cc1c",
                "MacAddress": "02:42:ac:14:00:03",
                "IPv4Address": "172.20.0.3/16",
                "IPv6Address": ""
            },
            "f22bc03ae9ca55daa657a98a0e5f212b14bd3ca57c3244cd50e588d871b6b1f2": {
                "Name": "wordpress_db_1",
                "EndpointID": "01ba837f9dc58acd3fa90655c4cc5d0d1b639aaab10c1dc1aa1f81ca8f04a2c9",
                "MacAddress": "02:42:ac:14:00:02",
                "IPv4Address": "172.20.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "wordpress",
            "com.docker.compose.version": "1.25.0"
        }
    }
]
[root@docker wordpress]#

5、配置wordpress

http://192.168.200.8:8000/wp-admin/install.php

1、选择语言版本信息。

2、配置相关信息。设置站点名、用户名、密码等。

3、安装完成。

4、使用用户名和密码登录wordpress。

5、登录完成,进入wordpress博客后台。

6、查看wordpress初始化网页界面。

至此,wordpress通过docker-compose一键安装部署完成。

到此这篇关于docker compose一键部署WordPress博客的文章就介绍到这了,更多相关docker compose一键部署WordPress博客内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • 使用Docker Compose搭建部署ElasticSearch的配置过程

    目录 什么是 Elasticsearch? Elasticsearch 的用途是什么? Elasticsearch 的工作原理是什么? Elasticsearch 索引是什么? 说明 一.目录准备 二.es配置准备 三.准备docker-compose.yml 四.启动容器 五.查看 什么是 Elasticsearch? Elasticsearch 是一个分布式的开源搜索和分析引擎,适用于所有类型的数据,包括文本.数字.地理空间.结构化和非结构化数据.Elasticsearch 在Apache

  • docker-compose配置并部署redis服务的实现

    目录 前言 一.安装docker和docker-compose 二.下载redis版本,本文中选择的是6.2.6版本 三.解压并复制redis.conf配置文件到服务器上,本文是放在/etc/redis/redis.conf 四.修改redis.conf配置文件 五.配置docker-compose.yml 六.启动容器 七.redis启动后遇到的问题 八.分享个redis可视化工具 前言 在使用docker部署redis的时候,遇到很多坑,在此记录下遇到的问题 一.安装docker和docke

  • docker-compose部署Yapi的方法

    1 安装docker sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo sudo yum install docker-ce systemctl start docker 2 安装docker-compose curl -

  • Docker Compose部署Nginx的方法步骤

    使用Docker Compose部署Nginx,创建docker-compose.yaml: [root@192 ~]# vim docker-compose.yaml 输入以下内容: version: '3' services: nginx: container_name: nginx image: nginx restart: always ports: - 8080:80 privileged: true networks: - mynginx networks: mynginx: dri

  • 快速使用docker-compose部署clickhouse的教程

    ClickHouse 是一个开源的面向列的 DBMS(由 Yandex 开发).ClickHouse 的工作速度比传统方法快 100-1000 倍.它适用于大数据.业务分析和时间序列数据.ClickHouse 是第一个与 Sybase IQ.Vertica 和 Snowflake 等专有数据库的性能.成熟度和可扩展性相匹配的开源 SQL 数据仓库. 在这个小教程中,我将向您展示如何以最少的设置安装 ClickHouse. 对于本教程,我们需要安装 Docker 和 docker-compose.

  • docker-compose+nginx部署前后端分离的项目实践

    目录 安装docker 安装必要的系统工具 软件源信息切换 安装 配置镜像加速器 安装docker-compose 安装 权限修改 解决js.css文件404的情况 Vue项目配置 安装docker 安装必要的系统工具 # 更新yum工具 yum update -y # 安装必要的工具 yum install -y yum-utils device-mapper-persistent-data lvm2 软件源信息切换 yum-config-manager --add-repo http://m

  • 使用docker compose一键部署WordPress博客的方法

    目录 1.创建wordpress项目目录 2.创建docker-compose.yml配置文件 3.一键启动wordpress项目 4.查看相关信息参数 5.配置wordpress 1.创建wordpress项目目录 [root@docker ~]# mkdir wordpress [root@docker ~]# cd wordpress/ [root@docker wordpress]# 2.创建docker-compose.yml配置文件 [root@docker wordpress]#

  • docker compose 一键部署分布式配置中心Apollo的过程详解

    简介 说起分布式肯定要想到分布式配置中心.分布式日志.分布式链路追踪等 在分布式部署中业务往往有很多配置比如: 应用程序在启动和运行时需要读取一些配置信息,配置基本上伴随着应用程序的整个生命周期,比如:数据库连接参数.启动参数等,都需要去维护和配置,但不可能一台台服务器登录上去配置 今天我要跟大家分享一下分布式配置中心Apollo: Apollo(阿波罗)是携程框架部门研发的分布式配置中心,能够集中化管理应用不同环境.不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限.流程治理等

  • Docker Compose快速部署多容器服务实战的实例详解

    目录 1 什么是Docker Compose 2 安装Docker Compose 3 Docker Compose文件格式的简单介绍 4 Docker Compose常用命令 5 使用Docker Compose一键部署Spring Boot+Redis实战 5.1 构建应用 5.1.1 Spring Boot项目 5.1.2 Redis配置文件 5.2 打包应用并构建目录 5.2.1 打包Spring Boot项目 5.2.2 上传redis.conf配置文件 5.3 编写Dockerfil

  • Docker Compose一键ELK部署的方法实现

    安装   Filebeat 已经完全替代了 Logstash-Forwarder 成为新一代的日志采集器,因为它更加轻量.安全.基于 Filebeat + ELK 的部署方案架构图如下:    软件版本: 服务 版本 说明 CentOS 7.6 Docker 18.09.5 Docker Compose 1.25.0 ELK 7.5.1 Filebeat 7.5.1 docker-compose 文件 version: "3" services: es-master: containe

  • Docker实现从零开始搭建SOLO个人博客的方法步骤

    目录 一.环境准备 二.安装Docker 三.安装mysql主从数据库 3.1.mysql环境准备 3.2.启动mysql主库从库 3.3.登陆mysql主库 3.4.登陆mysql从库 3.5.主从参数说明 四.搭建solo博客 五.Nginx实现反向代理solo博客 六.成果展示 一.环境准备 要想在公网访问你的博客,首先你需要一台云服务器,也就是租用各大云厂商的服务器,像我就是花68块买了一年青云的1核2G的服务器,你现在看到的博客就是在这台服务器上,最好也购买一个专属的域名.一年十几就够

  • 利用drone ci自动化部署静态博客的完整步骤

    目录 前言 准备 安装drone ci 1.docker-compose配置文件 2.docker-compose配置文件主要参数详解 drone server DRONE_SERVER_PROTO和DRONE_SERVER_HOST DRONE_RPC_SECRET DRONE_USER_CREATE DRONE_DATABASE_DRIVER DRONE_DATABASE_DATASOURCE DRONE_GITEE_CLIENT_ID和DRONE_GITEE_CLIENT_SECRET d

  • LNMP系列教程之 SSL安装WordPress博客(程序下载与安装)

    在之前的文章中,老左已经在VPS中添加了站点,然后我们就需要传程序建站.我们可以利用WinSCP工具直接向我们的对应的站点目录中传程序,然后添加数据库安装网站.但是今天我分享的这个方法是比较先进的SSL远程下载程序,这样的好处是万一我们用的CMS程序较大,可以直接下载至VPS中,省的我们再去FTP传.用命令操作一来可以显得牛X,二来可以节省时间. 首先,用Putty登陆我们的VPS,到我们的站点目录下,今天我以安装wordpress建立博客为例: 其次,输入远程下载程序的命令: wget htt

  • idea连接docker实现一键部署的方法

    1.修改docker配置文件,打开2375端口 [root@s162 docker]# vim /usr/lib/systemd/system/docker.service #查找 ExecStart,在末尾添加 #后面加上-H tcp://0.0.0.0:2375 [root@s162 docker]# systemctl daemon-reload [root@s162 docker]# systemctl start docker ## 查看2375端口是否启用 [root@s162 do

  • Docker compose一键安装mirai搭建QQ机器人最快操作方法

    目录 登录手机QQ 安装基本的插件 编辑配置文件 http协议设置 先用官方的脚本安装下docker curl -sSL https://get.docker.com/ | sh 安装docker-compose curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compo

  • python实现批量下载新浪博客的方法

    本文实例讲述了python实现批量下载新浪博客的方法.分享给大家供大家参考.具体实现方法如下: # coding=utf-8 import urllib2 import sys, os import re import string from BeautifulSoup import BeautifulSoup def encode(s): return s.decode('utf-8').encode(sys.stdout.encoding, 'ignore') def getHTML(url

随机推荐