ilreme's blog :: ilreme's blog (7 Page)

'전체 글'에 대한 글 검색 결과 54개search result for posts

MySQL 명령어 모음

show tables;
show table status;
show columns from 테이블이름;
desc 테이블이름;

alter table 테이블이름 modify 컬럼이름 mediumblob;
alter table 테이블이름 modify 컬럼이름 mediumint;
alter table 테이블이름 modify 컬럼이름 float(7,3);
alter table 테이블이름 modify 컬럼이름 varchar(800);
alter table 테이블이름 drop 컬럼이름;
alter table 테이블이름 add 컬럼이름 varchar(800);

alter table 테이블이름 rename 새로운테이블이름;

alter table 테이블이름 add id int;
alter table 테이블이름 add key (id);
alter table 테이블이름 modify id int auto_increment;

alter table 테이블이름  add foreign key (컬럼이름) references 다른테이블이름 (컬럼이름) on delete set null;

select productid from productinfo order by productid limit 개수;
select productid from productinfo order by productid limit 번째,개수;

select count(*) from productinfo where csres IS NULL;

select productid from i12345678 where csdist IS NOTNULL order by csdist;

delete from productinfo;

drop table 테이블이름;

insert into 테이블이름 values(어쩌고,저쩌고);
insert into 테이블이름 (엔티티이름) values(어쩌고);

delete from productinfo where productid LIKE '0001065%';

출처 - http://initiate.tistory.com/101




Indiana Project - New opensolaris


사용자 삽입 이미지

This week Sun's Glynn Foster had two presentations on Project Indiana in Australia and Ireland. In the talks Glynn had went over the basic information on what Project Indiana is about as well as sharing other details and listening to feedback from the audience. These slides are now published on the Internet, some of which we will be sharing in this article as well as talking about some of the points.

사용자 삽입 이미지

Schillix, NexentaOS, and BeleniX are all OpenSolaris-based distributions.

사용자 삽입 이미지

As Ian Murdock has reiterated multiple times, there is confusion with OpenSolaris where users believe it is a downloadable binary distribution itself when in fact OpenSolaris.org is a repository for projects and source code. While Sun and the OpenSolaris community hopes to address these issues with Project Indiana, currently there is a poor download experience and little user community growth surrounding OpenSolaris.org.

Some of the technology issues with Solaris/OpenSolaris at present include high adoption barriers, increases in installation media size, no clear binary technology base, and no formal roadmap or public process for Solaris Express Community Edition. Some of the adoption barriers include the installation, packaging, and hardware support. You can find additional information on the Solaris installation experience in this article.

The customer issues...

While much of this information has already been pointed out, Project Indiana will be an OpenSolaris binary distribution that is community built and will feature a single CD installation and a network package repository. The Project Indiana distribution will be 100% redistributable and a base distribution in which to build Solaris with binary compatibility.

The Project Indiana installation media will be sized to fit onto a CD and will include the core operating system and desktop environment. Project Indiana will better focus on the user experience with the "best of breed open source software" and emphasizes unique Solaris features, such as ZFS, DTrace, and Solaris Containers.

Project Caiman will provide the Project Indiana installation experience. Caiman offers both a graphical and text user interface and has integrated hardware compatibility testing, Live CD/DVD capabilities, deep integration with Solaris features, and simplified system configuration. Project Caiman also allows for the installation of additional software after the operating system installation has been completed. ZFS will be the default file-system in the Project Indiana distribution.

One of the areas where Solaris has been lacking is with package management capabilities, but Project Indiana will feature a new package management infrastructure with simplified administration of binary packages and a more intuitive update experience with ZFS rollback functionality.

Indiana's package management infrastructure will also support network package repositories to install other Sun and community created packages.

