April 26th, 2010

You are currently browsing the articles from KomKid.Net written on April 26th, 2010.

Ubuntu : Install ClamAV

1.ติดตั้ง ClamAV และ Update

1
2
3
4
5
apt-get install clamav
apt-get install clamav-daemon
/etc/init.d/clamav-daemon restart  
freshclam  #update virus definitions
clamscan -r /location_of_files_or_folders

2.Schedule Scan

1
2
crontab -e
00 00 * * * clamscan -r location_of_files_or_folders

3.Log and Quarantine

1
2
mkdir /var/log/clamav/infected
nano /etc/clamav/clamscan_schedule.sh

ป้อน

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
### fix log file if needed
LOG_FILE="/var/log/clamav/scan.log"
if [ ! -f "$LOG_FILE" ]; then
touch "$LOG_FILE"
chmod 644 "$LOG_FILE"
chown clamav.clamav "$LOG_FILE"
fi
 
clamscan -r /public_data --quiet --log="$LOG_FILE" --verbose --move=/var/log/clamav/infected
1
chmod +x /etc/clamav/clamscan_schedule.sh

Written by Komkid on April 26th, 2010 with no comments.
Read more articles on Software and Ubuntu.

Ubuntu : Install FreeNX

FreeNX เป็นคนละตัวกับ NXServer ของ nomachine ครับ (ของ nomachine จำกัดแค่ 2 session เอง)
1.เพิ่ม repository

1
nano /etc/apt/sources.list

เพิ่ม

1
2
deb http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main
deb-src http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main

เพิ่ม key แล้ว update

1
2
 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2a8e3034d018a4ce
apt-get update

2.ติดตั้ง server

1
aptitude install freenx

3.ติดตั้ง client (ใช้ของ nomachine)

1
2
wget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver_3.4.0-12_i386.deb
dpkg -i nxclient_3.4.0-5_i386.deb

4.กรณีต้องการเปลี่ยน SSH key

1
dpkg-reconfigure freenx-server

เลือก Create new custom keys
จะได้ key อยู่ที่ /var/lib/nxserver/home/custom_keys/client.id_dsa.key สำหรับเอาไป import เข้า nxclient
อาจ copy ไปโดยให้คำสั่ง
ที่ server

1
cp /var/lib/nxserver/home/custom_keys/client.id_dsa.key ~/

ที่ client

1
scp user@freenx-server:~/client.id_dsa.key ~/

Written by Komkid on April 26th, 2010 with no comments.
Read more articles on Admin and Networking and Software and Ubuntu.