Tuesday, April 19, 2011

This is for me.

copy mysql db to cloud

- dump your db
- mv to www server
- go to amazon aws server
- run this

sudo scp username@www.mediu.edu.my: ./


wait untuil it finish

Thursday, April 7, 2011

SNMPD on freebsd

I'm using FreeBSD 8.2 and here's the basics for getting snmp working:

cd /usr/ports/net-mgmnt/net-snmp
make
make install
make clean

edit /etc/rc.conf
add snmpd_enable="YES"

cd /usr/local/share/snmp
edit snmpd.conf (you may have to create it)
add the following
syslocation home (replace home with whatever you'd like)
syscontact me@here.com (put in your e-mail or whatever)
rocommunity private (replace with whatever read only name you'd like)
rwcommunity public (again, change this to whatever you'd like)
master yes
now save and exit

cd /usr/local/etc/rc.d
./snmpd.sh start

This will get you up and running with a very basic snmp configuration. There's a handy utility called 'snmpconf' that can be run to help you generate the snmp.conf (optional) and snmpd.conf files. This will give you more options and help tighten up security.

at this point you should be able to snmpwalk your host
snmpwalk -v1 -c public 127.0.0.1

Wednesday, April 6, 2011

format HDD on Ubuntu 10.10

After add HDD on your ubuntu box
check your hdd either its already present or not by using

fdisk -l

on your screen you will see

Disk /dev/cciss/c0d1: 1499.8 GB, 1499832039424 bytes
Disk /dev/cciss/c0d1 doesn't contain a valid partition table

after you know your OS HDD first hdd must be c0d0 and the number will increse on d example c0d0,c0d1,c0d2 etc

run this command to format your hdd, for this tutorial i will format ext3 for my HDD


mkfs.ext3 /dev/cciss/c0d1

wait for few minutes
now you done!



Sunday, February 27, 2011

FreeBSD Update from 7. (01234) or 8.(01)

FreeBSD Update

The freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems running earlier FreeBSD releases. Systems running 7.[01234]-RELEASE, 8.[01]-RELEASE, 8.2-BETA1, or 8.2-RC[123] can upgrade as follows:

# freebsd-update upgrade -r 8.2-RELEASE

During this process, FreeBSD Update may ask the user to help by merging some configuration files or by confirming that the automatically performed merging was done correctly.

# freebsd-update install

The system must be rebooted with the newly installed kernel before continuing.

# shutdown -r now

After rebooting, freebsd-update needs to be run again to install the new userland components:

# freebsd-update install

At this point, users of systems being upgraded from FreeBSD 7.4-RELEASE or earlier will be prompted by freebsd-update to rebuild all third-party applications (e.g., ports installed from the ports tree) due to updates in system libraries.

After updating installed third-party applications (and again, only if freebsd-update printed a message indicating that this was necessary), run freebsd-update again so that it can delete the old (no longer used) system libraries:

# freebsd-update install

Finally, reboot into 8.2-RELEASE:

# shutdown -r now

** taken from FreeBSD Website

Tuesday, January 11, 2011

No Hup

Run nohup mysql

nohup mysql -uroot -pyourpasswddb --default-character-set=utf8 <> dump.log 2> error.log &

or

nohup mysql -uroot -pyourpasswddb --default-character-set=utf8 < namedb > error.log &