For hardware support installation, data will be sent back upstream (possibly similar to Fedora's smolt) as well as a searchable hardware compatibility list. There will also be Phoronix articles dealing with hardware under Project Indiana.

A preview release of Project Indiana is slated for October of 2007 while the first official release should arrive in March of 2008. Project Indiana releases will be on a six-month release cycle.

The discussion, process, and infrastructure for Project Indiana all take place within the community and Solaris Express Developer Edition merges into Indiana.

Project Indiana will be different from Solaris in the respect that it's the community's operating system. Similar to the relationship between Red Hat and Fedora, Solaris will become the polished distribution derived from Project Indiana. Solaris also has slower technology introductions, longer support cycles, and seamless migration from Project Indiana.

The official project page for Project Indiana is here as well as additional information from Phoronix. You can share your thoughts on Project Indiana in the Phoronix Forums.





Rethinking the Meat-Guzzler

A SEA change in the consumption of a resource that Americans take for granted may be in store — something cheap, plentiful, widely enjoyed and a part of daily life. And it isn’t oil.

It’s meat.

The two commodities share a great deal: Like oil, meat is subsidized by the federal government. Like oil, meat is subject to accelerating demand as nations become wealthier, and this, in turn, sends prices higher. Finally — like oil — meat is something people are encouraged to consume less of, as the toll exacted by industrial production increases, and becomes increasingly visible.

Global demand for meat has multiplied in recent years, encouraged by growing affluence and nourished by the proliferation of huge, confined animal feeding operations. These assembly-line meat factories consume enormous amounts of energy, pollute water supplies, generate significant greenhouse gases and require ever-increasing amounts of corn, soy and other grains, a dependency that has led to the destruction of vast swaths of the world’s tropical rain forests.

Beef cattle raised for the Harris Ranch Beef Company, Coalinga, CaliJust this week, the president of Brazil announced emergency measures to halt the burning and cutting of the country’s rain forests for crop and grazing land. In the last five months alone, the government says, 1,250 square miles were lost.

The world’s total meat supply was 71 million tons in 1961. In 2007, it was estimated to be 284 million tons. Per capita consumption has more than doubled over that period. (In the developing world, it rose twice as fast, doubling in the last 20 years.) World meat consumption is expected to double again by 2050, which one expert, Henning Steinfeld of the United Nations, says is resulting in a “relentless growth in livestock production.”

Americans eat about the same amount of meat as we have for some time, about eight ounces a day, roughly twice the global average. At about 5 percent of the world’s population, we “process” (that is, grow and kill) nearly 10 billion animals a year, more than 15 percent of the world’s total.

Growing meat (it’s hard to use the word “raising” when applied to animals in factory farms) uses so many resources that it’s a challenge to enumerate them all. But consider: an estimated 30 percent of the earth’s ice-free land is directly or indirectly involved in livestock production, according to the United Nation’s Food and Agriculture Organization, which also estimates that livestock production generates nearly a fifth of the world’s greenhouse gases — more than transportation.

To put the energy-using demand of meat production into easy-to-understand terms, Gidon Eshel, a geophysicist at the Bard Center, and Pamela A. Martin, an assistant professor of geophysics at the University of Chicago, calculated that if Americans were to reduce meat consumption by just 20 percent it would be as if we all switched from a standard sedan — a Camry, say — to the ultra-efficient Prius. Similarly, a study last year by the National Institute of Livestock and Grassland Science in Japan estimated that 2.2 pounds of beef is responsible for the equivalent amount of carbon dioxide emitted by the average European car every 155 miles, and burns enough energy to light a 100-watt bulb for nearly 20 days.

Grain, meat and even energy are roped together in a way that could have dire results. More meat means a corresponding increase in demand for feed, especially corn and soy, which some experts say will contribute to higher prices.

This will be inconvenient for citizens of wealthier nations, but it could have tragic consequences for those of poorer ones, especially if higher prices for feed divert production away from food crops. The demand for ethanol is already pushing up prices, and explains, in part, the 40 percent rise last year in the food price index calculated by the United Nations’ Food and Agricultural Organization.

Though some 800 million people on the planet now suffer from hunger or malnutrition, the majority of corn and soy grown in the world feeds cattle, pigs and chickens. This despite the inherent inefficiencies: about two to five times more grain is required to produce the same amount of calories through livestock as through direct grain consumption, according to Rosamond Naylor, an associate professor of economics at Stanford University. It is as much as 10 times more in the case of grain-fed beef in the United States.

The environmental impact of growing so much grain for animal feed is profound. Agriculture in the United States — much of which now serves the demand for meat — contributes to nearly three-quarters of all water-quality problems in the nation’s rivers and streams, according to the Environmental Protection Agency.

Because the stomachs of cattle are meant to digest grass, not grain, cattle raised industrially thrive only in the sense that they gain weight quickly. This diet made it possible to remove cattle from their natural environment and encourage the efficiency of mass confinement and slaughter. But it causes enough health problems that administration of antibiotics is routine, so much so that it can result in antibiotic-resistant bacteria that threaten the usefulness of medicines that treat people.

Those grain-fed animals, in turn, are contributing to health problems among the world’s wealthier citizens — heart disease, some types of cancer, diabetes. The argument that meat provides useful protein makes sense, if the quantities are small. But the “you gotta eat meat” claim collapses at American levels. Even if the amount of meat we eat weren’t harmful, it’s way more than enough.

Americans are downing close to 200 pounds of meat, poultry and fish per capita per year (dairy and eggs are separate, and hardly insignificant), an increase of 50 pounds per person from 50 years ago. We each consume something like 110 grams of protein a day, about twice the federal government’s recommended allowance; of that, about 75 grams come from animal protein. (The recommended level is itself considered by many dietary experts to be higher than it needs to be.) It’s likely that most of us would do just fine on around 30 grams of protein a day, virtually all of it from plant sources.

What can be done? There’s no simple answer. Better waste management, for one. Eliminating subsidies would also help; the United Nations estimates that they account for 31 percent of global farm income. Improved farming practices would help, too. Mark W. Rosegrant, director of environment and production technology at the nonprofit International Food Policy Research Institute, says, “There should be investment in livestock breeding and management, to reduce the footprint needed to produce any given level of meat.”

Israel and Korea are among the countries experimenting with using animal waste to generate electricity. Some of the biggest hog operations in the United States are working, with some success, to turn manure into fuel.

Longer term, it no longer seems lunacy to believe in the possibility of “meat without feet” — meat produced in vitro, by growing animal cells in a super-rich nutrient environment before being further manipulated into burgers and steaks.

Another suggestion is a return to grazing beef, a very real alternative as long as you accept the psychologically difficult and politically unpopular notion of eating less of it. That’s because grazing could never produce as many cattle as feedlots do. Still, said Michael Pollan, author of the recent book “In Defense of Food,” “In places where you can’t grow grain, fattening cows on grass is always going to make more sense.”

But pigs and chickens, which convert grain to meat far more efficiently than beef, are increasingly the meats of choice for producers, accounting for 70 percent of total meat production, with industrialized systems producing half that pork and three-quarters of the chicken.

Once, these animals were raised locally (even many New Yorkers remember the pigs of Secaucus), reducing transportation costs and allowing their manure to be spread on nearby fields. Now hog production facilities that resemble prisons more than farms are hundreds of miles from major population centers, and their manure “lagoons” pollute streams and groundwater. (In Iowa alone, hog factories and farms produce more than 50 million tons of excrement annually.)

These problems originated here, but are no longer limited to the United States. While the domestic demand for meat has leveled off, the industrial production of livestock is growing more than twice as fast as land-based methods, according to the United Nations.

Perhaps the best hope for change lies in consumers’ becoming aware of the true costs of industrial meat production. “When you look at environmental problems in the U.S.,” says Professor Eshel, “nearly all of them have their source in food production and in particular meat production. And factory farming is ‘optimal’ only as long as degrading waterways is free. If dumping this stuff becomes costly — even if it simply carries a non-zero price tag — the entire structure of food production will change dramatically.”

Animal welfare may not yet be a major concern, but as the horrors of raising meat in confinement become known, more animal lovers may start to react. And would the world not be a better place were some of the grain we use to grow meat directed instead to feed our fellow human beings?

Real prices of beef, pork and poultry have held steady, perhaps even decreased, for 40 years or more (in part because of grain subsidies), though we’re beginning to see them increase now. But many experts, including Tyler Cowen, a professor of economics at George Mason University, say they don’t believe meat prices will rise high enough to affect demand in the United States.

“I just don’t think we can count on market prices to reduce our meat consumption,” he said. “There may be a temporary spike in food prices, but it will almost certainly be reversed and then some. But if all the burden is put on eaters, that’s not a tragic state of affairs.”

If price spikes don’t change eating habits, perhaps the combination of deforestation, pollution, climate change, starvation, heart disease and animal cruelty will gradually encourage the simple daily act of eating more plants and fewer animals.

Mr. Rosegrant of the food policy research institute says he foresees “a stronger public relations campaign in the reduction of meat consumption — one like that around cigarettes — emphasizing personal health, compassion for animals, and doing good for the poor and the planet.”

It wouldn’t surprise Professor Eshel if all of this had a real impact. “The good of people’s bodies and the good of the planet are more or less perfectly aligned,” he said.

The United Nations’ Food and Agriculture Organization, in its detailed 2006 study of the impact of meat consumption on the planet, “Livestock’s Long Shadow,” made a similar point: “There are reasons for optimism that the conflicting demands for animal products and environmental services can be reconciled. Both demands are exerted by the same group of people ... the relatively affluent, middle- to high-income class, which is no longer confined to industrialized countries. ... This group of consumers is probably ready to use its growing voice to exert pressure for change and may be willing to absorb the inevitable price increases.”

In fact, Americans are already buying more environmentally friendly products, choosing more sustainably produced meat, eggs and dairy. The number of farmers’ markets has more than doubled in the last 10 years or so, and it has escaped no one’s notice that the organic food market is growing fast. These all represent products that are more expensive but of higher quality.

If those trends continue, meat may become a treat rather than a routine. It won’t be uncommon, but just as surely as the S.U.V. will yield to the hybrid, the half-pound-a-day meat era will end.

Maybe that’s not such a big deal. “Who said people had to eat meat three times a day?” asked Mr. Pollan.

http://www.nytimes.com/2008/01/27/weekinreview/27bittman.html





L2, L3, L4 스위치는 무슨 기능을 할까?

L2 스위치, L3 스위치, L4 스위치에 대해 알아 보기로 합시다.
이 스위치에 대해서 알고 싶다면 우선 OSI 7 Layer 부터 알고 있어야 합니다.

아래 그림은 전산과 학생들이 학부과정에서 열심히 배우는 네트워크의 7개의 계층적
모델을 나타낸 것입니다.

사용자 삽입 이미지



Layer1 은 Physical Layer이며, 물리적인 접속에 대한 정의가 내려져 있습니다.
그리고 우리가 통상적으로 사용하는 Ethernet이란 기술이 Layer1에 해당하는 기술이라고
생각하시면 됩니다.

Layer2 는 Data link Layer이며, 데이터를 전달하는 방법에 대한 정의가 내려져 있습니다.
그리고 위와 같이 Ethernet이 Layer2에도 해당하는 기술이며, 실제로 우리가 접근할 수
있는 내용은 MAC어드레스라는 것이 있습니다. Ethernet에서 데이터를 전달하기 위해서
사용되는 것인데, Ethernet에서는 데이터 전달을 위해서 Frame이란 단위로 전송하며,
Frame 헤더에 출발지 MAC어드레스와 도착지MAC어드레스가 포합됩니다.
Ethernet은 기본적으로 브로드케스팅 방식으로 데이터를 전송하며,
어느 Host가 Frame을 발생시키면, 그것은 네트워크의 모든 호스트에 전달되며,
자신의 MAC어드레스가 들어있을 경우에만 받습니다.

Layer3 는 Network레이어입니다.
TCP/IP 프로토콜에서는 IP프로토콜에 해당하며,
모든 호스트들이 MAC어드레스와는 별도로 IP어드레스를 가지고, 통신을 할 수 있습니다.
IP에서는 네트워크 구성이 가능하게 됩니다.
(Layer2에서는 네트워크가 아닌 하나의 모임(?)만이 가능하죠..)

Layer4 는 Transport레이어입니다.
TCP/IP 프로토콜에서 TCP프로토콜에 해당합니다.
Transport레이어에서 드디어 정상적인 데이터 전송이 가능하게 됩니다.
그래서 IP레이어에서 전달 받은 데이터를 정확하게 받았는지 검증하고,
응답을 할 수 있게 됩니다.
(IP레이어는 일방적인(?) 전송만 가능하죠..)

Layer5 이후에는 Session, Presentation, Application이 존재하는데.
TCP/IP에서는 우선 뭉쳐서 Application레이어라고 보시면 됩니다.

다시 원점을 돌아가서, 이제 스위치에 대한 설명을 바로 이해 하실 수 있으실 것입니다.

우선 L2 Switch 라고 하면 OSI 7 Layer 의 "Layer 2" 를 이해하고 처리 할 수 있는 녀석
이라고 생각하시면 됩니다. 간단히 말해 L2 Switch 는 MAC 어드레스를 읽고 처리한다는
뜻입니다.

위에서 Ethernet은 기본적으로 Broadcasting을 사용한다고 했는데, 이것을 개선한 것이 L2 Swtich 입니다. 백날 Broadcasting하던 것을 MAC어드레스를 읽어서 해당 호스트에만 전달할 수 있게 해주게 되어 호스트간의 Dedicated 대역폭을 제공하게 됩니다. 물론, Broadcasting을 할 경우 10/100/1000Mbps를 모두 공유하므로, 하나의 허브에 N개의
호스트를 넣으면, 1/N의 속도로 각각 통신을 할 수 있게 됩니다.

다음으로 L3 Swtich 는 위의 OSI 7 Layer 의 "Layer 3" 를 이해하고 처리 할 수 있는 녀석이
라고 생각하시면 됩니다. 간단히 말해 IP(네트워크 주소)를 읽고 처리 한다는 뜻입니다.
IP는 네트워크를 구분하는데 사용되니 L3스위치는 네트워크간의 전송을 할 수 있다는 말이 됩니다. 이것은 실제로 라우터 에서 하던 라우팅에 해당하며, 라우터를 대신하는 기능으로
사용됩니다.

다음으로 잘 알고 계신 L4 Swtich 도 간단히 설명 드리겠습니다.
L4 는 OSI 7 Layer 의 Layer 4 를 이해 하고 처리 한다는걸 말씀 안드려고 아실수 있으시겠
지요.

Layer 4 의 TCP를 읽고 처리한다는 뜻이며 TCP의 정보를 읽고 처리(제어)를 할 수 있다는 뜻입니다. 주로 활용되는 분야는 Load Balancing 과 같은 기능이며, 웹서버의 포트로 많이 사용되는 TCP 80번 포트의 트래픽과 같은 것을 인지할 수 있으며 그 트래픽을 연결된 서버팜의 서버들에게 균등하게 할당할 수 있게 됩니다.

L4 Swtich 다음으로 L5~7 Switch 가 있는데 이는 앞서 설명드린 L4 Switch의 영역을 를 좀더 세분화하여 처리하거나 서버단의 Application 에서 처리 하던것을 Switch 에서 처리해보자~ 라는 개념으로 만들어진 것입니다.

이제 잘 이해가 가셨겠지요? ^^

'네트워크' 카테고리의 다른 글

L2, L3, L4 스위치는 무슨 기능을 할까?  (12) 2008.01.24




CentOS?

사용자 삽입 이미지





 

CentOS 가 뭘까?

CentOS는 RHEL(RedHat Enterprise Linux)의 클론 버젼입니다. 즉 모든 기능이나 패키지는 똑같지만 이름만 틀리지요.

레드햇 리눅스는 9버젼 이후로 무료 기술지원을 하지 않습니다. 그래서 일부 금액을 래드햇사에 지불 하고서 패키지 업데이트나 보안 패치 등을 받는 것이 바로 RHEL 입니다. 그래서 레드햇에서는 RHEL을 유료화 하는 대신에 Fedora project 를 통해 무료 페도라 코어라는 무료 배포판을 제공합니다.

즉 페도라 프로젝트를 통해 페도라 코어의 버그나 결함 등을 참고하여 RHEL을 만들어 유료로 기술 지원하는 것이지요. 따라서 페도라 코어는 yum 등의 패키지 관리 프로그램을 통해 무료로 패키지를 업데이트 하거나 설치할 수 있습니다. 하지만 RHEL의 경우 RHN 이라는 자사의 네트워크에 제품(리눅스)을 등록하지 않으면 이러한 패키지 업데이트나 보안 패치 등을 받을 수 없어서 매우 불편하죠.

그러한 불편함들을 개선한것이 RHEL 대신에 사용할 수 있는 OS, 바로 CentOS입니다. CentOS는 RHEL과 완전 클론으로 리눅스 제품을 등록하지 않아도 페도라 코어와 마찬가지로 패키지 관리를 할 수 있는 장점이 있습니다. 둘간의 별다른 차이는 없었습니다. RHEL의 유료 기술지원이 부담된다면 CentOS를 사용하는 것도 하나의 좋은 방법일 것입니다.

CentOS 를 쓰는 이유는 무엇인가요.

앞서서 말씀드렸다시피 RHEL은 유료라서 정식으로 등록하지 않으면 패키지 관리도 하기 힘들지요. 그래서 래드햇과 클론 판인 CentOS를 사용하는 것입니다. RHEL과 달리 무료로 패키지를 관리 할 수 있으니까요.

CentOS는 주로 무슨 용도로 많이 쓰이나요?

yum을 통해서 한 번이라도 패키지를 설치해 보셨다면 yum의 편리함을 아실 것입니다. yum으
로 어떤 패키지를 설치 할 때 해당 패키지의 의존성까지 찾아서 설치를 해주지요. 하지만 RHEL에서는 이러한 기능을 사용하기 위해서는 유료 제품 등록을 해야 합니다. 다운은 어떻게 받았어도 rhn사이트에 제품키를 입력하고 사용해야지만 자동적인 패키지 관리가 되는 것이지요.

제가 이번에 RHEL5와 CentOS5를 설치하여 오라클 10g를 설치하였습니다. 하지만 RHEL과 Centos 모두 특정 패키지가 없어서 설치가 안되더군요. 그리고 나온지 얼마되지 않아 rpmfind.net 등에서 패키지를 찾지도 못하구요. 하지만 yum으로 쉽게 패키지를 찾아 설치하여 오라클을 설치 할 수 있었습니다. 물론 CentOS5에서만 가능했습니다. RHEL5의 경우 등록이 되지 않아 패키지를 결국 찾지 못해서 RHEL5에서는 설치가 불가능했습니다.

그리고 설치시에 이번 RHEL5의 경우는 제품키를 입력해야지만 전체 패키지를 설치할 수 있습니다. 즉 제품키가 입력되지 않고 설치가 된다면 일부 패키지를 설치할 수 없게 됩니다.(이전버젼-RHEL3/4-은 제품키를 묻지 않았습니다. 설치시에 모든 패키지가 설치 가능했습니다) CentOS5와 설치되는 패키지를 비교한 결과 이번에 아마 를러스터링 서버 기능이 추가/지원 되는 거 같은데 RHEL5의 패키지 에서는 제품키를 입력하지 않아 해당 패키지가 보이지 않더군요.

이런 RHEL의 제한을 넘어 무료로 모든 기능을 사용하고 싶다면 CentOS를 설치하게 좋겠지요.


스크랩: 네이버 아스라다님의 글 http://blog.naver.com/01191879872





페이지 이동< 1 ··· 4 5 6 7 8 9 10 11 >