2006년 3월 18일 토요일

+ 좋은 아이디어를 내는 필요 충분 조건(펌)

+ Google’s services

출처: http://www.thirdtype.net/tt/index.php?pl=511

Here’s the big list of Google’s services:

  • Add to Google lets publishers create a custom “Add to Google” button for their RSS feeds. When a user clicks the button, they can choose to either add the feed to Google Reader, or the Google Homepage service.
  • Blogger is Google’s blog-hosting and creation service which seems to be very popular on the web because of the price (free) and ease of use.
  • Froogle is Google’s product search engine that you can use to find the cheapest price for a product.
  • GMail (or Google Mail) is Google’s popular email service, that gives you over 2 gigabytes of storage.
  • Google AdSense is Google’s contextual advertising service, popular among many websites. Google also released Onsite Advertiser Sign-Up on November 21, 2005 which lets advertisers buy ads on a site directly from the Google Ads on that page.
  • Google AdWords is the other side of AdSense. While AdSense lets publishers put ads on their site, someone has to pay for those ads, and AdWords connects companies with publishers so you can make a little bit of money.
  • Google Alerts are e-mail updates to particular searches you do on Google. Pretty useful for monitoring websites or news.
  • Google Analytics crawls your website and keeps track of your visitors through a small piece of Javascript. Great tool for webmasters trying to improve their stats and AdSense revenue.
  • Google Answers lets you hire someone to research a topic or answer a question for you.
  • Google Base looks like its going to be Google’s massive content library, with all sorts of content, uploadable by anyone. Oddly enough, it sounds like EPIC and Google Grid mentioned in this video. Many people are comparing this service to Craigslist.
  • Google Blog Search is very much like the web search service but letting search only through various blogs around the web.
  • Google Book Search allows you to search though books that Google has scanned into their database.
  • Google Catalogs is a search engine for mail-order catalogs.
  • Google Click-to-Call lets users call advertisers directly from Google search results, for free, at Google’s expense.
  • Google Code is Google’s effort to promote and contribute to Open Source software.
  • Google Compute exists as a part of the Google Toolbar and uses your computer’s idle time (when you’re not using it) to compute data from distributed computing projects like Folding@Home.
  • Google Deskbar is essentially an embedded IE window in your Window Taskbar that you can search Google from.
  • Google Desktop is similar to apps like Konfabulator or Dashboard but not as attractive. It offers various widgets and a sidebar which let you do things like searches, aggregate feeds, write notes, check weather, and more.
  • Google Directory which is similiar to Yahoo’s and dmoz’s services, letting you search by category.
  • Google Earth is a desktop application which is basically Google Local on steroids.
  • Google Groups allows you to create a mailing list, read Usenet posts, and generally collaborate with others who share a similar interest.
  • Google Homepage is a webpage which lets you add various widgets like weather, news, horoscopes and more, much like Netvibes.
  • Google Image Search is Google’s slightly-lesser-known service to search for images.
  • Google Labs highlights all the projects Google is working on for future release.
  • Google Local combines data from Google Maps with information on local businesses and venues.
  • Google Maps is a mapping service which also provides driving directions to and from different locations. The service is only available in a few countries (mainly the U.S.) but support for other countries is expected in the future. Google Maps has become quite popular lately thanks to a readily available API which lets people create their own maps.
  • Google Mobile is similiar to Google SMS, but using WAP instead.
  • Google Movie Showtimes lets you type in a zip code or address, and it will find movie theaters and showtimes near that area.
  • Google News is a news portal, aggregated by Google’s computers. Everything is done by machines, so no human interaction.
  • Google Reader is a new product which acts as a web-based RSS reader.
  • Google Ridefinder lets you easily find taxis in some of the major cities around the United States.
  • Google Scholar searches things such as theses, papers, and other research and technical information.
  • Google Search History is technically part of the Google Homepage service, but does have its own page so it warrants a mention. Basically, if you sign in with a Google account, Google will keep track of all your searches done via its web search engine.
  • Google Send to Phone is a little Firefox extension which lets you send text messages to mobile phones via SMS.
  • Google Sitemap helps create particular searches for a web address which can be very useful for webmasters looking to index their own site, or see who is linking to it.
  • Google SMS allows you to access many Google services through your mobile phone through text messaging (message GOOGL to learn more).
  • Google Store isn’t really a service, but rather a place to buy some cool Google merchandise.
  • Google Suggest is just an extension to the normal Google web search engine, but with autocomplete functionality to your searches making it a little easier to find what you need. There is also a Firefox extension available.
  • Google Talk is Google’s IM and VoIP program running on the Jabber network. You need a Gmail account to use this.
  • Google Toolbar is the swiss army knife of toolbars, if ever there was one letting your use the various Google web services from your toolbar, as well as offering other interesting information like a site’s PageRank and more.
  • Google Language Tools lets you translate a phrase or entire website, as well as giving you access to web search in different languages, or the ability to search for a particular something in just one language.
  • Google Video and Google Video Upload offer an archive of freely available video clips.
  • Google Web Accelerator supposedly helps load web pages faster, but there have been security and privacy issues raised about this application.
  • Google Web Search is the familiar web search. It also allows you to access certain functions like a calculator, a stock tracker, word definitions, travel information, weather, and more by simply searching for that information (for example, define onomatopoeia or weather 90210). These are not standalone services but a part of web search, which is why I’ve added them here and not into their own section. Additionally, there is the Advanced Search feature for…well…advanced searches which could be more precise than normal searches.
  • Hello is a small IM client which is used in conjunction with Picasa to share pictures with family and friends.
  • Orkut is a networking site similar to Frienster or MySpace, except it is invite only, so if you want to join it, you’ll have to know a guy, who knows a guy.
  • Picasa is a fantastic digital photo organizer application for your desktop.

