Powered By Blogger
Showing posts with label centos. Show all posts
Showing posts with label centos. Show all posts

20 May 2011

การ Set Firewall สำหรับ WebServer บน CentOS

หาอ่าน เอกสารวิธี set iptables ได้จาก

http://www.cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables/

แต่ว่าลองใน VM แล้ว เครื่อง Host (Vista )
ก็ยังไม่สามารถมองเห็น web server ได้

อ่านดู ล่างๆ บอกว่าให้รัน
system-config-securitylevel  จาก  # 
หรืออาจไปใช้  #setup แล้วเลือก ส่วน Firewall 


ลองๆทำดู ลองเลือก Disable Firewall ก็เห็น Web จาก CentOS ได้ทันทีเลย
ลองปรับปรุงใหม่ ให้ Customize ให้เลือกเฉพาะ HTTP ,  TELNET , FTP  ก็น่าะพอ 
สำหรับงานทั่วๆไปทำเว็ป และ upload content , และจัดการกับ server ผ่าน console  


ผลคือ ใช้งานได้ครับ 
http://.... 
ftp://... 


----------------------------
ส่วนการ ติดตั้ง telnet นั้นอาจต้อง yum update ก่อน
แต่ว่า ต้อง ตั้งค่า DNS ก่อนนะครับ 


ใช้  #setup แล้วเลือก ส่วน Network แล้วไปแก้ไข ค่า DNS เพิ่ม Primary DNS , Secoundary DNS ถ้ามี
อันนี้ ใช้ GUI ได่้  แต่จะยัง ping google ไม่ได้ นะครับ 


แล้วต้อง  restart network ใหม่ก่อน ด้วยคำสั่ง
#service network restart  
รอสักครู่ แล้ว ลอง ping www.google.co.th  
หยุดด้วย Ctrl-C หรือ อาจ ping  -c 3 www.google.co.th ก่อน  


ข้อมูลจาก WEB --> http://www.arnut.com/b/CentOSUsing7 
-----------------------------
หลัง รัน   ping google ได้แล้ว ลอง update yum 
ด้วย 
#yum update 
แล้ว install  ดัวย 
#yum install  telnet-server
#yum install  telnet-server


#service telnet-server status  


ดูส่วนนี้ประกอบด้วย  --> http://huu2uan.posterous.com/install-telnet-server-on-centos-5





29 December 2010

CentOS Web Server + FTP Server

Setup Linux CentOS สำหรับ ทำ FTP Server
+ Web Server + php

http://202.143.161.22/linux/CentOS.htm

http://www.eak.in.th/2009/12/04/%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-centos-%E0%B9%81%E0%B8%A5%E0%B8%B0-web-server-packages/

CentOS with FTP
http://www.linuxthai.org/forum/index.php?topic=6795.0

FTP Server บน Fodera Core
http://www.linuxlane.com/vsftpd-fedora-core-6-server/


SSH
http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html

2Way PKI + PHP
http://www.howtoconfig.com/development/php-2way-encrypt-pki-openssl.html


PXE Server
http://www.howtoconfig.com/os/ubuntu/network-install-via-pxe-server.html

Squid Reverse Proxy
http://www.howtoconfig.com/os/ubuntu/how-to-implement-squid-reverse-proxy.html

Authen Log
http://www.linuxthai.org/forum/index.php?topic=7605.0


eBook อื่นๆ ยังไม่ได้ลองโหลด
http://ebook-ubuntu.blogspot.com/2010/01/install-xen-centos-53.html


--------------------------------------------------------
OS อื่นๆ

WebDav Protocol บน SuSE   + แสดง Architech เบื้องต้น
http://www.playoss.com/node/111

ติดตั้ง WebDAV บน Apache
http://www.thaitux.info/test/node/38
http://www.thaitux.info/test/taxonomy/term/49

ลอง WebDav กับ Apache
http://vuthi.blogspot.com/2004/12/webdav-apache.html

------------------------------------------------------------
Apache Security
http://www.thaicert.nectec.or.th/paper/unix_linux/apache_sec1_1.php

10 October 2010

install apache on centOS

ต้อง DEBUG  PHP บนเครื่อง CentOS
เคยลองบน  WinXP แล้ว มีปัญหา เลยต้องลง OS เ้อง เลย

************************************************

config  Apache httpd
บน  CentOS
ลองทำบน  CentOS Live CD
ไปโหลด Live CD ตัวเล็กๆ 700MB จาก


sudo yum install httpd mod_ssl


ตาม
http://articles.slicehost.com/2008/2/6/centos-installing-apache-and-php5
http://www.techiecorner.com/125/how-to-install-lamp-apache-php-and-mysql-in-linux-using-yum/

แต่ยังไม่ได้ลอง mysql + php


ตรวจสอบต้องตรวจโดย  su - ก่อนเพื่อเป็น root
แล้วค่อย ใช้
service httpd status
service httpd start 
ตาม  http://www.mail-archive.com/centos@centos.org/msg02899.html
http://www.linuxmail.info/how-to-start-stop-services-centos-5/

ลองเปิด web browser แล้วเลือก
Browse  http://127.0.0.1/  จะเห็นหน้า CenteOS


************************************************
ก่อน install อาจต้อง ติดตั้ง network ก่อน
set default gateway โดย
http://www.cyberciti.biz/faq/howto-rhel-fedora-linux-setup-default-gateway/

# vi /etc/sysconfig/networkSetup GATEWAY={Router-IP}, if router IP is 74.86.49.129, type:
GATEWAY=192.168.1.1
ตัวอย่าง IP แต่ส่วนมากเป็น .1.1

Restart network ด้วย


# /etc/init.d/network restart


แล้ว ถ้าขึ้น OK หมด ก็ ลอง ปิง  192.168.1.1 
แล้วค่อยลองปิง google.co.th


อ้ันนี้ตามที่ลองทดสอบ จะได้ DHCP จาก router เอง
เช่น  192.168.1.34 




******************************************************
install mysql โดย 
******************************************************


# yum install mysql               <-- mysql client  
# yum install mysql-server 
ต้องคอยตอบ y  เรื่อยๆ 


#service mysqld status 
#service mysqld start  


connect mysql client by 
#mysql  
will prompt  
mysql> 


check database by 
mysql> show databases;
mysql> show status; 




******************************************************
Enable Service SSH  for Remote Access ( command line ) 
******************************************************
# service sshd status 
# service sshd start 




--------------------------------------------------------------------
Install ftp  on centOS (NOT Complete ) 


Install 
ftp server ( not secure ) 
by 
# yum install vsftpd
# chkconfig vsftpd on
# service vsftpd start

OpenFirewall
# vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
# service iptables start   <--- or restart   

if want to  Disable Firewall   - > #service iptables stop  

Test FTP 
$ ftp localhost

open at 
# vi /etc/vsftpd/vsftpd.conf
$ man vsftpd.conf

--  Help on  vsftpd  -- 
==================




====================================
SET  FTP  On  CentOS  , Thai/English

http://www.linuxlane.com/vsftpd-fedora-core-6-server/   <-- Thai
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch15_:_Linux_FTP_Server_Setup
http://www.cyberciti.biz/tips/rhel-fedora-centos-vsftpd-installation.html