linux java install

Linux 2008. 6. 4. 14:09

step1. 리눅스용 java를 다운받기(j2sdk-1_4_2_10-linux-i586.bin)

 

- http://www.java.sun.com

- https://sdlc3b.sun.com/ECom/EComActionServlet;jsessionid=29D92DF03C96458F27F2A641571ED460

 

- 다운로드 받을때는 self-extracting file을 받도록 함

 

 

step2. FTP를 이용하여 설치할 폴더로 해당 파일을 이동

 

 

step3. 해당 파일의 권한을 변경하여 실행할 수 있는 상태로 변환

 

- chmod 755 j2sdk-1_4_2_10-linux-i586.bin

 

 

step4. 설치를 진행함. 이때 나오는 메시지는 라이센스 관련된 메시지 이므로 엔터키를 반복적으로 눌러 패스

 

- ./j2sdk-1_4_2_10-linux-i586.bin

 

step5. 마지막에 동의 관련 질문이 나오면 yes를 눌러 설치되는것을 확인

zip이 풀리면서 촤르륵~~~ 생성되는 파일들을 볼 수 있음

 

step6. 자바가 정상적으로 설치되었다면 폴더가 생성되었을것임

 

step7. profile에서 JAVA_HOME 을 잡아주던가

           아니면 실행파일에서 Full Path를 입력하여 설치를 종료

 

 

 

PS. profile에서 PATH 잡아주기

 

이하 출처 : 네이버지식

 

# vi /etc/profile 에서 PATH 를 잡아 주셔야 합니다.

 

맨 밑에

 

JAVA_HOME=/usr/local/java   <-- 설치 디렉토리 입니다.
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin

CLASSPATH=$CLASSPATH:$JAVA_HOME/lib

export PATH

 

이렇게 추가해 주시면 됩니다.

 

# source /etc/profile

 

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

/etc/profile 수정할때는 매우 조심 스럽게 해야 합니다. 로그인이 되지 못할수도 있습니다.

꼭!! 반드시1!! 터미널 두개 띄워 놓고 하십시오.  source 하고 사용하신후 맛이 가면, 다른걸로 띄워 놓았던 터미널에서 vi /etc/profile 치고 들어가신후 원상 복구 하셔야 합니다.

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

'Linux' 카테고리의 다른 글

gcc install  (0) 2008.07.25
chown  (0) 2008.07.25
lighthttpd install  (0) 2008.06.04
설치  (0) 2008.06.04
BIND,NAMED? DNS설정  (0) 2008.06.04
Posted by 으랏차
,

lighthttpd install

Linux 2008. 6. 4. 14:00
Lighttpd 설치

원본 : http://theexciter.com/articles/installing-lighttpd-on-osx

Lighttpd 1.3.11 has been released, which includes my patch for osx, I’ve updated this post to reflect this, since the patching step is no longer needed.

There’s been a lot of buzz in the Ruby on Rails community lately about lighttpd which claims to be a lightweight, secure and a friggin’ fast http server. And guess what? It most certainly is!


Below are my notes of getting lighttpd 1.3.10 up and running on Mac OSX 10.3with mod_mysql_vhost and mod_fastcgi. Please note that the patch andsymlinking of libmysql may or may not be needed in future versions oflighttpd. Also note that the MySQL version used below is based on the ServerLogistics Complete MySQL package, if you’re using a different package or your own the paths may be different, do a locate mysql_config to figure out where it is.


First of all we need the FastCGI developer kit:


curl -O http://fastcgi.com/dist/fcgi-2.4.0.tar.gz

tar xzvf fcgi-2.4.0.tar.gz

cd fcgi-2.4.0

./configure

make

sudo make install

We also need the pcre libraries:

(cd ..)

curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz

tar xzvf pcre-5.0.tar.gz

cd pcre-5.0

./configure

make

sudo make install

Then, we need to download and unpack the lighttpd tarball:

(cd ..)

curl -O http://www.lighttpd.net/download/lighttpd-1.3.11.tar.gz

tar -xzvf lighttpd-1.3.11.tar.gz

cd lighttpd-1.3.11/

I wanted to be able to use the mod_mysql_vhost and since I’m using the ServerLogistics MySQL package, installed in /Library/MySQL/ a bit of manual tinkering was requirred. The easiest was to create a symlink for the header files to /usr/local/include/mysql:

sudo ln -s /Library/MySQL/include/mysql /usr/local/include/mysql

Note: This probably isn’t really the optimalsolution, but I didn’t really feel like poking around too much in thesources to correct the path problem