Now that you know about many of Google’s services, get out there and start Googling!

2006년 3월 13일 월요일

로드밸런싱과 NFS를 이용한 여러대의 서버를 사용하는 방법


제목: 로드밸런싱과 NFS를 이용한 여러대의 서버를 사용하는 방법

글쓴이: SyNoVa (2005년 09월 22일 00시 31분)

이 글은 phpschool의 한사랑님이 쓰신글을 스크랩 해온 것입니다.
===========================================================
+++++++++++++++++++++++++++++++
* 서버 동기화(로드밸런싱관련)
+++++++++++++++++++++++++++++++

들어가는 말
서버 동기화는 일반적으로 로드밸런싱이라고 하기도 한다. 또한 서버 동기화의 경우는 여러가지 형태가 있지만...
여기서는 어떤분의 소개로 되어 있는 rsync를 이용해서 동기화 시키도록 한다. 일반적으로 서버를 동기화 하기 위해 미러링서비스를 하기도 한다.
접속자가 상당히 많은 서버에서 주로 사용하는 방법이다. 웹서버가 10대, 20대 이상되었을때.. 동일한 소스로 동일한 도메인으로 제공하길 원할때 사용하는 방법이다.

여기서 서버는 총 3대로 설명한다.
A서버 : 웹서버1 192.168.0.1
B서버 : 웹서버2 192.168.0.2
C서버 : 웹서버3 192.168.0.3

========== 네임서버 세팅 ======================================
네임서버가 세팅되어 있는 서버에서 네임서버에서 다음과 같이 설정한다.
vi /var/named/domain.com.zone

test1 IN A 192.168.0.1 << - A서버에서 운영된다.
test2 IN A 192.168.0.1 << - A서버에서 운영된다.
test1 IN A 192.168.0.2 << - B서버에서 운영된다.
test2 IN A 192.168.0.3 << - C서버에서 운영된다.

즉, test1.domain.com 의 경우는 A, B서버에서 동일하게 가동이된다. 즉, 어떨때는 A서버에서 또 어떨때는 B서버에서 운영이 된다는 말이다.
test2.domain.com 의 경우는 A, C서버에서 동일하게 가동이된다. 즉, 어떨때는 A서버에서 또 어떨때는 C서버에서 운영이 된다는 말이다.

