我的小 Web 服务器 - 树莓派 搭建个人博客遇到的问题

raspberry-pi-server.jpg

bb - for - bb

宝宝只想用树莓派搭建个人博客玩玩啊,特么为啥如此麻烦?遇到的问题,百度,Google,最后还是解决了,smile

现将问题收集如下,希望对看到的人有用。我用树莓派搭建的网站的架构:Linux (Raspbian) + Nginx + MySQL + PHP + WordPress。

未能找到 WordPress 内容目录

找到 WordPress 的根目录,找到wp-config.php文件,在文件最后添加如下代码:

1
2
3
4
5
/** Override default file permissions */
if(is_admin()) {
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );
}

WordPress 需要访问您网页服务器的权限,请输入您的 FTP 登录凭据以继续

wp-config.php文件中添加:

1
2
3
define("FS_METHOD","direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);

安装主题失败,无法创建目录

1
$ sudo chmod -R 777 /var/www/html/

在 WordPress 中使用裁剪图片功能时,出现:“在裁剪您的图像时发生了错误。”

1
2
$ sudo apt-get update
$ sudo apt-get install php5-gd

删除自豪的使用 WordPress

编辑:

1
wp-content/themes/twentyseventeen/template-parts/footer/site-info.php

上传文件失败,提示一个 http 错误

https://www.luozhengrong.com/servers/nginx/234.html

WordPress 如何去除 Google 字体?

https://www.zhihu.com/question/24762608?sort=created

WordPress 建站中 15 个常见的错误(启用缓存插件)

https://www.wpdaxue.com/wp-15-common-mistakes.html

秘诀:善用 Google

有些东西还真是百度半天一脸懵逼,Google 一下瞬间解决,为啥?

  1. Google 能搜到比较新的个人博客的页面
  2. Google 不卖药

技术嘛,很多东东都有人玩过了,玩过了的大神很多都会写自己的教程,放在自己的博客上。能自己写博客,质量要好点,还有些比较的东东,大神的博客不会让你失望。

可是 Google 被墙了啊,这里推荐一下 老D的hosts ,不过估计能看到这篇文章的人,都已具备这样的能力。

为你点首歌

[ar:Owl City]
[ti:The Salwater Room]
[al:Hot Air Balloon]
[by:https://reuixiy.github.io]
[length:4:55]
[00:00.00]Owl City - The Salwater Room
[00:33.58]
[00:33.59]I opened my eyes last night
[00:39.73]and saw you in the low light
[00:43.06]Walking down by the bay, on the shore,
[00:47.51]staring up at the planes that aren't there anymore
[00:51.64]I was feeling the night grow old
[00:56.98]and you were looking so cold
[01:00.03]Like an introvert, I drew my over shirt
[01:04.53]Around my arms and began to shiver violently before
[01:08.99]You happened to look and see
[01:14.39]the tunnels all around me
[01:17.15]Running into the dark underground
[01:21.87]All the subways around create a great sound
[01:25.51]To my motion fatigue: farewell
[01:31.43]With your ear to a seashell
[01:34.18]You can hear the waves in underwater caves
[01:38.51]As if you actually were inside a saltwater room
[01:52.55]Time together is just never quite enough
[01:57.75]When you and I are alone, I've never felt so at home
[02:02.34]What will it take to make or break this hint of love
[02:06.80]We need time, only time
[02:10.50]When we're apart whatever are you thinking of
[02:15.21]If this is what I call home, why does it feel so alone
[02:19.34]So tell me darling, do you wish we'd fall in love
[02:24.03]All the time, all the time
[02:28.54]Can you believe that the crew has gone
[02:34.02]and would't let me sign o
[02:36.56]All my islands have sunk in the deep,
[02:41.04]so I can hardly relax or even oversleep
[02:44.99]I feel as if I were home some nights
[02:50.44]when we count all the ship lights
[02:53.66]I guess we'll never know why sparrows love the snow
[02:58.09]We'll turn off all of the lights and set this ballroom aglow
[03:12.54]Time together is just never quite enough
[03:16.63]When you and I are alone, I've never felt so at home
[03:21.22]What will it take to make or break this hint of love
[03:25.42]We need time, only time
[03:29.88]When we're apart whatever are you thinking of
[03:34.75]If this is what I call home, why does it feel so alone
[03:38.69]So tell me darling, do you wish we'd fall in love
[03:43.09]All the time, all the time
[04:03.53]Time together is just never quite enough
[04:09.37]When we're apart whatever are you thinking of
[04:12.68]What will it take to make or break this hint of love
[04:17.24]So tell me darling, do you wish we'd fall in love
[04:23.52]All the time, all the time

本文结束啦感谢您阅读
0%