开发者

How can I quickly create a LAMP development server on my laptop?

开发者 https://www.devze.com 2023-03-01 16:48 出处:网络
I recently took up PHP development, and am trying to find a comfortable development environment. I have been trying to work in a windows 7 x64 environment, but am finding a lot of issues with writing

I recently took up PHP development, and am trying to find a comfortable development environment. I have been trying to work in a windows 7 x64 environment, but am finding a lot of issues with writing PHP on a windows system (much less a 64-bit windows system)

I currently have 3 systems I can use at home. A desktop, a netbook, and a laptop. I also have a shared hosting account at dreamhost.com

I have been developing on my main desktop (win 7x64) and netbook (win 7x64) with a remote SQL server and SVN server hosted on dreamhost.com. This is fine, but I would really like to have my applications running on a linux server at home (to simulate / dry launch before I push them to my dream开发者_JAVA百科host account)

I haven't used my laptop in a year, and think it could be used as a mock-production server. I could store my SQL, SVN, and 'live' application there - and have the freedom to change distros / server configuration - which is inherently more difficult with my shared hosting account.

Can anyone recommend a good linux distro, and things I should have installed on my laptop to have it perform well as a development server? I am not a complete noob to linux, but am by no means advanced. My first choice would be ubuntu, but I don't know if this is the best for what I am trying to accomplish.

Any help is very much appreciated.


In Windows, install Virtualbox, install Ubuntu on it. From Ubuntu install the apache, mysql, and php packages and whatever else you like to develop with. You can follow this howto if you like. This is what I do and it works flawlessly for me. I can develop in linux when I want and still have Windows when needed without having to deal with dual booting.


On Linux, Windows, Mac OS or Solaris you can simply install XAMPP which gives you much more than just Apace, MySQL, PHP application.


I would highly recommend TurnKey Linux which is built on top of Ubuntu. They have many distros of prepackaged software combinations available to download either the ISO or VM. They have a LAMP stack applicance that you can start with. I use them anytime I need a server up in almost no time.

Just download/install VirtualBox, the Turnkey LAMP VM image, and create a new Ubuntu VM in virutal box, select existing harddrive image, and select the Turnkey VM image.


You can install a LAMP environment with Ubuntu and I hear it works pretty well. (i have never done it myself)

There are docs on how to do it throughout the net


If you are going to run Linux, all these services are native to Linux. All you have to do is install linux (I prefer Ubuntu) and select php, apache, and mysql. Everything loads natively and you simply load up your MySQL DB and drop in the HTML in the www folders. It's actually easier to get something running on Linux than on WAMP!

If you load the Server version of Ubuntu, you can select the "LAMP" stack during install and Ubuntu will automatically load PHP, MYSQL, and Apache for you. If you install the desktop version, you simply select the options during the GUI install and you are good to go.

Linux is very easy to get running with these components.


It's usually a smart idea if your development server is running (roughly) the same stack as your production server. You're using Dreamhost. They use a LAMP stack running off Debian. So, I'd recommend you use that. Do check the PHP version and installed modules (have a look at the phpinfo() output on dreamhost) to determine what packages and versions you should install.


Have a look at Devilbox. It is an os independent docker LAMP/MEAN development stack which is pre-configured out of the box and offers features as such:

  • PHP: 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2 and 7.3
  • Xdebug
  • automated vhost creation
  • unlimited number of projects
  • valid https for all projects
  • email catch-all
  • automated DNS
  • phpMyAdmin, phpRedmin, Adminer, OpCacheGUI
  • Apache, Nginx, MongoDB, MySQL, MariaDB, PerconaDB, PostgreSQL, Redis, Memcached, MailHog, Solr, RabbitMQ, etc
  • Extensive documentation

How can I quickly create a LAMP development server on my laptop?

Project:

  • Github: https://github.com/cytopia/devilbox
  • Documentation: https://devilbox.readthedocs.io/en/latest/
  • Gitter: https://gitter.im/devilbox/Lobby
  • Website: http://devilbox.org/
0

精彩评论

暂无评论...
验证码 换一张
取 消