As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Resources for learning Apache on Linux

CalicaCalica Registered User regular
My company has neither a sysadmin nor a DBA. I'm a developer and not really qualified to fill either of those roles, but there's no one else, so it falls to me. Googling for help results in the all-too-common problem of documentation assuming a certain level of basic knowledge that I do not have. Short of taking a few classes - not going to happen for several reasons - where can I learn the fundamentals of Apache on Linux and basic best practices for database administration?

My predecessors didn't even set up scheduled database backups.

Most of my experience is with IIS on Windows, and I'm not used to doing everything from a command prompt. I'm more than a little afraid of making a mistake that affects our hosted sites, because literally no one would know how to fix it, and I don't even know where the potential landmines are.

Also, judging by the rest of my job, there's a non-zero chance our server setup is held together by string and chewing gum; but I wouldn't necessarily recognize a bad decision in this context.

Posts

  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    Since you're more used to IIS on Windows, the first question is: What's your baseline Linux knowledge base?

    Apache docs are p. good. But, the horse book from O'Reilly isn't OK as a comprehensive guide to Apache, and the moose book has some best practices (cookbook).

    But if you're not comfortable with Linux command line out of the gate, you might want to look into some quick tutorials from places like edx, udemy (don't ever pay more than $11 for a course, and look at the reviews), or other such online "academy".

  • Options
    AridholAridhol Daddliest Catch Registered User regular
    udemy has some good stuff for linux basics.
    The apache admin handbook is not bad but that is pretty old so I'm not sure if they've kept it current.


    I would 1000% recommend trying to replicate the current setup in a VM that you can test things out on.
    for the DB stuff do you know what db they are running? MySQL?


    basically I would create a learning plan for yourself.

    Step 1: Find out what is installed and running (distro? DB software?) and replicate it in a VM or multiple VM's
    Step 2: Figure out what immediate tasks are being asked of you (one should be to schedule regular backups of DB's). Some more might be applying security updates, starting/stopping services, access controls, whatever the company wants
    Step 3: Practice those tasks in your test environment until you feel semi-confident.
    Step 4: practice practice practice backing up and restoring because eventually a horrible mistake will be made
    Step 5: convince company to have a pre-production environment if it doesn't already have one. (Note: this isn't a backup like some companies think...)


    Step 6:
    This is the most important step.
    Calculate how much money the company will lose should a common scenario like hardware failure wipe out some data. Or a hack because no one is managing servers properly. Or lost productivity if you happen to go on vacation or get sick.
    Print this on a few dozen sheets of paper and then go and beat the person who thought this was a good idea with it.

  • Options
    CalicaCalica Registered User regular
    The DB stuff is all MySQL.

    What do I need to know to recreate the environment in a VM, other than what Linux distro we're running? Like, if we had a Windows server, I'd look at services, Programs & Features, IIS settings, etc. With Linux I'm still kind of feeling around in the dark.

    The people responsible for this mess are long gone. Nightly database backups definitely need to happen, and also a dev environment and a documented process for spinning up developer VMs. Also, source control. (We have a dev environment, sort of, but it connects to the production databases, so its usefulness is limited.)

    The main issue is time. The other dev and I were hired after the company had been dev-less for several months after their old developer (singular) got sick. We've been scrambling to catch up with the support queue for the past six months while learning an undocumented codebase, plus my teammate's been teaching himself to code as he goes (and doing a stellar job at it, I might add). Our manager's been in panic mode since the old dev left, so he's kind of in the middle of a demonstration of what happens when you don't plan ahead. We'll see if it sticks :razz:

    We've been steadily gaining on the backlog, though. Once things are a little less on fire I think I'll talk to my manager about taking some time to get basic safeguards in place. He's "not a tech guy," but he understands that he doesn't understand what we do, so at least there's that.

    And yes, this job does in fact have "dumpster fire" written all over it; but the money's good and I'm enjoying the challenge. Plus it's full-time work from home, and that counts for a lot.

  • Options
    AridholAridhol Daddliest Catch Registered User regular
    for the VM, distro's you're running (match versions and ideally updates though I have no idea how you'd manage that). Install the same mysql and apache for sure.


    Export everything from the "production" environment and import it into your running vm's
    https://stackoverflow.com/questions/9497869/export-and-import-all-mysql-databases-at-one-time

    You'll need to look at your apache settings and this is going to be a little different in different distros so browse the apache folders on the prod environment and find out where your conf files are.
    You'll need to specifically look for which "modules" are enabled. These would be like services I guess in IIS (never used it)?

    Next find out what your directories are for whatever web apps and replicate this (create the dirs or ftp it all over to the vm in the correct directories).

    You'll most likely need to configure users and passwords in your vm to be the same as production, or, change it all (this is a pain in the ass but if you don't know all the users/passwords....)

    It's been about 3 years since I did any of this for work so I'm hesitant to give specific filenames but I am sure httpd.conf is still around. Start there.

Sign In or Register to comment.