================================================================

적용방법은
A서버에는 두개의 사이트가 돌어간다고 가정하자.
test1.domain.com (경로 /home/test1)
test2.domain.com (경로 /home/test2)

test1.domain.com 은 B서버와 동기화를 한다.
test2.domain.com 은 C서버와 동기화한다.

한서버에서 여러개의 도메인으로 동기화를 시킬수 있지만. 여기서는 학습상의 목적으로 위와 같이 한다.
환경설정은 A서버에서 B서버와 C서버가 접속할 수 있도록 설정해준다.


========= A서버에서 환경설정 ===============================

#vi /etc/xinetd.d/rsync

# default: off
# description: The rsync server is a good addition to an ftp server, as it # allows crc checksumming etc.
service rsync
{
disable = no <<===== 이부분만 수정하면 된다.
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}


그 다음 rsync의 설정파일을 수정해 줘야 한다.

rsync의 설정 파일은 rsyncd.conf 파일이다. 물론 이 파일은 원래 존재하지 않는다. 새로 만들어 줘야한다.
#vi /etc/rsyncd.conf

[test1]
path = /home/test1
comment = webservice-dir
uid = root
gid = root
use chroot = yes
read only = yes
hosts allow = 192.168.0.2 <<======= 192.168.0.2서버에서 /home/test1 의 소스를 가져가는것을 허용한다.
max connections = 1
timeout = 300

[test2]
path = /home/test2
comment = webservice-dir
uid = root
gid = root
use chroot = yes
read only = yes
hosts allow = 192.168.0.3 <<======= 192.168.0.3서버에서 /home/test2 의 소스를 가져가는것을 허용한다.
max connections = 1
timeout = 300

추가하길 원한다면.. 위의 항목을 몇몇 더 추가하면 된다.


이렇게 하고,
#/etc/rc.d/init.d/xinetd restart
를 실행하여 적용시킨다.


========== B서버에서 A서버의 자료를 가져가기
rsync -avzrt --delete 192.168.0.1::test1 /home/test1


========== C서버에서 A서버의 자료를 가져가기
rsync -avzrt --delete 192.168.0.1::test2 /home/test2

이렇게만 실행하면 A 서버에 있는 자료를 각각 B서버와 C서버에서 가져가게 된다.
위의 명령어를 매번 실행할 수는 없기에 crontab에 걸어서 매 1분단위로 실행하게 하도록 한다.
처음 개발시에만 그렇게 하고, 나중에 안정화되면 없애는것도 괜찮을듯..

*/1 * * * * root /home/server/cron_shell/rsync.sh << - shell 스크립트를 만들어서 /home/server/cron_shell/rsync.sh에 저장해 두었다.


이작업이 완료되고 나면 A서버와 B,C서버에서 httpd.conf 화일을 수정하여 /home/test1, /home/test2 를 각각 Virtual host 세팅을 하자. 이부분은 생략한다.

이것으로 로드밸런싱 작업은 완료되었다.



-a는 아카이브 모드. 심볼릭 링크, 속성, 퍼미션, 소유권 등 보존
-v 전송 상태를 보여줌
-z 전송시 압축을 함.
-r recursive (하위 디렉토리까지 포함)
-t 변경시간 전송 (이것이 없으면 전송한 시간으로 바뀜)

--delete A서버에는 없는데 B서버에 있다면 지우라는 명령



+++++++++++++++++++++++++++
* NFS로 각 서버 링크
+++++++++++++++++++++++++++
들어가는 말..
webserver에 상당히 많은 파일이 존재하고, 파일에 잦은 접속을 해야하는 경우.. 또는 동영상서비스를 재공해야하는 경우.. 또이미지로 인해 웹서버의 부하 등을 고려해서 여러대의 서버를 운영하는 경우가 있다.. 하지만, 여러대의 서버를 운영하다보면, 도대체가 어디에 무엇이 있는지 또 그 화일을 수정하기 위해서는 어떤서버에 접속해야하는지 난감한 경우가 많다. 그래서 한서버에서 여러대의 서버의 자료들을 컨트롤하기 위해서 사용한다.

