problem
linux tar same folder permissions
solution
use -p option
Monday, February 28, 2011
Monday, February 21, 2011
linux bash for loop
the syntax that i can understand and easily remember is as follows:
for i in {1..1000}; do echo $i; done;
for i in {1..1000}; do echo $i; done;
best debian dedicated server provider
what is the best debian dedicated server provider?
i am currently using serverbeach, but ever since peer1 bought this company, i find that they have stopped upgrading their hardware lineup for quite sometime. ie, they intel core i series never enter to their processor list.
can any one suggest any company that provides better service than serverbeach?
thanks everyone.
a debian fan (for whatever reason)
i am currently using serverbeach, but ever since peer1 bought this company, i find that they have stopped upgrading their hardware lineup for quite sometime. ie, they intel core i series never enter to their processor list.
can any one suggest any company that provides better service than serverbeach?
thanks everyone.
a debian fan (for whatever reason)
ssh without password
ssh without password
step 1
ssh-keygen -t rsa
step 2
scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/authorized_keys2
note: this is to encrypt the connection with this public key and that this key is authorized for version 2 of the ssh protocol
now you can
ssh user@remote without password
step 3
cat several id_rsa.pub from many hosts, and store it as .ssh/authorized_keys2 at remote machine, you can allow many host to access the same remote host
step 1
ssh-keygen -t rsa
step 2
scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/authorized_keys2
note: this is to encrypt the connection with this public key and that this key is authorized for version 2 of the ssh protocol
now you can
ssh user@remote without password
step 3
cat several id_rsa.pub from many hosts, and store it as .ssh/authorized_keys2 at remote machine, you can allow many host to access the same remote host
Agent admitted failure to sign using the key
if you created a new rsa private key, you will need to update that to your system by
ssh-add
otherwise you will see this error
Agent admitted failure to sign using the key
ssh-add
otherwise you will see this error
Agent admitted failure to sign using the key
Sunday, February 20, 2011
ubuntu grub2 change default
sudo vim /etc/default/grub
sudo update-grub
sudo update-grub
Saturday, February 19, 2011
vim regular expression
* matches 0 or more of the preceding characters, ranges or metacharacters
.* matches everything including empty line
\+ matches 1 or more of the preceding characters...
.* matches everything including empty line
\+ matches 1 or more of the preceding characters...
debian nvidia driver install
run as root
apt-get install module-assistant nvidia-kernel-common
m-a auto-install nvidia-kernel${VERSION}-source
then run the NVIDIA....run
apt-get install module-assistant nvidia-kernel-common
m-a auto-install nvidia-kernel${VERSION}-source
then run the NVIDIA....run
debian disable services at startup
sudo update-rc.d -f exim4 remove
debian enable services in startup
sudo update-rc.d exim4 defaults
debian install bigmem kernel
The Bigmem Kernel
sudo apt-get install linux-image-2.6-686-bigmem
Configuring Grub
grep "Debian GNU" /boot/grub/menu.lst | nl -v0
0 title Debian GNU/Linux, kernel 2.6.18-5-k7
1 title Debian GNU/Linux, kernel 2.6.18-5-k7 (single-user mode)
2 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem
3 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem (single-user mode)
4 title Debian GNU/Linux, kernel 2.6.18-4-k7
5 title Debian GNU/Linux, kernel 2.6.18-4-k7 (single-user mode)
1. So what is the current default entry?
sudo grep ^default /boot/grub/menu.lst
default 0
2. sudo vim /boot/grub/menu.lst
sudo apt-get install linux-image-2.6-686-bigmem
Configuring Grub
grep "Debian GNU" /boot/grub/menu.lst | nl -v0
0 title Debian GNU/Linux, kernel 2.6.18-5-k7
1 title Debian GNU/Linux, kernel 2.6.18-5-k7 (single-user mode)
2 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem
3 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem (single-user mode)
4 title Debian GNU/Linux, kernel 2.6.18-4-k7
5 title Debian GNU/Linux, kernel 2.6.18-4-k7 (single-user mode)
1. So what is the current default entry?
sudo grep ^default /boot/grub/menu.lst
default 0
2. sudo vim /boot/grub/menu.lst
Friday, February 18, 2011
godaddy coupon for .com renewal $7.99 only
coupon code: gdbb776
as of today, 2011, feb 18, this worked like a charm
as of today, 2011, feb 18, this worked like a charm
linux untar a tar ball with permissions intact
sudo tar xpzvvf file.tar.gz
linux create a tar ball with permissions intact
sudo tar cpzvvf file.tar.gz source source source
debian restore server configs
sudo rm /etc/apache2/sites-enabled/000-default
sudo cp apache2.conf /etc/apache2/apache2.conf
sudo cp hosts.conf /etc/apache2/sites-enabled
sudo cp my.cnf /etc/mysql/my.cnf
sudo cp php.ini /etc/php5/apache2/php.ini
sudo cp apache2.conf /etc/apache2/apache2.conf
sudo cp hosts.conf /etc/apache2/sites-enabled
sudo cp my.cnf /etc/mysql/my.cnf
sudo cp php.ini /etc/php5/apache2/php.ini
debian backup server configs
cp /etc/apache2/apache2.conf ./apache2.conf
cp /etc/apache2/sites-enabled/hosts.conf
cp /etc/mysql/my.cnf ./my.cnf
cp /etc/php5/apache2/php.ini ./php.ini
cp /etc/apache2/sites-enabled/hosts.conf
cp /etc/mysql/my.cnf ./my.cnf
cp /etc/php5/apache2/php.ini ./php.ini
Thursday, February 17, 2011
install magento on debian apt-get install way
sudo apt-get install apache2 mysql-server php5 php5-mysql php-soap php5-mcrypt php5-curl php5-gd
GPG error on update -- public key not available
error:
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2019EA84E7532C8
reason:
pubkey expired for opera
where to look for:
sudo apt-key list
solution:
sudo apt-key del 9D1A0061
wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2019EA84E7532C8
reason:
pubkey expired for opera
where to look for:
sudo apt-key list
solution:
sudo apt-key del 9D1A0061
wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
W: GPG error apt-get update NO_PUBKEY AED4B06F473041FA
error message:
http://security.debian.org lenny/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
reason:
as it turns out this is because GPG key expired
This key rollover is a normal maintenance task and was started in August 2010. For security reasons Debian’s archive signing keys regularly expire after three years.
solution:
update the keys by
sudo aptitude install debian-archive-keyring
http://security.debian.org lenny/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
reason:
as it turns out this is because GPG key expired
This key rollover is a normal maintenance task and was started in August 2010. For security reasons Debian’s archive signing keys regularly expire after three years.
solution:
update the keys by
sudo aptitude install debian-archive-keyring
Thursday, February 10, 2011
magento add custom fields in account and registration
http://www.magentocommerce.com/wiki/5_-_modules_and_development/customers_and_accounts/registration_fields
http://www.magentocommerce.com/boards/viewthread/9620/
http://www.magentocommerce.com/boards/viewthread/9620/
Tuesday, February 8, 2011
How to change DNS PTR record?
How do you change DNS PTR record? You might think that this is done by your domain registrar, such as Godaddy - after all, they point your domain to an IP address. Or you might think whoever handles your DNS would do this. But the PTR record isn't up to them, it's up to the ISP that "owns" the IP block it came from.
MySQL Access denied for user debian-sys-maint@localhost
step 1:
sudo cat /etc/mysql/debian.cnf
step 2:
[client]
host = localhost
user = debian-sys-maint
password = xxxxxxxxxxxxxxxx
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user = debian-sys-maint
password = xxxxxxxxxxxxxxxx
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
step 3:
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxxxxxx';
sudo cat /etc/mysql/debian.cnf
step 2:
[client]
host = localhost
user = debian-sys-maint
password = xxxxxxxxxxxxxxxx
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user = debian-sys-maint
password = xxxxxxxxxxxxxxxx
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
step 3:
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxxxxxx';
Sunday, February 6, 2011
javascript checking if image is fully loaded
img = new Image();
img.src = "path_to_your_image.jpg";
img.onload = function() { some_action();};
img.src = "path_to_your_image.jpg";
img.onload = function() { some_action();};
Subscribe to:
Posts (Atom)