简体   繁体   English

Django 部署在 centos 服务器中

[英]Django deployment in centos server

I generally deploy django web applications in Ubuntu.我一般在Ubuntu中部署django web应用。

But currently we are using cpanel(not looking for alternatives) which doesnt work in Ubuntu.但目前我们正在使用在 Ubuntu 中不起作用的 cpanel(不寻找替代品)。 so want to know if moving to centos for cpanel is worth?所以想知道为 cpanel 迁移到 centos 是否值得?

Because my fear is, if we move to centos server, do we have to face some complex issues(with django deployment) that we might take lot of time(we are good at Ubuntu).因为我担心的是,如果我们迁移到 centos 服务器,我们是否必须面对一些复杂的问题(使用 django 部署),我们可能需要很多时间(我们擅长 Ubuntu)。

Deploying on centos is essentialy the same. 在centos上进行部署本质上是相同的。 You will probably want to run django in gunicorn and supervisor watching over the process. 您可能希望在gunicorn中运行django,并监督该过程。 And nginx for serving static files. 和nginx用于提供静态文件。

I have done deployment on CentOS aswell as on Ubuntu and I didn't encounter any problems. 我已经在CentOS以及Ubuntu上进行了部署,但没有遇到任何问题。

You can use the below link to help you in deployment https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7您可以使用以下链接帮助您部署https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7

and if you had any issues in permission you can disable SE-LINUX如果您有任何权限问题,您可以禁用 SE-LINUX

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM