View Full Version : How do I go about this? (LAMP in a VM for backup)
Bitchkoma
07-28-2009, 04:04 PM
I set up a LAMP in a VM on my home computer. I didn't want to NOT use Windows 7... besides mysql and apache seems to be crippled on that OS. It would not start.
Anyway, I set it up as a backup for that other server. Well that's the intention, at any rate. I probably shouldn't have installed the same desktop version as I did with the other server, cause after a couple of hours downloading and configuring apache, mysql and php, it made me think, is there a distro out there that specializes in minimal server installs on a vm? All that other shit like firefox, open office etc are redundant. It's a vm.
Yeah, where was I heading with this... oh yes, backup. I've configured the domain and shit (it's live!) but I set up a different name. The idea is for it to be a mirror. So if my 'O' server is mydomain.com.my, this vm server is mydomain-mirror.com.my. But is it possible to configure it so that if mydomain.com.my is down, the mirror server automagically accepts traffic headed to to 'O' server domain as well as its -mirror domain?
Load Balancer or if behind a firewall and private network, re IP the machines or change the local hosts file if used, if one goes down. I imagine there could be other optiions.
Here's something...
http://onlamp.com/pub/a/onlamp/2003/04/03/linuxhacks.html
Bitchkoma
07-28-2009, 05:18 PM
Hey thanks! That looks like a big part of what I'm looking for. Also, do you have any good resources on how to use cron?
phushion
07-28-2009, 05:24 PM
Slightly off topic but any suggestions for running apache on win 7 as bitch said it fails to load, i havent looked into it as such yet but if theres a quick fix it'd be nice to know.
Was the only thing stopping me using the 7029 release as everything else went on a treat.
Cogburn
07-28-2009, 07:32 PM
mySQL is a piece of shit that serious developers stopped using years ago.
Table locks? WTF is that shit?
Use SQL2008 Express or Oracle 10g.
Infinitely more support and you might just learn a skill that gets you a job some day. :)
phushion
07-28-2009, 08:29 PM
No offence mate but tell that to the MySQL guys, were small time folks, keepin it simple.
Cogburn
07-28-2009, 08:36 PM
Hahaha... Just fucking around. I shouldn't talk shit. It was an online game I wrote in PHP/mySQL that set me on the path for the job I have today.
mySQL has it's place.
Oracle 10.4g and SQL2008 both have fully featured free versions that support databases up to 4GB. That's more than ample for most hobby projects and it was to compete w/ mySQL.
Most of the stuff I play with nowadays involves billions of records. I use Oracle when I make little projects just because it's what I use at work.
Table locks are a part of the myisam engine. Use another engine without them if it is a problem.
Cogburn
07-28-2009, 09:25 PM
Yeah... but myISAM is what gives you all the goodies.
Unless they've added something new since I stopped playing with it.
The InnoDB Storage Engine
13.2.1. InnoDB Overview
InnoDB provides MySQL with a transaction-safe (ACID compliant) storage engine that has commit, rollback, and crash recovery capabilities. InnoDB does locking on the row level and also provides an Oracle-style consistent non-locking read in SELECT statements. These features increase multi-user concurrency and performance. There is no need for lock escalation in InnoDB because row-level locks fit in very little space. InnoDB also supports FOREIGN KEY constraints. You can freely mix InnoDB tables with tables from other MySQL storage engines, even within the same statement.
InnoDB has been designed for maximum performance when processing large data volumes. Its CPU efficiency is probably not matched by any other disk-based relational database engine.
Fully integrated with MySQL Server, the InnoDB storage engine maintains its own buffer pool for caching data and indexes in main memory. InnoDB stores its tables and indexes in a tablespace, which may consist of several files (or raw disk partitions). This is different from, for example, MyISAM tables where each table is stored using separate files. InnoDB tables can be very large even on operating systems where file size is limited to 2GB.
InnoDB is included in binary distributions by default. The Windows Essentials installer makes InnoDB the MySQL default storage engine on Windows.
Contact information for Innobase Oy, producer of the InnoDB engine:
Web site: http://www.innodb.com/
Email: innodb_sales_ww at oracle.com or use this contact form: http://www.innodb.com/contact-form
Cogburn
07-28-2009, 09:41 PM
OOOOoooooo.... now that's nifty. A freeware port of Oracle's tech.
Does mySQL5 offer transactional statements regardless of the engine, or is it tied to myISAM still?
Transactions are are part of innodb engine not myisam engine.
MySql storage engines documentation (http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html)
There are newer versions above 5.0
Cogburn
07-29-2009, 03:00 AM
Niiiiiiiiiiice... I'll hafta take a peek. I could have sworn that there was a transaction system for myISAM... Guess I'm just high. :)
There's some folks looking to draft my help making a league for the upcoming release of MW5. They're using PHP/mySQL as the backend and for the minimum amount of transactions per second at high load that I know it's going to require I seriously had my doubts.
Good thread. :)
phushion
08-23-2009, 09:57 PM
Just incase anyone cares i managed to get apache running on windows 7 rtm, it seems by disabling UAC (dont forget to reboot) and perhaps disabling driver signing shite aswell should do it altho that last bit might not be needed. Also i installed it to C:\AMP so not sure if that made a difference but its up n running no issues, havent configured it yet with php nor tested out any of my sites/apps but appears to be good.
Screener for anyone who cares.
[inmg=:xyx5trud]http://trippled.co.uk/_external/apache.png[/inmg:xyx5trud]
Bitchkoma
08-24-2009, 03:23 AM
UAC! Why didn't I think of that? That's good info, dude!
phushion
08-24-2009, 08:24 AM
No worries man, im not entirely sure if thats responsible for it but it was one thing i hadnt done last time i tried, i installed version 2.0.54 (apache_2.0.54-win32-x86-no_ssl.msi) windows installer, theres a bit of info on how to get it installed using command prompt with admin rights here for version 2.2 (Which should be irrelevant now):
http://devoracles.com/installing-apache-22-on-windows-7-beta
Points 6, 7 and 8 after the initial installation (which with a regular win 7 setup should fail installing the http service).
Everything else should work providing apache is running and your httpd.conf/php.ini files are setup correctly, remember if you use IIS for SMTP to either shut down the IIS web server or remap the HTTP port to 8080 (or one of your choosing) so it doesnt interefere with apache, i prefer to just turn it off and only enable the SMTP service when required as if you get stung by some dodgy file or another it could well utilize the service to spam folks with dodgyness (yes its happend to me before, so fucking what).
Hope it helps.
phushion
08-24-2009, 08:46 AM
Another screener to confirm that apache, mysql and php are working as expected:
[imgs=650:366tbmuk]http://trippled.co.uk/_external/confirmed.png[/imgs:366tbmuk]
Alessandra
08-24-2009, 10:14 AM
I think my brain just imploded.