Hi,

I am at the start of learning php and mysql and I am just building a server to load lamp on. My question is are windows lamp servers any better than ubuntu lamp servers. Is one more industry standard or easier to use and setup, or both the same?

Look forward to your reply.

Rocketman46

    My two cents:

    You'll get better performance and a rather more secure environment from a LAMP server than a WAMP server, plus a lower ICO (startup cost).

    However, there will be a trade off of a higher learning curve with LAMP (ultimately). And you'd have, arguably, even better performance/security with BAMP (BSD) over LAMP, but a similar trade off (even higher learning curve), with the quid pro quo that both are free are more similar to each other than either is to Windows.

    So, if you're really wanting to learn backend IT stuff, you'll get "experience" at 2x the rate at least by choosing a non-Windows solution. If it's really about saving time and you have bucks to burn, WAMP can work pretty well, though.

      I use Ubuntu on my workstation. It rules.

        Hi,

        Ok ubuntu it is then.

        So I have a 32 bit pc, do I download ubuntu 32 bit desktop version. Also can I download an auto configure lamp.

        Could you point me to the links of which desktop version, which lamp version and a link of how to setup. Lastly if I get stuck on setup and also trying to configure my firewall can I ask question on here?

        Many thanks for your help.

        Rocketman46

          I'm a Windows baby and I would still choose Linux for a web server. As mentioned previously, there is a learning curve but you come out ahead. I have learned so much over the last 6 months or so. Whether I like it or not, when it comes to web development, Windows is a second-class citizen (.NET notwithstanding).

          Regarding 32-bit vs. 64-bit: The main decision factor here is if you have more than 4GB of RAM. If you do, then go with 64 bit, otherwise you cannot utilize more than 4GB. And you'll even end up with less (usually around 3.2) because the system needs to address some memory in other areas. This has nothing to do with the OS by the way. What I mean is it's not a Windows issue or a Linux issue or whatever.

          I think the last installation of a 32-bit OS for me was XP. Beyond that (Vista, 7, 8.1, etc.) have all been 64-bit and anytime I've used Linux it's been 64-bit.

            And, of course, for local development on pretty much any personal computer these days, you can spin up a virtual machine with whatever flavor of Linux (or other OS), languages, web server, etc. you want on it.

              Weedpacket is correct. If your processor really is 32-bit then it simply cannot run a 64-bit operating system. Personally, I'm a bit skeptical that the processor is really 32-bit. Even mobile phones these days are starting to use 64-bit processors. Perhaps if you were to give us information about your actual hardware, we'd be able to help guide you better.

              There's no real harm in installing 32-bit Ubuntu even if your machine is 64-bit -- unless the machine has more than 4GB of RAM, in which case it would not be able to fully utilize all of your memory.

              Step one then is to choose the right version of Ubuntu. Choose an appropriate release. Unless I'm mistaken, it looks like they are almost finished with 16.04 -- it's in final beta. Unfortunately, because it's not quite finished, it will be "unsupported." If you can wait a week or two for the real release, you'd probably be better off. OR you can install 15.10 which won't be supported much longer (until July) or you can go for Ubuntu 14.04 which will be supported for probably a few years (see [https://wiki.ubuntu.com/Releases]Releases chart[/url]). Note that 14.04 and 16.04 are Long-Term Support (LTS) releases which means that Canonical supports them with security patches, etc. for longer. I suggest installing 16.04 if you can wait for the final release, 14.04 otherwise. Use the Desktop version.

              14.04 can be downloaded here:
              http://releases.ubuntu.com/trusty/
              If your PC has a CD or DVD drive in it, just download the ISO and burn it to a disk, throw it in the optical drive and reboot the machine (making sure of course that the machine will attempt to boot from the optical drive before the hard drive). If your PC has no optical drive, then you'll have to use a different approach. I haven't done this myself but can help you figure it out if you must do it that way.

              Once you get your PC to boot from the Ubuntu installer disk, it's pretty simple. Once the machine has Ubuntu installed, we can start to talk about setting up Apache, MySQL, and PHP.

                Hi all,

                Thanks for all your help.

                OK I will wait a couple of weeks and get the latest 16.04.

                Yes I have an old 32 bit pc with 4GB of ram. So I am putting a new hard drive in, and making this into a server.

                As I am very new to servers. An area I have not worked out yet, is I have a website and it is running on the internet with a web address. I want to modify this website and put on my server for testing development purposes. Is the server web address something like 192.111.000 etc instead of my web address? How would I access the sever. How do I generate the test web address?

                Thanks

                Rocketman46

                  Rocketman46;11054695 wrote:

                  As I am very new to servers. An area I have not worked out yet, is I have a website and it is running on the internet with a web address. I want to modify this website and put on my server for testing development purposes. Is the server web address something like 192.111.000 etc instead of my web address? How would I access the sever. How do I generate the test web address?

                  This will sort of depend on how the network is set up where you plan to work. You'll probably need to develop some understanding of how subnets work.

                  I'll use my current office as an example. It's not too dissimilar from the places I've worked in the past.

                  My Internet Service Provider (ISP) is Time Warner cable. I pay them about $50 a month for access to the internet with a download speed of about 25Mbps. They bring this service to my office by connecting a wire from their system to a cable modem in my office. This cable modem has an ethernet port into which I can plug either my computer or a router. I chose to plug in a wireless router so that I can connect more than one computer (or TV or iPad or whatever) to the internet. Here's where things get a little tricky.

                  If I connect to this website from any computer or device connected to my router, it will always tell me the same IP address:
                  http://whatismyipaddress.com/
                  This is because that website is tell me my public ip address -- This is the ip address that is assigned to my cable modem by Time Warner, my ISP.

                  Locally, however, the router has created a Local Area Network (LAN) -- this is a subnet and the addresses on it are not accessible to the public internet on the other side of that cable modem. My router is responsible for doling out temporary IP addresses on my LAN using Dynamic Host Configuration Protocol (DHCP). DHCP is used when someone connects via WIFI using a laptop, iPad, phone, or other device with WIFI. The basic idea is that the device is assigned a temporary IP address by my router so that it can send and receive traffic. These IP addresses usually look like 10.x.x.x or 192.168.x.x because those addresses are Reserved IP Addresses and as such are useful for a local, private network. The range used may depend on your router. Read the instructions.

                  You can also set up certain devices to have a static IP address -- i.e., ip addresses that do not change. How you do this will vary by machine. Some guy did a youtube tutorial here:
                  https://www.youtube.com/watch?v=o9fJWDoX4nE

                  Alternatively, If you plan to use this new computer you are setting up as a workstation and run your software dev programs from the machine itself, you can access its web server at 127.0.0.1 or localhost. Or, as some have suggested, you can run virtual machines on the computer, although I don't have much experience doing so.

                    What I've got set up at home is a separate box running Ubuntu Server with Apache, MySQL, and PHP on my local area network behind my firewall. Technically, yes, it's connected to the internet, but it doesn't go there. I develop on my Windows machine and "upload" the files to my local Ubuntu server across the local area network. That's where I develop and test everything. You'll want to download Putty in order to control the server from your development machine (unless you've got a spare monitor and keyboard lying around, but even then it's easier with Putty), and look into setting up virtual hosts in Ubuntu, which is actually quite simple even if you're like me and know next to nothing about Linux. I mean, I don't hyperventilate when I see a command line interface, but I'd rather avoid one when possible.

                    So, for me when I start a new project, I'll Putty in to the Ubuntu server from my Windows box, create a new virtual host called something along the lines of 'projectname.com', use phpMyAdmin or MySQL Workbench to create the database, code on the Windows box and upload to the local Ubuntu server. Because it's a virtual server, it's almost exactly like dealing with a live hosting environment except that the customer can't access the local server - that's where you bring in a staging server, something along the lines of 'dev.yoursitename.com' where the customer can actually see the work when it's ready for milestone presentations. This also gives you a chance to troubleshoot and server-specific issues you may run across before the site goes live.

                    As a bonus to working this way, you get to learn a little Linux while you're at it.

                      maxxd;11054717 wrote:

                      What I've got set up at home is a separate box running Ubuntu Server with Apache, MySQL, and PHP on my local area network behind my firewall. Technically, yes, it's connected to the internet, but it doesn't go there. I develop on my Windows machine and "upload" the files to my local Ubuntu server across the local area network. That's where I develop and test everything. You'll want to download Putty in order to control the server from your development machine (unless you've got a spare monitor and keyboard lying around, but even then it's easier with Putty), and look into setting up virtual hosts in Ubuntu, which is actually quite simple even if you're like me and know next to nothing about Linux. I mean, I don't hyperventilate when I see a command line interface, but I'd rather avoid one when possible.

                      So, for me when I start a new project, I'll Putty in to the Ubuntu server from my Windows box, create a new virtual host called something along the lines of 'projectname.com', use phpMyAdmin or MySQL Workbench to create the database, code on the Windows box and upload to the local Ubuntu server. Because it's a virtual server, it's almost exactly like dealing with a live hosting environment except that the customer can't access the local server - that's where you bring in a staging server, something along the lines of 'dev.yoursitename.com' where the customer can actually see the work when it's ready for milestone presentations. This also gives you a chance to troubleshoot and server-specific issues you may run across before the site goes live.

                      As a bonus to working this way, you get to learn a little Linux while you're at it.

                      This sounds a lot like what I do, except I work on the Ubuntu machine itself! This eliminates the need to upload any files from some workstation to the server. My workstation is the server. You can't run Microsoft Office or Adobe programs on an Ubuntu machine AFAIK, but there are a lot of good open source programs that do the job just fine.

                      Whether you use your workstation as a server or whether it's a separate machine, it will still behave pretty much exactly like any linux server you'd have for a real server. It does require you to learn some linux, but I've found that this really pays off for your development skills.

                        Hi all,

                        Thanks again for your input.

                        I would like to do something similar to #11, develop on my Windows PC and send data across to the Linux server. Lastly I would like to test the website from the internet side, as I want to interact with the website.

                        I this still possible?

                        Many Thanks,

                        Rocketman46

                          Rocketman46;11054755 wrote:

                          Hi all,

                          Thanks again for your input.

                          I would like to do something similar to #11, develop on my Windows PC and send data across to the Linux server. Lastly I would like to test the website from the internet side, as I want to interact with the website.

                          I this still possible?

                          Many Thanks,

                          Rocketman46

                          Absolutely it's possible - just set up as described. I think I spent about $200 on an eMachine from WalMart, wiped the Windows installation, installed an Ubuntu LAMP stack, and hooked the machine up to my home network. It takes some tweaking with Samba to get Windows and Ubuntu to talk to each other, but once you do you're set. You can develop on your Windows box using whatever software you want, then drag and drop to the local server. Of course, if you're setting up virtual hosts for the sites you're developing you'll have to edit your Windows machine's .hosts file, but then you can just point your browser to the virtual host and it's pretty much exactly how your live host works. Once you get the project to a presentation milestone, create a subdomain on your current website and upload everything there for the client to review.

                            I'm pretty much 50/50 between bare hardware and virtualization. I really like virtualization for development (Virtualbox is free and I find it very stable on Windows, with FreeBSD or Linux guests), but I like bare hardware 'cause I'm geeky that way and still occasionally like to get my hands cut on cheap sheet metal 😃 ...

                            That said, if you've got a powerhouse workstation already and download Virtualbox, there's no need to have $200 for the eMachine --- you can spend it on fast cars, cigars, dates with supermodels, groceries, diapers, pain medication, divorce court, etc. 🙂 :p

                              As a practical matter, I always found it onerous to have to copy my files to the server before seeing how they worked. This extra step of dragging/dropping files or using FTP or whatever actually contributed a substantial amount of effort to my development tasks.

                              It was quite a leap for me to get away from using Windows software -- Dreamweaver was really hot at the time -- but once I jumped to Ubuntu, my productivity really jumped. I have maybe a dozen projects, each in their own subdirectory:

                              /var/www/project1
                              /var/www/project2
                              /var/www/project3
                              etc.
                              

                              And each website has its own apache configuration file that sets up a <virtualhost> mapping of some domain onto each of those project directories, and then I make an entry for each domain in my hosts file. The domain names on my workstation don't usually match the live domain (because I still want to be able to go out and check that live site) but it's close. For example, if I'm working on MyProject.com, I'll set up a local domain on my worksation, mproj.com.

                              Things can get a little complex if I want to access more than one site via HTTPS but I usually disable one project's apache conf and enable the other. It just takes a couple of commands via CLI.

                              And Dalecosp does point out that you get a little $$savings for not having another machine. You also save electricity cost, space cost, etc. You could use the extra money to buy another 22" monitor and further enhance your productivity.

                              I'm not especially familiar with running linux virtual machines on windows, but I've heard of many folks doing this. It's a pretty awesome skill because you can check your code with a bunch of different versions of PHP or Apache or whatever if that's something you need to do.

                                sneakyimp;11054767 wrote:

                                As a practical matter, I always found it onerous to have to copy my files to the server before seeing how they worked.

                                Hmm; in my IDE CTL+S does the FTP work for me; also Notepad++?

                                sneakyimp;11054767 wrote:

                                I'm not especially familiar with running linux virtual machines on windows, but I've heard of many folks doing this. It's a pretty awesome skill because you can check your code with a bunch of different versions of PHP or Apache or whatever if that's something you need to do.

                                Since you don't use Windows any longer, I guess that's to be expected. I was offered Windows or a Mac when I got this job, and because IE on Mac was stuck Way Back and IE on Windows was still a bit of an issue back in 2010, I opted for Windows.

                                I've found Virtualbox to be extremely useful, easy to administer and set up, and though it used to seem as if it leaked RAM like a rubber canoe in the North Atlantic, it's been VERY well-behaved on my workstation for over a year now (not sure when it got better, around v4.3.16 maybe? I'm now on 5.0.14). I used to run it on my FreeBSD workstation when I had my own shop and it was useful in THAT context for having Windows VM guests, amongst other things.

                                  sneakyimp;11054767 wrote:

                                  As a practical matter, I always found it onerous to have to copy my files to the server before seeing how they worked. This extra step of dragging/dropping files or using FTP or whatever actually contributed a substantial amount of effort to my development tasks.

                                  It was quite a leap for me to get away from using Windows software -- Dreamweaver was really hot at the time -- but once I jumped to Ubuntu, my productivity really jumped.

                                  Don't laugh, but I still use Dreamweaver code view. Many, many years ago I got used to the keyboard shortcut for upload, so now I save, upload, then Windows key + Tab to my browser in about three key strokes. That and DW is part of Creative Cloud which I need anyway, so it's kinda free... :rolleyes:

                                  I've worked in situations where the development machine was the server but honestly didn't like Vim, and it didn't boost productivity all that much for me, but it boils down to personal preference in the end.

                                  Never thought about virtual machines for different versions of PHP - that's kind of an awesome idea that I may explore soon...

                                    maxxd;11054771 wrote:

                                    Don't laugh...




                                    Heheh ... but seriously, I think we've fought enough editor wars here to realize that a] it's a personal preference thing, and b] you can type bad code, or good code, into pretty much any piece of software there is, and PHP will still run it as bad, or good, code 😉 🙂

                                      maxxd;11054771 wrote:

                                      Don't laugh, but I still use Dreamweaver code view. Many, many years ago I got used to the keyboard shortcut for upload, so now I save, upload, then Windows key + Tab to my browser in about three key strokes. That and DW is part of Creative Cloud which I need anyway, so it's kinda free... :rolleyes:

                                      I'm so not laughing. Dreamweaver was a great leap forward for me from Notepad and an FTP client (seriously!). It is nice that it can render the HTML for you. And your save-upload technique sounds exactly like what I was doing. I bet DW has improved since I was using it, but I remember having issues with the files getting uploaded.

                                      So one day I installed Ubuntu on my windows machine as an alternate boot option. Ubuntu is a mature, user-friendly OS now and is very similar to windows in many ways -- except you have linux underneath. I cast around a bit for a editor and eventually settled on Eclipse because it's code-aware. I can click on a function or class or variable, hit the F3 key, and it takes me to the code that defines that function/class/var. It also has autocomplete functionality -- if you start to type a function name, it prompts you with matching options as you type. Then when you select the function you want, it prompts you for the parameters and even shows documentation to explain in most cases explaining what the params do. This code awareness has been a huge boost -- even more than avoiding the save-then-upload keystrokes. You can also step through your code if you set up Eclipse properly, but I've always found this to be a nightmare and my setup frequently got broken when software was updated.

                                      I hear PHPStorm is even better.

                                      maxxd;11054771 wrote:

                                      I've worked in situations where the development machine was the server but honestly didn't like Vim, and it didn't boost productivity all that much for me, but it boils down to personal preference in the end.

                                      I never got into Vim either and never ever use it. If I must edit from the command line (which is sometimes convenient, e.g., when editing the hosts file) then I'll use nano.

                                      sudo nano /etc/hosts

                                      As I mentioned above, Ubuntu is an OS with all kinds of (free) user-friendly software. Don't think you'll be stuck using the command line.

                                      maxxd;11054771 wrote:

                                      Never thought about virtual machines for different versions of PHP - that's kind of an awesome idea that I may explore soon...

                                      I've been meaning to explore it "soon" as well but have yet to get around to it. I got a lot of helpful advice in this post some time back.