Monday, March 15, 2010
Tuesday, November 24, 2009
Login to SSH as root.
Sometimes, direct root login is disabled. Do this then,
# su -
# password: [Enter your WHM root pass]
# [Hostname]: [Ready to work ]
To Download ports:
# /stand/sysinstall
- Go to Configure (post install)
- Go to Distributions
- Select 'ports'
- Select 'ok'
From there select FTP transfer (ftp.freebsd.org is ok) and it should download the ports into /usr/ports. When it's done, just exist sysinstall and run the commands I stated earlier.
It'll take a while to download.
after its finished downloading, do this:
# cd /usr/ports/editors/pico
# make install
and it'd install it for you.
DONE!!
Monday, November 02, 2009
debian:~/rubygems-1.3.5# /usr/local/bin/gem install rails
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `require': no such file to load -- zlib (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in `
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in ` Solution ======= apt-get install libzlib-devel then recompile your ruby and gems Enjoy!!
Friday, October 23, 2009
--------------------------------------------------
debian:/home/amir/Net-DNS-SEC-0.15# perl Makefile.PL
Warning: prerequisite Crypt::OpenSSL::Bignum 0.03 not found.
Warning: prerequisite Crypt::OpenSSL::DSA 0.1 not found.
Warning: prerequisite Crypt::OpenSSL::RSA 0.19 not found.
Writing Makefile for Net::DNS::SEC
I need to install all the dependencies.
Solution
======
sudo apt-get install libssl-dev
sudo perl -MCPAN -e "Crypt::OpenSSL::Bignum"
Below is the problem
==============
cpan[1]> install Crypt::OpenSSL::Bignum
CPAN: Storable loaded ok (v2.15)
Going to read '/root/.cpan/Metadata'
Database was generated on Fri, 23 Oct 2009 11:27:06 GMT
Running install for module 'Crypt::OpenSSL::Bignum'
Running make for I/IR/IROBERTS/Crypt-OpenSSL-Bignum-0.04.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.022)
Checksum for /root/.cpan/sources/authors/id/I/IR/IROBERTS/Crypt-OpenSSL-Bignum-0.04.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN: Archive::Tar loaded ok (v1.54)
Crypt-OpenSSL-Bignum-0.04/
Crypt-OpenSSL-Bignum-0.04/Bignum/
Crypt-OpenSSL-Bignum-0.04/Bignum/CTX.pm
Crypt-OpenSSL-Bignum-0.04/LICENSE
Crypt-OpenSSL-Bignum-0.04/README
Crypt-OpenSSL-Bignum-0.04/Changes
Crypt-OpenSSL-Bignum-0.04/test.pl
Crypt-OpenSSL-Bignum-0.04/Makefile.PL
Crypt-OpenSSL-Bignum-0.04/META.yml
Crypt-OpenSSL-Bignum-0.04/typemap
Crypt-OpenSSL-Bignum-0.04/Bignum.pm
Crypt-OpenSSL-Bignum-0.04/Bignum.xs
Crypt-OpenSSL-Bignum-0.04/MANIFEST
CPAN: File::Temp loaded ok (v0.22)
CPAN: YAML loaded ok (v0.70)
CPAN.pm: Going to build I/IR/IROBERTS/Crypt-OpenSSL-Bignum-0.04.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Crypt::OpenSSL::Bignum
cp Bignum.pm blib/lib/Crypt/OpenSSL/Bignum.pm
cp Bignum/CTX.pm blib/lib/Crypt/OpenSSL/Bignum/CTX.pm
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap Bignum.xs > Bignum.xsc && mv Bignum.xsc Bignum.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/usr/lib/perl/5.8/CORE" -DPERL5 -DOPENSSL_NO_KRB5 Bignum.c
Bignum.xs:5:25: error: openssl/ssl.h: No such file or directory
Bignum.xs:6:24: error: openssl/bn.h: No such file or directory
Bignum.xs:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum__free_BN’:
Bignum.c:48: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:48: error: (Each undeclared identifier is reported only once
Bignum.c:48: error: for each function it appears in.)
Bignum.c:48: error: ‘self’ undeclared (first use in this function)
Bignum.c:51: error: expected expression before ‘)’ token
Bignum.xs: In function ‘XS_Crypt__OpenSSL__Bignum_new_from_word’:
Bignum.xs:46: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.xs:46: error: ‘bn’ undeclared (first use in this function)
Bignum.c:72: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.xs: In function ‘XS_Crypt__OpenSSL__Bignum_new_from_decimal’:
Bignum.xs:59: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.xs:59: error: ‘bn’ undeclared (first use in this function)
Bignum.c:97: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.xs: In function ‘XS_Crypt__OpenSSL__Bignum_new_from_hex’:
Bignum.xs:72: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.xs:72: error: ‘bn’ undeclared (first use in this function)
Bignum.c:122: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.xs: In function ‘XS_Crypt__OpenSSL__Bignum_new_from_bin’:
Bignum.xs:85: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.xs:85: error: ‘bn’ undeclared (first use in this function)
Bignum.c:149: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.xs: In function ‘XS_Crypt__OpenSSL__Bignum_zero’:
Bignum.xs:99: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.xs:99: error: ‘bn’ undeclared (first use in this function)
Bignum.c:173: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.xs: In function ‘XS_Crypt__OpenSSL__Bignum_one’:
Bignum.xs:111: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.xs:111: error: ‘bn’ undeclared (first use in this function)
Bignum.c:197: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_to_decimal’:
Bignum.c:217: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:217: error: ‘self’ undeclared (first use in this function)
Bignum.c:222: error: expected expression before ‘)’ token
Bignum.xs:125: warning: assignment makes pointer from integer without a cast
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_to_hex’:
Bignum.c:242: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:242: error: ‘self’ undeclared (first use in this function)
Bignum.c:247: error: expected expression before ‘)’ token
Bignum.xs:136: warning: assignment makes pointer from integer without a cast
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_to_bin’:
Bignum.c:267: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:267: error: ‘self’ undeclared (first use in this function)
Bignum.c:275: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_get_word’:
Bignum.c:297: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:297: error: ‘self’ undeclared (first use in this function)
Bignum.c:302: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_add’:
Bignum.c:319: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:319: error: ‘a’ undeclared (first use in this function)
Bignum.c:320: error: ‘b’ undeclared (first use in this function)
Bignum.xs:168: error: ‘bn’ undeclared (first use in this function)
Bignum.c:327: error: expected expression before ‘)’ token
Bignum.c:330: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_sub’:
Bignum.c:353: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:353: error: ‘a’ undeclared (first use in this function)
Bignum.c:354: error: ‘b’ undeclared (first use in this function)
Bignum.xs:182: error: ‘bn’ undeclared (first use in this function)
Bignum.c:361: error: expected expression before ‘)’ token
Bignum.c:364: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_mul’:
Bignum.c:387: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:387: error: ‘a’ undeclared (first use in this function)
Bignum.c:388: error: ‘b’ undeclared (first use in this function)
Bignum.c:389: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:389: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:197: error: ‘bn’ undeclared (first use in this function)
Bignum.c:396: error: expected expression before ‘)’ token
Bignum.c:399: error: expected expression before ‘)’ token
Bignum.c:402: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_div’:
Bignum.c:425: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:425: error: ‘a’ undeclared (first use in this function)
Bignum.c:426: error: ‘b’ undeclared (first use in this function)
Bignum.c:427: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:427: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:212: error: ‘quotient’ undeclared (first use in this function)
Bignum.c:435: error: expected expression before ‘)’ token
Bignum.c:438: error: expected expression before ‘)’ token
Bignum.c:441: error: expected expression before ‘)’ token
Bignum.xs:218: error: invalid lvalue in assignment
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_sqr’:
Bignum.c:465: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:465: error: ‘a’ undeclared (first use in this function)
Bignum.c:466: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:466: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:229: error: ‘bn’ undeclared (first use in this function)
Bignum.c:471: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:474: error: expected expression before ‘)’ token
Bignum.c:477: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_mod’:
Bignum.c:499: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:499: error: ‘a’ undeclared (first use in this function)
Bignum.c:500: error: ‘b’ undeclared (first use in this function)
Bignum.c:501: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:501: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:245: error: ‘bn’ undeclared (first use in this function)
Bignum.c:508: error: expected expression before ‘)’ token
Bignum.c:511: error: expected expression before ‘)’ token
Bignum.c:514: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_mod_mul’:
Bignum.c:536: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:536: error: ‘a’ undeclared (first use in this function)
Bignum.c:537: error: ‘b’ undeclared (first use in this function)
Bignum.c:538: error: ‘m’ undeclared (first use in this function)
Bignum.c:539: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:539: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:261: error: ‘bn’ undeclared (first use in this function)
Bignum.c:544: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:547: error: expected expression before ‘)’ token
Bignum.c:550: error: expected expression before ‘)’ token
Bignum.c:553: error: expected expression before ‘)’ token
Bignum.c:556: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_exp’:
Bignum.c:577: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:577: error: ‘a’ undeclared (first use in this function)
Bignum.c:578: error: ‘p’ undeclared (first use in this function)
Bignum.c:579: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:579: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:277: error: ‘bn’ undeclared (first use in this function)
Bignum.c:584: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:587: error: expected expression before ‘)’ token
Bignum.c:590: error: expected expression before ‘)’ token
Bignum.c:593: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_mod_exp’:
Bignum.c:614: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:614: error: ‘a’ undeclared (first use in this function)
Bignum.c:615: error: ‘p’ undeclared (first use in this function)
Bignum.c:616: error: ‘m’ undeclared (first use in this function)
Bignum.c:617: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:617: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:294: error: ‘bn’ undeclared (first use in this function)
Bignum.c:622: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:625: error: expected expression before ‘)’ token
Bignum.c:628: error: expected expression before ‘)’ token
Bignum.c:631: error: expected expression before ‘)’ token
Bignum.c:634: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_mod_inverse’:
Bignum.c:655: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:655: error: ‘a’ undeclared (first use in this function)
Bignum.c:656: error: ‘n’ undeclared (first use in this function)
Bignum.c:657: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:657: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:310: error: ‘bn’ undeclared (first use in this function)
Bignum.c:662: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:665: error: expected expression before ‘)’ token
Bignum.c:668: error: expected expression before ‘)’ token
Bignum.c:671: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_gcd’:
Bignum.c:692: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:692: error: ‘a’ undeclared (first use in this function)
Bignum.c:693: error: ‘b’ undeclared (first use in this function)
Bignum.c:694: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:694: error: ‘ctx’ undeclared (first use in this function)
Bignum.xs:326: error: ‘bn’ undeclared (first use in this function)
Bignum.c:699: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:702: error: expected expression before ‘)’ token
Bignum.c:705: error: expected expression before ‘)’ token
Bignum.c:708: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_cmp’:
Bignum.c:729: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:729: error: ‘a’ undeclared (first use in this function)
Bignum.c:730: error: ‘b’ undeclared (first use in this function)
Bignum.c:735: error: expected expression before ‘)’ token
Bignum.c:738: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_is_zero’:
Bignum.c:754: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:754: error: ‘a’ undeclared (first use in this function)
Bignum.c:759: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_is_one’:
Bignum.c:775: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:775: error: ‘a’ undeclared (first use in this function)
Bignum.c:780: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_is_odd’:
Bignum.c:796: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:796: error: ‘a’ undeclared (first use in this function)
Bignum.c:801: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_copy’:
Bignum.c:817: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:817: error: ‘a’ undeclared (first use in this function)
Bignum.c:821: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c:824: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum_pointer_copy’:
Bignum.c:843: error: ‘BIGNUM’ undeclared (first use in this function)
Bignum.c:843: error: ‘a’ undeclared (first use in this function)
Bignum.c:850: error: expected expression before ‘)’ token
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum__CTX_new’:
Bignum.c:868: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:868: error: ‘RETVAL’ undeclared (first use in this function)
Bignum.c: In function ‘XS_Crypt__OpenSSL__Bignum__CTX__free_BN_CTX’:
Bignum.c:885: error: ‘BN_CTX’ undeclared (first use in this function)
Bignum.c:885: error: ‘self’ undeclared (first use in this function)
Bignum.c:888: error: expected expression before ‘)’ token
make: *** [Bignum.o] Error 1
IROBERTS/Crypt-OpenSSL-Bignum-0.04.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
IROBERTS/Crypt-OpenSSL-Bignum-0.04.tar.gz : make NO
Monday, October 12, 2009
run: ruby whoisex.rb opensource.mywill return i section in array:
Amir Haris Ahmad
OPENSOURCE DOTCOM
PT 72, SEKSYEN 65, TAMAN JELUTONG,
WAKAF CHE YEH
15100 KOTA BHARU
Kelantan
Malaysia
amirharis@yahoo.com
(Tel) 012-9522020
(Fax) -
script: whoisex.rb
============
require "whois"
whois = %x{whois #{ARGV}}
a = WHOIS::Get.new
r = a.record(whois, "i")
r.each_index do |i|
puts r[i].strip
end
The module
========
module WHOIS
class Get
def record(whois, type)
st = whois =~ /#{type} \[/
en = whois =~ /#{type.next} \[/
cut= whois.slice(st..en).split("\n")
cut.pop
cut.pop
cut.shift
cut.each_index do |i|
cut[i].chomp!
end
return cut
end
end
end
Enjoy!!!!
Sunday, September 13, 2009
1) w3m ftp://ftp.cac.washington.edu/pine/pine_4.64_i386.deb
if you find any error e.g: pine: error while loading shared libraries: libssl.so.0.9.7: cannot open shared object file: No such file or directory
Just execute these commands:
$ sudo -s
# cd /usr/lib
# ln -s libcrypto.so.0.9.8 libcrypto.so.0.9.7
# ln -s libssl.so.0.9.8 libssl.so.0.9.7
rgds
Amir Haris
Tuesday, September 08, 2009
Sunday, August 09, 2009
Reset MySQL root password
Step 1
root@amir:~# /etc/init.d/mysql stop
Step 2
root@amir:~# /usr/bin/mysqld_safe --skip-grant-tables &
[1] 6709
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6763]: started
Step 3
root@amir:~$ mysql --user=root mysql
Enter password:
mysql> update user set Password=PASSWORD('new-password') WHERE User='root';
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> exit
Bye
Step 4
root@amir:~# /etc/init.d/mysql start
Starting MySQL database server: mysqld.
Step 5
root@amir:~# mysql --user=root --pass=new-password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.24a-Debian_4-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
Saturday, August 08, 2009
if user is member of wheel group. Wheel group is a special group for administration purpose. Add your normal user to this group using pw command using following:
# pw user mod username -G wheel
So to add user amir to group wheel run command as follows:
# pw user mod amir -G wheel
# groups amir
amir wheel Now su will work for amir.
You can disable this behavior complete for all users (not recommended until and unless you trust ALL of users):
1) Open pam configuration file for su using text editor:# vi /etc/pam.d/su
2) Look for following line and comment it out:
Line:auth requisite pam_wheel.so no_warn auth_as_self noroot_ok exempt_if_empty
Replace with:#auth requisite pam_wheel.so no_warn auth_as_self noroot_ok exempt_if_empty
3) Now all users can use su command.
Sunday, May 10, 2009
=============
I got problem when compiling bind with dlz + openssl
./configure --prefix=/usr/local/bind-zs/ --with-openssl=/usr/local/bind-zs/ --enable-threads=no --with-dlz-mysql=/Applicatioampp/xamppfiles/
Its return these errors during make:
gcc -g -O2 -I/usr/include/libxml2 -o named \
builtin.o client.o config.o control.o controlconf.o interfacemgr.o listenlist.o log.o logconf.o main.o notify.o query.o server.o sortlist.o statschannel.o tkeyconf.o tsigconf.o update.o xfrout.o zoneconf.o lwaddr.o lwresd.o lwdclient.o lwderror.o lwdgabn.o lwdgnba.o lwdgrbn.o lwdnoop.o lwsearch.o dlz_drivers.o sdlz_helper.o dlz_mysql_driver.o unix/os.o ../../lib/lwres/liblwres.a ../../lib/dns/libdns.a /usr/local/bind-zs//lib/libcrypto.a ../../lib/bind9/libbind9.a ../../lib/isccfg/libisccfg.a ../../lib/isccc/libisccc.a ../../lib/isc/libisc.a -L/Applications/xampp/xamppfiles//lib/mysql -lmysqlclient -lz -lcrypt -lm -L/usr/lib -lxml2 -lz -lpthread -licucore -lm
ld: library not found for -lcrypt
collect2: ld returned 1 exit status
make[2]: *** [named] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1
The solution, compile with this command first:
./configure --prefix=/usr/local/bind-zs/ --with-openssl=/usr/local/bind-zs/ --enable-threads=no
without --with-dlz-mysql=/Applicatioampp/xamppfiles/
do make
than
reconfigure with
./configure --prefix=/usr/local/bind-zs/ --with-openssl=/usr/local/bind-zs/ --enable-threads=no --with-dlz-mysql=/Applicatioampp/xamppfiles/
rgds
Amir Haris@domainregistry.my
Thursday, April 23, 2009
After compiling the i found errors as below:
root:/Users/amir/linux$ make
cc randomfile.c -lusb -o randomfile
randomfile.c:16:17: error: usb.h: No such file or directory
randomfile.c: In function 'main':
randomfile.c:74: error: 'usb_busses' undeclared (first use in this function)
randomfile.c:74: error: (Each undeclared identifier is reported only once
randomfile.c:74: error: for each function it appears in.)
randomfile.c:74: error: dereferencing pointer to incomplete type
randomfile.c:75: error: dereferencing pointer to incomplete type
randomfile.c:75: error: dereferencing pointer to incomplete type
randomfile.c:76: error: dereferencing pointer to incomplete type
randomfile.c:77: error: dereferencing pointer to incomplete type
randomfile.c:84: warning: assignment makes pointer from integer without a cast
make: *** [randomfile] Error 1
I need to configure libusb to generate usb.h and other related header files.
I edit the Makefile and alter the parameter as below:
randomfile: randomfile.c
cc -I/opt/local/include -L/opt/local/lib \
randomfile.c -lusb -o randomfile
After that make it again:
cc -I/opt/local/include -L/opt/local/lib \
randomfile.c -lusb -o randomfile
randomfile.c: In function 'main':
randomfile.c:99: warning: pointer targets in passing argument 3 of 'usb_bulk_read' differ in signedness
Phew, ignore the error. Basically its no error, but warning. After successcully compile the .c file, one binary file generated called randomfile
Let test the tools:
./randomfile 1000 > random.hex
one file generated random.hex with these:
4968550d1a5de37609488a881d8252
104671ad00e778778e652943d2bbb6
ecde36645bfd64d4f9e9fdd86a2ebe
9569cff8b3ab2176763d72ae3b5a40
c7098540611067253ea2cef2ef0475
de635f5af7176f49cabe700ef516a2
990ced11a45f316e89c1c5d76210a0
1ff02581a88b769af61f453d8055dd
9ee741a231b796a3455d38b5390894
8a56a6e2fbe33e981905ef071f5641
d6a1b398e8b90ae4907d7bca30e1a3
ae691d968c1acaac4997c124bf24e3
b19f6f91b71003bbe9ff3316300bb7
rgds
Amir Haris Ahmad
Monday, April 20, 2009

sudo randomfile -b | dnssec-keygen -r /dev/fd/0 -a RSASHA1 -b 2048 my.
amir@domainregistry.my
Friday, April 17, 2009
Next week(24 April 2009 until 1 May 2009) I will be in Sabah & Sarawak. I will represent MyNIC BHD. as presenter to talk about Domain Name System Security Extention (DNSSEC). The audiences will be government and educational institution. See you all there. For more info please visit http://rnd.domainregistry.my
Monday, April 13, 2009
Thursday, April 09, 2009
Sunday, March 08, 2009
========================
1. wget http://freshmeat.net/redir/berkeleydb/694/url_tgz/db-4.7.25.tar.gz
2. tar vxfz db-4.7.25.tar.gz;cd db-4.7.25/build_unix
3. ../dist/configure --enable-cxx --enable-diagnostics --prefix=/usr/local
4. Install perl BerkeleyDB from CPAN.
Testing by using perl Code
==================
use strict ;
use BerkeleyDB ;
my $filename = "fruit" ;
unlink $filename ;
my $db = new BerkeleyDB::Hash
-Filename => $filename,
-Flags => DB_CREATE
or die "Cannot open file $filename: $! $BerkeleyDB::Error\n" ;
# Add a few key/value pairs to the file
$db->db_put("apple", "red") ;
$db->db_put("orange", "orange") ;
$db->db_put("banana", "yellow") ;
$db->db_put("tomato", "red") ;
# Check for existence of a key
print "Banana Exists\n\n" if $db->db_get("banana", $v) == 0;
# Delete a key/value pair.
$db->db_del("apple") ;
# print the contents of the file
my ($k, $v) = ("", "") ;
my $cursor = $db->db_cursor() ;
while ($cursor->c_get($k, $v, DB_NEXT) == 0)
{ print "$k -> $v\n" }
undef $cursor ;
undef $db ;
