Ahad, 22 November 2009

Memulakan Perniagaan Cara WI-FI tiket Prabayar dengan modal hanya RM450.00







MudahSPOT hanya RM450.00.
Keperluan

1) Talian Internet Streamyx/3G/WIMAX. Cuma 3G/WIMAX kurang stabil untuk perniagaan

2) Router Kerbau WHR-HP-G54/Asus 320gE/Dlink DIR-300.

Kerbau WHr-Hp-G54 RM250.00 (Anggaran)
Asus 320gE RM190.00 (Anggaran)
Dlink DIR-300 RM140.00 (Anggaran)
Router jenis N seperti Kerbau WZR-300N juga sesuai. Harga sekitar RM280.00



Kerbau WHR-HP-G54 dan Asus 320gE ada amplifier sesuai untuk liputan luas 600-800meter dikawasan terbuka.

Ahad, 15 November 2009

Administrator command for debian etch

Control startup services    

Another way to control startup services is to install sysv-rc-conf (aptitude install sysv-rc-conf or apt-get install sysv-rc-conf

nano /etc/apt/source.lst comment cdrom line, save exit

apt-get update

apt-get install openssh-server

========================

install webmin

1) dpkg -i webminxxxx

2) apt-get -f install

======================

Sabtu, 14 November 2009

chillispot -- debian etch


Setting up chillispot (1.0-4) ...

Make sure you've configured a radius server and UAM server before enabling Chillispot.
Chillispot captive portal: disabled, see /etc/default/chillispot

Sabtu, 31 Oktober 2009

Quick method to change/create ysql root password

MySQL Tips: Howto change the MySQL root password

Here is a quick tip that will show several methods to change the mysql root password (that is normally empty at mysql initial install).
Method 1: using the SET PASSWORD command:

mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
Method 2: using mysqladmin

mysqladmin -u root password "newpass"

if there was already a mysql root password set, change this to:

mysqladmin -u root password oldpass "newpass"
Method 3: using UPDATE to directly edit the users table

mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE User = 'root';
mysql> FLUSH PRIVILEGES;

Installing php eAccelerator

Installing eAccelerator- eaccelerator is  the php  assistant  to boost the php performance 

Unfortunately, there's no eAccelerator package for Debian Etch in the official repositories, therefore we must compile and install it from the sources. Before we can do this, we need to install some prerequisites:
 

apt-get install build-essential php5-dev bzip2


Now we can download and install eAccelerator like this (make sure that you get the latest version from the eAccelerator web site):

cd /tmp
wget http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2
tar xvfj eaccelerator-0.9.5.2.tar.bz2
cd eaccelerator-0.9.5.2
phpize
./configure
make

make install



eAccelerator is now installed. Now we have to tell our PHP installation that it should make use of eAccelerator. On Debian Etch, the configuration files for the various PHP 5 modules are stored in the /etc/php5/conf.d directory, and this directory is referenced in the main PHP5 configuration file /etc/php5/apache2/php.ini, meaning all files in /etc/php5/conf.d are read in whenever Apache is started/restarted. So all we do is create the file /etc/php5/conf.d/eaccelerator.ini:

vi /etc/php5/conf.d/eaccelerator.iniextension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"


