Saturday, October 22, 2011

Setting up RackSpace Cloud Server

Setup Php5, apache

sudo apt-get install php5 php5-cli libapache2-mod-php5 apache2
export EDITOR=/usr/bin/vim

vmstat -m (shows memory listing)

Memory ran out while trying to do this (free -m showed 40M free)...restarting the server 'shutdown -r now' freed up alot of memory (200M free after reboot).

configure virtual host setup (support multiple domains)
http://www.debian-administration.org/articles/412

my friend installed mysql for me...

to test the subdomain--need to have godaddy point to my new server (since they are also my registrar)....to do this, go into the godaddy domain manager and than you can enter a new 'A' record under the "total dns" manager.

Install APC on debian (lenny)
http://www.electrictoolbox.com/install-apc-php-debian-5-lenny/

---
Not sure if this is the kind of level you are after but this is what I wrote
up for use in my organisation if we need to perform a complete disaster
recovery of our wiki. This has been tested numerous times for both recovery
on the same server, as well as migrating to another server. I haven't tried
between OS though but don't see there would be any issues with that.

Before doing this, Apache2 needs to be configured in the same manner (ie
same directory root etc), correct php version installed and compiled, etc.

A couple of things: wikidb.servername.$DAY is just a gzipped mysql dump of
the database. wikifiles.$DAY.tbz is simply a tar of the entire directory
structure. I have a cron job run daily to backup both.

Create Database
Mysql –u root –p
Create database wikidb;
Exit
Restore Database files
Cd /
Gunzip wikidb.servername.$DAY.gz
Mysql –u root –p wikidb < wikidb.servername.$DAY Ensure database restored mysql -u root -p wikidb show tables; User account in MYSQL
Mysql –u root -p
create user 'wikiuser'@'localhost' IDENTIFIED BY 'password to be used'
IMPORTANT make sure this is also the same as in the LocalSettings.php
file!';
Grant privileges to wikiuser on wikidb database
Mysql –u root –p
GRANT ALL ON wikidb.* TO wikiuser [at] localhost


Flush privileges;

Restore wiki config files and images
Cd /
Tar –xvjf //wikifiles.$DAY.tbz
Complete restore process complete – to make sure, perform test plan again

Potential things that ** may ** be required are:
//maintenance/php5 rebuildall.php
Double double check the correct database, username, password are used in the
//LocalSettings.php file
Make sure apache is set up correctly, and the wiki location set
appropriately in the LocalSettings.php file

MySql Setup
first install it

mysql -u root -p

mysql> create database hindupedia;

mysql> grant index, create, select, insert, update, delete, alter, lock tables on hindupedia.* to 'user'@'localhost' identified by 'password';

mysql> flush privileges;


Locking down the server

http://blog.jtclark.ca/2010/02/configuring-zend-server-ce-in-ubuntu-9-10-on-a-rackspace-cloud-server/