Aici veti gasi detalii tehnice despre cum se pot realiza configurari software+ hardware.
Here you can find tehnical details about software/hardware configuration.

sâmbătă, 10 decembrie 2011

FreeBSD Qmail install

cd /usr/ports/mail/qmail
make config
make install

#TcpServer

cd /usr/ports/sysutils/ucspi-tcp
make install clean

#Daemontools
cd /usr/ports/sysutils/daemontools
make install clean
echo 'svscan_enable="YES"' >> /etc/rc.conf


#vpopmail
cd /usr/ports/mail/vpopmail
make install clean -DWITH_DOMAIN_QUOTAS -DWITH_SPAMASSASSIN SPAM_THRESHOLD=10

#courierimap
cd /usr/ports/mail/courier-imap
make config
make install clean

#qmailadmin

cd /usr/ports/mail/qmailadmin
make all install clean CGIBINDIR=www/cgi-bin-dist WEBDATADIR=www/data-dist


#qmail-scanner
cd /usr/ports/mail/qmail-scanner
make install

#$clamav
cd /usr/ports/security/clamav
make install

#vqadmin
cd /usr/ports/mail/vqadmin/
make install

#maildrop install
pkg install maildrop

luni, 5 decembrie 2011

Linux Commands

FIND TEXT
Find some text in folder files
grep --color=auto -nH 'text_to_find' *

Find some text in folder and subfolder files
grep -r --color=auto -nH 'text_to_find' *
================================================

To generate a file with custom size:

# dd if=/dev/zero of=output.dat  bs=1024  count=10240
or
# dd if=/dev/zero of=output.dat  bs=1M  count=10
 
 ============================================== 
 Copy BSD Disk to another
 
 dd if=/dev/ad0 of=/dev/da0 bs=1M
 
If you not have all disk in same plece you can try to make a dump over SSH
 
dump -C16 -b64 -0uanL -h0 -f - /    | gzip -2 | ssh -c blowfish user@host.com dd of=filename.dump.gz 
 
To restore you can try:
mount first partition
mount /dev/ad1s1a /tmp/root #(ad1 is the backup disk) 
  
ssh -c blowfish usr@host.com gzcat root.dump.gz | (cd /tmp/root && restore -ruf -)
 
 ================================================
 #!/bin/bash
count=99
if [ $count -eq 100 ]
then
  echo "Count is 100"
elif [ $count -gt 100 ]
then
  echo "Count is greater than 100"
else
  echo "Count is less than 100"
fi
================================================= 
show listen port by process
 
netstat -tupln
=================================================
show linux open files
 
lsof /dev/sda1
=================================================
show port listen by process

lsof -i :22
================================================= 
Scan all ports with nmap
 
nmap -P0 -vv -sS -ff -r -n -p 1-65535 SERVER_IP_HERE
================================================= 
List apache modules

apachectl -t -D DUMP_MODULES
 
 
=================================================
 
Show open files by process
 
 watch 'lsof -u apache | sort | uniq -c | sort -n'
 watch 'lsof -u apache | awk '\''{print $2}'\'' | sort | uniq -c | sort -n'
 

Map


Visitor Map