(You can read up on the various configuration settings on this page: http://www.eaccelerator.net/wiki/Settings.)

As you see, we are using the disk cache directory /var/cache/eaccelerator which we must create now and make it world-writable:

mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator

Afterwards, we restart Apache so that our new PHP configuration takes effect:

/etc/init.d/apache2 restart

Afterwards, open info.php again in a browser: http://webserver/info.php

You should now see eAccelerator mentioned on the page which means it has successfully been integrated and is working as expected (I've marked the eAccelerator line in the below screenshot for better visibility):

Rabu, 28 Oktober 2009

Howto untar/tar/bunzip

tar -xvf filename.tar foldername/

-compress a folder ===> tar -pczf web.tar.gz /var/www/html

4-april-2010 on sahabat pc router.
tar -pczf hotpotcontrol2`date +%d_%m_%Y_hour_%H_%M`.tar.gz hotspot-control2/ mysql/ radius/

tar split large file

1. compress the folder/files to .tar.gz

2. tar -cvj /home/zahari/joomla15.tar.gz | split -b 6m -d – “joomla15split.tar.bz.”


 eg> tar -cvj /home/zahari/hotspotnet/joomla15.tar.gz | split -b 6m -d - "joomla15split.tar.gz."

to recover as follows:

cat large-files.tar.bz.* > large-files.tar.bz
tar -xvj large-file.tar.bz

tar create file with date and time

tar -pcfz /home/zahari/mysql-backup-tar/mysql_`date +%d_%m_%Y_hour_%H_%M`.tar.gz /home/zahari/mysql-backup/*

rsync from cherasnet to bintangmas host

rsync -v -e ssh zahari@cherasnet.com:~/mysql-backup-tar/* /home/zahari/mysql-backup


Identify the server that initially contains the files (we will call this the SOURCE server), and the serverto which you want to transfer the files (we will call this the TARGET server). Confirm that you can log in to the SOURCE server, that you can log in to the TARGET server, and that while logged into the TARGET server, you can use ssh to login to the SOURCE server using your password.
Step
2

Log into the TARGET server. Execute the command

[mikeular@targethost~]$ ssh-keygen -t dsa

ssh-keygen will ask you where you want to save the key. Accept the default directory, which will be ~/.ssh/id_dsa . Next it will ask you for a passphrase, leave this entry blank.

Your private key file will be saved to ~/.ssh/id_dsa and your public key will be saved to ~/.ssh/id_dsa.pub. Careful! Anyone who obtains a copy of your id_dsa file will be able to login to the SOURCE server as you, without authenticating themselves. Make sure that it's stored securely!
Step
3

Now you will configure the SOURCE server to accept the key. Once this step is complete, anyone with the id_dsa file will be able to log into the SOURCE server without providing a password.

Log into the SOURCE server and create the ssh directory:

[mikeular@sourcehost~]$ mkdir ~/.ssh
[mikeular@sourcehost~]$ cd ~/.ssh

Using vi or another text editor, create a file in ~/.ssh named authorized_keys2 . Now switch over to the TARGET server and copy the contents of the file id_dsa.pub and paste them into authorized_keys2 on the SOURCE server. Save the text file.
Step
4

Make sure that the authorized_keys2 cannot be changed by other users on the SOURCE server:

[mikeular@sourcehost~]$ chmod 644 ~/.ssh/authorized_keys2
Step
5

Now you can test your setup. Go back to the TARGET server and connect to the source.

[mikeular@targethost~]$ ssh username@sourcehost.com
[mikeular@sourcehost~]

Your ssh connection is now working correctly.
Step
6

Test your rsync over ssh connection by copying a file from SOURCE to TARGET. Enter the following command all on one line, being sure to substitute in the correct pathnames, username, and hostname.

[mikeular@targethost~]$ rsync -avz -e/usr/bin/ssh username@sourcehost.com:/home/username/testfile /home/mikeular/

This should copy the file "testfile" from your home directory on sourcehost to your home directory on targethost.
Step
7


move backup from cheasnet.com to kudaspot.homeip.net
rsync -v -e ssh zahari@cherasnet.com:~/mysql-backup-tar/* /home/zahari/mysql-backup


============================================

matahari backup job

1) backup whole harddisk with tar


sudo tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /


sudo tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/home/zahari/backup-sda1 --exclude=/mnt --exclude=/sys / &


sudo tar -pcvj /home/zahari/backup-sda1/mybackup.tar.gz | split -b 20M -d - "mybackup-split.tar.gz"


-------------------

split file

tar -pcvj backup.tgz | split -b 30M -d - "backup.tgz."


===========================================================

CHERASNET(mandrake10.2 Productuion server)  backup to 20GB external harddisk connected to usb adaptor

the job is to backup partition hda1-->sda1(external usb harddisk)  and hda6 to sda6(external usb Harddisk)

[root@myap-1 httpd]# df
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 7.4G 4.2G 3.0G 59% /
/dev/hda6 11G 3.4G 7.2G 32% /home


/dev/sda1 6.8G 4.2G 2.4G 65% /mnt/sda1
/dev/sda6 12G 3.4G 8.0G 30% /mnt/sda6

[root@myap-1 httpd]#

type fdisk -l

Disk /dev/sda: 20.8 GB, 20847697920 bytes
64 heads, 32 sectors/track, 19881 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 7058 7227376 83 Linux
/dev/sda2 7059 19881 13130752 5 Extended
/dev/sda5 7059 7536 489456 82 Linux swap
/dev/sda6 7537 19881 12641264 83 Linux
[root@myap-1 httpd]#

use fdisk to partition the new sda to match the partition of  running disk /dev/hda

------------------------------------

mount /dev/sda1  /mnt/sda1

mount /dev/sda6 /mnt/sda6

-------------------------------------

prepare file excludes.cfg

touch /mnt/excludes.cfg, nano /mnt/excludes.cfg and put in the followings


/proc/
/tmp/
/mnt/
/etc/fstab
#/var/cache
/lost+found
/var/cache/httpd/
/usr/local/squid2.7/var/cache/

save and exit nano

start copying now

rsync -avx --exclude-from=/mnt/excludes.cfg --delete // /mnt/sda1 &

rsync -avx --exclude="lost&found" /home/ /mnt/sda6 &


========================================================

using mc to ftp files from sahabat to jebat

F9--->RIGHT--->shell link

jebat@pcrouterjebathotspot.homelinux.com


Buat tiket prabayar wifi

Chapter I: Getting Net-SNMP binaries

Depending on your operating system, you'll find packages or tarballs to install Net-SNMP :
Linux
Usually every Linux distribution comes with Net-SNMP packages :
RedHat / Fedora / CentOS : install the net-snmp, net-snmp-libs and net-snmp-utils packages
Debian / Ubuntu: install the libsnmp-base, libsnmp5, snmp and snmpd packages
SuSE : install the net-snmp package
Gentoo : simply emerge the net-snmp ebuild.

Memulakan Perniagaan Cara WI-FI tiket Prabayar dengan modal hanya RM450.00

MudahSPOT hanya RM450.00. Keperluan 1) Talian Internet Streamyx/3G/WIMAX. Cuma 3G/WIMAX kurang stabil untuk perniagaan 2) Router Kerb...