Ghost是一款用于博客、出版物和内容网站的免费且开源的CMS(内容管理系统),它是完全基于JavaScript编写的。Ghost的主要特点是简单易用、高度可扩展、精美的设计和优秀的性能。
简单易用:Ghost的用户界面非常简单和直观,因此非常易于使用。它提供了一个简单的写作体验,让您专注于写作。
可扩展:Ghost提供了一个强大的API,使得开发者可以轻松地扩展其功能,并将其与其他应用程序集成。
设计优美:Ghost的设计非常美观和优雅,它为您提供了多种主题和自定义选项来满足您的需求。
性能优越:Ghost的性能非常好,因为它是基于Node.js构建的,使用了非阻塞I/O,可以处理大量的请求和并发连接。
本次实践为个人测试环境,操作系统版本为centos7.6。
hostname | IP地址 | 操作系统版本 | Docker版本 |
---|---|---|---|
jeven | 192.168.3.166 | centos 7.6 | 20.10.17 |
1.本次实践部署环境为个人测试环境,生产环境请谨慎使用;
2.在Docker环境下成功部署Django-CMS企业内容管理系统。
检查Docker服务是否正常运行,确保Docker正常运行。
[root@jeven ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2023-06-11 19:08:26 CST; 7h ago
Docs: https://docs.docker.com
Main PID: 11727 (dockerd)
Tasks: 10
Memory: 133.4M
检查Docker版本
[root@jeven ~]# docker -v
Docker version 20.10.17, build 100c701
检查Docker compose版本,确保2.0以上版本。
[root@jeven ~]# docker compose version
Docker Compose version v2.6.0
在docker hub下载Ghost镜像,版本为latest。
[root@jeven ~]# docker pull ghost
Using default tag: latest
latest: Pulling from library/ghost
72a69066d2fe: Already exists
24892ef5fd86: Pull complete
b352cb85f08b: Pull complete
d184ccfb32cc: Pull complete
a1aa0950435d: Pull complete
6af76194e172: Pull complete
6ecb9543cf3f: Pull complete
f5dc5f4a448f: Pull complete
c5c6987f6d28: Pull complete
Digest: sha256:8123a7eabc533746cfa7302c71b780e763ee292f92c10f44e12d08baa0b489f9
Status: Downloaded newer image for ghost:latest
docker.io/library/ghost:latest
mkdir -p /data/ghost
docker run -d \
--restart always \
--name ghost \
-p 2368:2368 \
-v /data/ghost:/var/lib/ghost/content \
-e NODE_ENV=development \
-e url=http://192.168.3.166:2368 \
ghost
chmod -R 777 /data/ghost/
docker restart ghost
检查Ghost容器状态,确保容器正常启动。
[root@jeven ghost]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d9c108ddbd3c ghost "docker-entrypoint.s…" About a minute ago Up 26 seconds 0.0.0.0:2368->2368/tcp, :::2368->2368/tcp ghost
查Ghost容器运行日志,检查有无报错,确保Ghost服务正常启动。
[root@jeven ghost]# docker logs ghost
[2023-06-11 18:43:17] INFO Ghost is running in development...
[2023-06-11 18:43:17] INFO Listening on: 0.0.0.0:2368
[2023-06-11 18:43:17] INFO Url configured as: http://192.168.3.166:2368/
[2023-06-11 18:43:17] INFO Ctrl+C to shut down
[2023-06-11 18:43:17] INFO Ghost server started in 0.264s
[2023-06-11 18:43:17] WARN Database state requires initialisation.
[2023-06-11 18:43:17] INFO Creating table: posts
[2023-06-11 18:43:17] INFO Creating table: posts_meta
[2023-06-11 18:43:17] INFO Creating table: users
[2023-06-11 18:43:17] INFO Creating table: oauth
[2023-06-11 18:43:17] INFO Creating table: posts_authors
[2023-06-11 18:43:17] INFO Creating table: roles
[2023-06-11 18:43:17] INFO Creating table: roles_users
[2023-06-11 18:43:17] INFO Creating table: permissions
[2023-06-11 18:43:17] INFO Creating table: permissions_users
[2023-06-11 18:43:17] INFO Creating table: permissions_roles
[2023-06-11 18:43:17] INFO Creating table: settings
[2023-06-11 18:43:17] INFO Creating table: tags
[2023-06-11 18:43:17] INFO Creating table: posts_tags
[2023-06-11 18:43:17] INFO Creating table: invites
[2023-06-11 18:43:17] INFO Creating table: brute
[2023-06-11 18:43:17] INFO Creating table: sessions
[2023-06-11 18:43:17] INFO Creating table: integrations
[2023-06-11 18:43:17] INFO Creating table: webhooks
[2023-06-11 18:43:17] INFO Creating table: api_keys
[2023-06-11 18:43:17] INFO Creating table: mobiledoc_revisions
[2023-06-11 18:43:17] INFO Creating table: members
[2023-06-11 18:43:17] INFO Creating table: products
[2023-06-11 18:43:17] INFO Creating table: offers
[2023-06-11 18:43:17] INFO Creating table: benefits
[2023-06-11 18:43:17] INFO Creating table: products_benefits
[2023-06-11 18:43:17] INFO Creating table: members_products
[2023-06-11 18:43:17] INFO Creating table: members_payment_events
[2023-06-11 18:43:17] INFO Creating table: members_login_events
[2023-06-11 18:43:17] INFO Creating table: members_email_change_events
[2023-06-11 18:43:17] INFO Creating table: members_status_events
[2023-06-11 18:43:17] INFO Creating table: members_product_events
[2023-06-11 18:43:17] INFO Creating table: members_paid_subscription_events
[2023-06-11 18:43:17] INFO Creating table: labels
[2023-06-11 18:43:17] INFO Creating table: members_labels
[2023-06-11 18:43:17] INFO Creating table: members_stripe_customers
[2023-06-11 18:43:17] INFO Creating table: members_stripe_customers_subscriptions
[2023-06-11 18:43:17] INFO Creating table: offer_redemptions
[2023-06-11 18:43:17] INFO Creating table: members_subscribe_events
[2023-06-11 18:43:17] INFO Creating table: stripe_products
[2023-06-11 18:43:17] INFO Creating table: stripe_prices
[2023-06-11 18:43:17] INFO Creating table: actions
[2023-06-11 18:43:17] INFO Creating table: emails
[2023-06-11 18:43:17] INFO Creating table: email_batches
[2023-06-11 18:43:17] INFO Creating table: email_recipients
[2023-06-11 18:43:17] INFO Creating table: tokens
[2023-06-11 18:43:17] INFO Creating table: snippets
[2023-06-11 18:43:17] INFO Creating table: temp_member_analytic_events
[2023-06-11 18:43:17] INFO Creating table: custom_theme_settings
[2023-06-11 18:43:17] INFO Model: Product
[2023-06-11 18:43:17] INFO Model: Tag
[2023-06-11 18:43:17] INFO Model: Role
[2023-06-11 18:43:17] INFO Model: Permission
[2023-06-11 18:43:18] INFO Model: User
[2023-06-11 18:43:41] INFO Model: Post
[2023-06-11 18:43:41] INFO Model: Integration
[2023-06-11 18:43:42] INFO Relation: Role to Permission
[2023-06-11 18:43:42] INFO Relation: Post to Tag
[2023-06-11 18:43:42] INFO Relation: User to Role
[2023-06-11 18:43:42] INFO Database is in a ready state.
[2023-06-11 18:43:42] INFO Ghost database ready in 25.315s
[2023-06-11 18:43:43] INFO Ghost booted in 26.941s
[2023-06-11 18:43:43] INFO Adding offloaded job to the queue
[2023-06-11 18:43:43] INFO Scheduling job update-check at 9 33 8 * * *. Next run on: Mon Jun 12 2023 08:33:09 GMT+0000 (Coordinated Universal Time)
[2023-06-11 18:43:44] INFO Ghost URL Service Ready in 27.199s
[2023-06-11 18:44:44] WARN Ghost is shutting down
[2023-06-11 18:44:44] WARN Ghost has shut down
[2023-06-11 18:44:44] WARN Ghost was running for a minute
[2023-06-11 18:44:45] INFO Ghost is running in development...
[2023-06-11 18:44:45] INFO Listening on: 0.0.0.0:2368
[2023-06-11 18:44:45] INFO Url configured as: http://192.168.3.166:2368/
[2023-06-11 18:44:45] INFO Ctrl+C to shut down
[2023-06-11 18:44:45] INFO Ghost server started in 0.25s
[2023-06-11 18:44:45] INFO Database is in a ready state.
[2023-06-11 18:44:45] INFO Ghost database ready in 0.392s
[2023-06-11 18:44:46] INFO Ghost booted in 1.71s
[2023-06-11 18:44:46] INFO Adding offloaded job to the queue
[2023-06-11 18:44:46] INFO Scheduling job update-check at 3 38 15 * * *. Next run on: Mon Jun 12 2023 15:38:03 GMT+0000 (Coordinated Universal Time)
[2023-06-11 18:44:47] INFO Ghost URL Service Ready in 2.014s
访问地址:http://192.168.3.166:2368/
访问地址: http://192.168.3.166:2368/ghost
Site title: myweb
Full name: admin
Email address: [email protected]
Password: 自定义。
按如下操作,进入内容编辑页面。
编辑网站内容,选择pulish。
访问地址: http://192.168.3.166:2368/
查看新增网页内容