Next we need to run the configure script, telling it we want to use mysql for the vhosts:

./configure --with-mysql=/Library/MySQL/bin/mysql_config

If all is good you should see something like this once the configure script is done:

Plugins:



mod_rewrite : enabled

mod_redirect : enabled

mod_ssi : enabled

mod_cgi : enabled

mod_fastcgi : enabled

mod_proxy : enabled

mod_evhost : enabled

mod_simple_vhost: enabled

mod_mysql_vhost : enabled

mod_access : enabled

mod_alias : enabled

mod_setenv : enabled

mod_usertrack : enabled

mod_compress : enabled

mod_auth : enabled

mod_status : enabled

mod_accesslog : enabled

mod_rrdtool : enabled

mod_secdownload : enabled

mod_expire : enabled

And finally we compile and install the binaries:



make

sudo make install

Hooray! We’ve successfully installed lighttpd, now we just need totake care of the config and log files and we’re good to go, start bycopying the lighttpd.conf to /etc (I think that’s a good place to haveit, you may disagree)

sudo cp doc/lighttpd.conf /etc/lighttpd.conf

Configuring the lighttpd.conf should be a breeze, it’s fairly self explanatory, also, please consult the documention

Now create and set the proper permissions on our two log files:

sudo touch /var/log/lighttpd.error.log  

sudo chmod 666 /var/log/lighttpd.error.log



sudo touch /var/log/lighttpd.access.log

sudo chmod 666 /var/log/lighttpd.access.log

Finally, we can start the lighttpd webserver and start having some fun with it:

sudo lighttpd -f /etc/lighttpd.conf

You may wish to add the -D flag so it’ll keep runningin the console, instead of as a daemon, to make it easier to shut downwhile you’re testing your config and such.

That’s it! You’re all set to go, using mysql based vhosts is fairly straingforward, just take a look at the documentation exampleto get an idea how to set it up. If one where to speculate freely onecould imagine that we set ourselves up a complete environment fordeveloping Rails projects, using Rails. Perhaps I’ll even write anarticle about that in the future, until then; enjoy your lighttpd!

  • mongrel cluster proxy 사용을 위한 lighttpd.conf 설정
var.appname = "mailhost"
#server.modules = ("mod_rewrite", "mod_accesslog", "mod_fastcgi", "mod_compress", "mod_proxy")
server.modules = ("mod_accesslog", "mod_compress", "mod_proxy")
server.port = 80
server.username = "cndjr94"
server.groupname = "admin"
server.pid-file = "/WEB/config/pids/lighttpd.pid"
accesslog.filename = "/WEB/config/log/lighttpd/access_log"
server.errorlog = "/WEB/config/log/lighttpd/error_log"
server.indexfiles = ( "index.html" )
#url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html")
server.document-root = "/WEB/webapp/" + var.appname + "/public"
server.error-handler-404 = "/dispatch.fcgi"

proxy.balance = "fair"
proxy.server = ( "/" =>
( ( "host" => "127.0.0.1", "port" => 8001 ),
( "host" => "127.0.0.1", "port" => 8002 ),
( "host" => "127.0.0.1", "port" => 8003 ),
( "host" => "127.0.0.1", "port" => 8004 ) ) )

mimetype.assign = (
".css" => "text/css",
".gif" => "image/gif",
".html" => "text/html",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".js" => "text/javascript",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
)

'Linux' 카테고리의 다른 글

chown  (0) 2008.07.25
linux java install  (0) 2008.06.04
설치  (0) 2008.06.04
BIND,NAMED? DNS설정  (0) 2008.06.04
Command2  (0) 2008.06.04
Posted by 으랏차
,

gcc 설치

linux setup 2008. 6. 4. 13:58

gcc / -v gcc4 / g++ -v / g++4 -v

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

# rpm -qa gcc*

요걸로 모든 패키지 찾아서 전부 삭제하였습니다.

# rpm -evv [gcc 관련 패키지]
# yum install gcc*
# yum install libtool

요렇게 해서 다시 설치했습니다.
이제는 컴피일 때문에 삽질하지 않으렵니다.  -_-; 다른 분들께도 rpm 혹은 yum을 적극 권장합니다. 불필요한 삽질은 개발의욕을 꺽고 건강에 헤롭습니다.

'linux setup' 카테고리의 다른 글

Apache 설정  (0) 2008.12.11
java install  (0) 2008.12.11
Apache install  (0) 2008.12.10
자바 Path  (0) 2008.06.04
IP Setting  (0) 2008.06.04
Posted by 으랏차
,