즉, D라는 파일서버가 존재하고 이 파일서버는 이미지/동영상/자료실 등을 운영하는 서버이다. url은 http://files.domain.com 이라고 하자.

A웹서버 또는 B웹서버에서 게시판의 파일 업로드를 D서버로 해야하는 경우에..A서버의 폼에서 D서버로 submit을 시켜야하는데.. 이렇게 하면 프로그램을 짜는 사람도.. 상당히 개발이 힘들어지게 된다.
그렇다고 A서버, B서버에서 그 첨부화일을 가지고 있을 수도 없는 노릇이다. 그렇다면 위의 로드밸런싱을 한 서버라면 엄청나게 꼬여버리게 된다.

다시한번 정리를 해 보자.. 위에서 로드밸런싱으로 A서버의 자료를 B서버(또는 C서버)로 복사를 하게 된다. 하지만 이 부분은 어디까지나 개발자가 수정/편집한 화일들을 복사해가는 경우에 지나지 않는다. 사용자들이 첨부화일을 올린것을 A,B서버에 공통으로 가지고 있을 수는 없는 노릇이다. 그럼 이 사용자들의 첨부화일을 D서버에 공통으로 올라가게 하는 방법은 없을까??

NFS를 이용해서 다른서버에 있는 화일을 이서버에 존재하는것처럼 하는 것이다. 즉, 업로드시에는 A서버나 B서버에서 하고, 실제로 다운로드를 하거나 사용자들이 접속하게 되는 경우에는 D서버로 접속해서 받아가는 형태...
이런 자료들을 D서버에 저장하고 다운로드 받기위해 http://files.domain.com/filename.zip 을하게 되면 다운로드가 된다.

A서버와 B서버에서 D서버의 특정폴더를 자신의 것인양 보여지게 하는 방법은 다음과 같다.


1. D서버에서 다음과 같이 설정하자.
#vi /etc/exports
/home/files 192.168.0.1(rw,no_root_squash)
/home/files 192.168.0.2(rw,no_root_squash)

#/etc/rc.d/init.d/nfs restart
#/etc/rc.d/init.d/nfslock stop


2. 이제 D서버의 /home/files폴더를 A, B서버에서 자신의 것인양 사용하려면 마운트를 해야한다.
빠른 mount를 위해서 다음과 같이 설정하자. (A, B서버에서.. 각각)
#vi /etc/hosts
192.168.0.4 files.domain.com files

이제 마운트를 한다.
#mkdir /home/files(A,B서버에서 각각 - 마운트는 미리 폴더를 생성해 두고 한다.)
#mount -t nfs files.domain.com:/home/files /home/files (A, B서버에서 각각)

그리고 /home/files 에가서 확인해 봐라. D서버, A서버, B서버에서 각각 화일을 하나씩 생성해보고 동일한 화일이 존재하는지..
존재할 것이다.

그럼.. 이제 A,B서버에서 게시판이나 기타 다른 프로그램으로 첨부화일을 D서버로 올리는 경우에 저장되는 경로를 /home/files로 저장한다면 될것이다. 물론 chmod를 777 로 해 줘야 할 것이다.

만약 A, B서버에서 위의 mount 명령어를 실행했을때 접속이 안된다는 메시지가 뜨면..
D서버에서 ntsysv 를 실행해서 nfs에 체크하고 nfslock에 체크를 해제한후에 /etc/rc.d/init.d/xinetd restart 를 한후 다시한번 시도 해보아라.


위와 같이 하면, 여러대의 웹서버와 별도의 대용량 파일서버/이미지서버 등의 작업은 한 서버에서 관리하는것이 가능하다.

에궁.. 머리야.. 위의 테스튼 Linux Fedora 3에서 테스트 하고 다른 어떤분의 자료를 바탕으로 작업후 테스트후 내용을 정리한 것입니다.

고유주소: http://www.codedream.net/blog/?no=139

블로그: SyNoVa의 CodeDream.NET (http://www.codedream.net/blog/)