英文:
setting wordpress in linux
问题
在Linux(Ubuntu 22.04)上设置WordPress的最佳方法是什么?
我尝试使用XAMPP,但是我一直收到无法连接到数据库的错误,尽管数据库是活动的并且凭据是正确的。
我尝试使用Docker,但是遇到了权限阻塞的问题,尽管我以root用户身份操作。
英文:
What's the best way of setting wordpress in linux ( ubuntu 22.04 ) ?
I tried using xampp , I have been getting errors that it can't connect to the database despite the database being active and the credentials being okay.
Tried using docker , facing permission blockage despite the fact , I am operating as root.
答案1
得分: 1
你可以使用LAMP(Linux、Apache、MySQL、PHP),也许在使用Docker时会有一些麻烦,或者可以尝试在Docker Hub中使用WordPress Docker官方镜像。
为了方便起见,可以使用LAMP + phpMyAdmin来管理数据库。
英文:
You can use LAMP(Linux, Apache, Mysql, PHP), maybe while using docker is a little bit tricky, or try using WordPress Docker official image in the docker hub.
for reasons of ease, use LAMP + phpMyAdmin for managing the database.
答案2
得分: 0
当你有一个Linux系统可用时,有很多选择!你可以在本地(LAMP)堆栈上运行WordPress。但Xampp和Docker也可以工作...
什么是最好的方法?这取决于你的WordPress网站的目的以及Linux主机上运行的其他内容。如果你需要将任何依赖项与系统上运行的其他内容分开,那么你可能想在Docker中重新运行它。你的权限问题是什么?如果你启用了AppArmor,它可能会干扰设置吗?
如果你将这个Ubuntu系统专门用于你的网站,为什么不在本地的LAMP堆栈上运行它呢?我不太确定为什么你需要在Linux上使用Xampp,也许大多数组件已经安装和配置好了,这样更容易设置(尽管你遇到了数据库问题)。但是,如果你按照其中的一份指南,比如这个,安装LAMP堆栈并不那么复杂。
当然,如果你想使这个网站公开访问,我会非常仔细地考虑你的配置,因为可能存在安全问题。添加防火墙,加固系统并保持一切更新。
英文:
So many options when you have a Linux system available! You can run WordPress on the native (LAMP) stack. But Xampp and Docker should also work...
What is the best way? Depends on the purpose of your WordPress website and what else you have running on the Linux host. If you need to have any dependencies separated from other stuff that is running on the system then you might want to retry running it in Docker. What was your permission issue? If you have AppArmor active that is maybe interfering with the setup?
If you have this Ubuntu system dedicated for your website then why not run it on a native LAMP stack? Not really sure why you would need Xampp on Linux, maybe most components are installed and configured for you which makes it easier to setup (although you ran into db problems). But if you follow one of the many guides out there, like this one, it's not that complicated to install a LAMP-stack.
Of course, if you want to make this site publicly accessible, I would consider your configuration very carefully because of potential security issues. Adding a firewall, hardening the system and keeping everything up-to-date.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论