免费注册Amazon云服务器!并搭建网站、博客等 – 零度解说

免费注册Amazon云服务器!并搭建网站、博客等 – 零度解说

1.Amazon免费注册链接:【点击前往

2.安装docker :

curl -fsSL https://get.docker.com | sh

3.安装docker-compose:

sudo apt-get install composer

 

4.创建wordpress文件夹并进入

mkdir wordpress
cd wordpress

 

5.创建docker-compose.yml配置文件

touch docker-compose.yml
nano docker-compose.yml

 

6.在里面输入以下内容:

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
volumes:
- wordpress_data:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
db_data: {}
wordpress_data: {}

 

7.最后启动一键安装命令:

docker-compose up -d

 

此博客中的热门博文

咖啡加牛奶,对健康更有益

Chrome超越Firefox的20条技巧

林牧之女谈《烛烬梦犹虚》出版幕后点滴