วันพุธที่ 24 ธันวาคม พ.ศ. 2551

กาติดตั้ง clamAV

Anti-virus
[edit]
ClamAV AntiVirus Server

* Read #General Notes
* Read #How to add extra repositories

* Although viruses and spyware are less common in Linux systems, they do exist. Furthermore, many users share files with Windows users, either on their own computer or on LANs. ClamAV is useful for checking these files.

* Install ClamAV AntiVirus Server:

sudo apt-get install clamav

If you get errors, try running the command again
[edit]
How to update virus definitions

* Virus definition updates are provided by the clamav-freshclam module, which is installed as part of clamav.

* Run freshclam manually:

sudo freshclam

[edit]
How to install ClamAV automatic updater daemon

* The clamav daemon will run freshclam automatically to keep definitions up-to-date. It will also run e-mail server checking modules for e-mail attachments.

sudo apt-get install clamav-daemon

[edit]
How to scan files or folders

sudo clamscan -r /location_of_files_or_folders

[edit]
How to install ClamTk GUI frontend for ClamAV

sudo apt-get install clamtk

ClamTk can be accessed from the Menu: Applications--> Accessories-->Virus Scanner

* Note: As of August 1, 2007, the Ubuntu repository version of ClamTk is 0.31, which has a bug that does not allow it to run. Obtain and install the current version of ClamTk 0.99, which functions fine in Ubuntu Feisty:

wget -c http://downloads.sourceforge.net/clamtk/clamtk_2.99-1_all.deb
sudo dpkg -i clamtk_2.99-1_all.deb

[edit]
How to automatically scan files/folders for viruses

* Read #General Notes
* Read #How to install ClamAV AntiVirus Server

* This method is used to automatically scan files/folders for viruses at a scheduled time.
* * * * * * means: minute hour date month year

* Edit the crontab file:

EDITOR=gedit sudo crontab -e

comment: sure? (root's crontab)

or, simply,

gksudo gedit crontab -e

comment: sure? - (its work?)

* Append a line similar to the following line at the end of file. In this example, scanning will be done at 02:04am every day of every month of every year.

04 02 * * * sudo clamscan -r /location_of_files_or_folders

วันจันทร์ที่ 8 ธันวาคม พ.ศ. 2551

การติดตั้ง Apache, PHP, MySQL, PHPMyAdmin บน Ubuntu 11.04

1.อันดับแรก ให้เริ่มต้นติดตั้งเว็บเซอร์ฟเวอร์ Apache2 ก่อน

 ด้วยคำสั่ง sudo apt-get  install apache2

เมื่อติดตั้งสำเร็จจะมีข้อความ

Setting up apache2-mpm-worker (2.0.55-4ubuntu2.1) ...
* Starting apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ ok ]

Setting up apache2 (2.0.55-4ubuntu2.1) ...

ทดลองเปิดเว็บบราวเซอร์ Firefox มายังเครื่องที่ติดตัั้ง หรือถ้ารันบนเครื่องเดียวกันให้เปิด URL เป็น localhost
ถ้าขึ้นข้อความแบบนี้

It works!

This is the default web page for this server.
The web server software is running but no content has been added, yet.

แสดงว่าใช้ได้แล้ว


2. ลำดับต่อไปติดตั้ง PHP ด้วยคำสั่ง

sudo apt-get  install php5

3. หลังจากนั้นให้ติดตั้งโมดูลของ PHP เพื่อให้สามารถติดต่อกับ MySQL ได้ ด้วยคำสั่ง

sudo apt-get install php5-mysql

4.หลังจากติดตั้งแล้วให้รีสตาร์ท apache อีกครั้งด้วยคำสั่ง

sudo /etc/init.d/apache2 restart

5.ลำดับต่อไปติดตั้ง MySQL ด้วยคำสั่ง

sudo apt-get  install mysql-server

ทดสอบด้วยการรันคำสั่ง

mysql -U -root -pXXXX


โดยตรงส่วน XXXX หมายถึงรหัสผ่าน mysql ของเรา


จะได้พรอมพ์ของ MySQL

mysql>

ทดลองพิมพ์คำสั่ง

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
2 rows in set (0.00 sec)
จากนั้นหากต้องการแก้ไข character set ใน MySql ให้เป็น UTF-8 ก็ให้ไปวิธีแก้ไข  ที่นี่ ครับ 


6. ลำดับต่อไป ติดตั้ง PHPMyAdmin ด้วยคำสั่ง

sudo apt-get install phpmyadmin

หลังจากติดตั้งเสร็จแล้วสร้างลิ้งไปที่ phpmyadmin ด้วยคำสั่งนี้ครับ

sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin

ที่มา  http://research.crma.ac.th/2549/index.php/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87_Apache,_PHP,_MySQL,_PHPMyAdmin_%E0%B8%9A%E0%B8%99_Ubuntu_6.06