简体   繁体   English

我可以将Linux虚拟LAMP设置复制到真实服务器吗?

[英]Can I copy a Linux virtual LAMP setup to a real server?

I'm setting up a full development environment with a virtual machine (LAMP). 我正在使用虚拟机(LAMP)设置完整的开发环境。 After testing locally I will then set up a publicly accessible web server and launch the site. 在本地测试之后,我将设置一个可公开访问的Web服务器并启动该站点。

I'm going to use Vagrant to deal with the virtual machine setup on my Mac. 我将使用Vagrant处理Mac上的虚拟机设置。

When this is all completed, I obviously upload/commit the website files to a public web server, but do I (or can I) also have the virtual machine setup uploaded to the public (and real) web server? 全部完成后,我显然会将网站文件上传/提交到公共Web服务器,但是(也可以)我也可以将虚拟机设置上传到公共(和真实)Web服务器吗?

I think not, but it would make sense to me to configure the Linux (I'll use Ubuntu) virtual machine locally (security, etc.) with Vagrant/SHH etc. and then use that same config when going live. 我认为不是,但是对我来说,使用Vagrant / SHH等在本地(安全性等)配置Linux(我将使用Ubuntu)虚拟机,然后在上线时使用相同的配置是有意义的。

So basically there's two options: 因此,基本上有两种选择:

(1) No, use Vagrant to set up LAMP, but the same setup then needs to be manually configured on a real server
(2) Yes, you can have your LAMP config used on a real server (and how do I do this)

What you want to do is use something to help with configuration automation. 您要做的是使用某些东西来帮助配置自动化。 Puppet and Chef are some popular ones, and you could always "roll your own", but I know puppet can help you easily replicate your configuration on both your VM and your production server. Puppet和Chef是一些受欢迎的工具,您可以随时“自己滚动”,但是我知道puppet可以帮助您轻松地在VM和生产服务器上复制配置。

Checkout http://www.puppetlabs.com 结帐http://www.puppetlabs.com

There's also Puppet Forge which has a lot of available modules that are already built for helping configuring things like Apache, and other server technologies you might be using. 还有Puppet Forge,它具有许多可用的模块,这些模块已经构建用于帮助配置Apache和您可能正在使用的其他服务器技术。

Virtualbox, VMWare are only providers , you can find plugin for use DigitalOcean or AWS (or you can create your provider ) how providers and you can install your service in production ENV. Virtualbox,VMWare只是提供者 ,您可以找到用于DigitalOcean或AWS的插件(或者您可以创建您的提供者 )提供者的方式,以及可以在生产ENV中安装服务。

This is a (blog article)[https://www.digitalocean.com/community/articles/how-to-use-digitalocean-as-your-provider-in-vagrant-on-an-ubuntu-12-10] for DigitalOcean.. In this example use shell how provisioning system 这是(博客文章)[https://www.digitalocean.com/community/articles/how-to-use-digitalocean-as-your-provider-in-vagrant-on-an-ubuntu-12-10] for DigitalOcean ..在此示例中使用shell如何配置系统

A very flexible way to achieve this, being also cloud provider independent, is to define your LAMP server using ElasticBox . 也是独立于云提供程序的一种非常灵活的实现此目标的方法是使用ElasticBox定义您的LAMP服务器。

There is a tutorial that shows you what are the steps to achieve the one click automated deployment of your customized LAMP environment: 有一个教程向您展示了实现自定义LAMP环境的一键式自动部署的步骤:

https://elasticbox.com/documentation/sample-tutorials/lamp-stack/ https://elasticbox.com/documentation/sample-tutorials/lamp-stack/

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

相关问题 我可以在 Ubuntu 服务器上同时运行 lamp 和 linux 终端命令吗? - Can I run lamp and linux terminal commands simultaneously on Ubuntu server? 如何在Linux中设置权限,以便两个用户可以在服务器上更新相同的SVN工作副本? - How can I setup the permissions in Linux so that two users can update the same SVN working copy on the server? 在Linux上设置SVN / LAMP / Test Server /,从哪里开始? - Setup SVN/LAMP/Test Server/ on linux, where to start? Hetzner服务器上的设置指示灯 - Setup Lamp on Hetzner server LAMP服务器的Linux用户和组 - Linux users and groups for a LAMP server 修复文件权限,以通过带有灯泡设置的Linux服务器centos中的php代码读取读写访问鱿鱼配置 - fix file permission to read write access squid configuration via php code in linux server centos with lamp setup 如何在笔记本电脑上快速创建 LAMP 开发服务器? - How can I quickly create a LAMP development server on my laptop? 在新的Lamp linux服务器上的PHP会话 - Php Session on a new Lamp linux server Android linux部署(localhost LAMP服务器配置) - Android linux deploy (localhost LAMP server configuration) Windows服务器人员想要一种简单的方法来迁移到Linux / Java(我想是LAMP) - Windows server person wanting an easy way to migrate to Linux/Java (LAMP I guess)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM