'Tip > 우분투' 카테고리의 다른 글
MySQL 접속 (0) | 2014.11.19 |
---|---|
Openfire (XMPP) 설치 (1) | 2014.11.19 |
MySQL 유저관리 (0) | 2014.11.12 |
Ubuntu의 명령라인에서 패키지 관리 (0) | 2014.11.11 |
Ubuntu Server에 tomcat 설치 (0) | 2014.11.10 |
MySQL 접속 (0) | 2014.11.19 |
---|---|
Openfire (XMPP) 설치 (1) | 2014.11.19 |
MySQL 유저관리 (0) | 2014.11.12 |
Ubuntu의 명령라인에서 패키지 관리 (0) | 2014.11.11 |
Ubuntu Server에 tomcat 설치 (0) | 2014.11.10 |
유저 관리
mysql> create user '{user-id}'@'{hostname}' identified by '{user-password}'; |
mysql> insert into user(host, user, password) values('{hostname}', '{user-id}', password('{new-password}')); |
mysql> drop user '{user-id}'; 혹은 mysql> drop user '{user-id}'@'{hostname}'; |
mysql> delete from user where user = '{user-id}'; |
$ mysqladmin -u {user-id} -p password {new-password} Enter password: {old-password} |
mysql> update user set password = password('{new-password}') where user = {user-id}; |
mysql> set password for {user-id} = password('{new-password}') ; |
Openfire (XMPP) 설치 (1) | 2014.11.19 |
---|---|
ant를 ubuntu에 설치해봅시다. (0) | 2014.11.18 |
Ubuntu의 명령라인에서 패키지 관리 (0) | 2014.11.11 |
Ubuntu Server에 tomcat 설치 (0) | 2014.11.10 |
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
- 설치 가능한 패키지들의 리스트 갱신: $ sudo apt-get update
- 레파지토리로 부터 패키지 설치: $ sudo apt-get install [package_name]
- 파일 부터 패키지 설치: $ sudo apt-get install [package.deb]
- 패키지 제거: $ sudo apt-get remove [pakcage_name]
- 패키지 제거(설정파일 포함): $ sudo apt-get purge [package_name]
Ubuntu에서 서비스를 관리하는 방법
- 서비스를 시작 $ sudo service {service-name} start $ sudo invoke-rc.d {service-name} start $ sudo /etc/init.d/{service-name} start
- 서비스를 종료 $ sudo service {service-name}stop $ sudo invoke-rc.d {service-name} stop $ sudo /etc/init.d/{service-name} stop
- 부팅시 서비스를 자동 시작 Enabling $ sudo update-rc.d {service-name} defaults
- 부팅시 서비스를 자동 시작 Disabling $ sudo update-rc.d {service-name} remove
◎ chkconfig, sysv-rc-conf, sysvconfig를 설치하고 설정하는 방법도 있으나 "update-rc.d”를 이용하시길 권한다.
ant를 ubuntu에 설치해봅시다. (0) | 2014.11.18 |
---|---|
MySQL 유저관리 (0) | 2014.11.12 |
Ubuntu Server에 tomcat 설치 (0) | 2014.11.10 |
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
Ubuntu Server에 GNU GCC컴파일러 설치 (0) | 2014.11.10 |
$ sudo hostname {your-new-hostname}
$ sudo vi /etc/hostname
{your-new-hostname}
$ sudo vi /etc/hosts
127.0.1.1 {your-new-hostname}
$ sudo /etc/init.d/hostname.sh restart
LG MLT 무력화 (0) | 2015.01.22 |
---|---|
맥북에서 VirtualBox를 이용한 Windows사용 (0) | 2015.01.14 |
터미널에서 하위 폴더들에서 특정폴더를 찾아서 모두 삭제하기 (0) | 2014.10.24 |
배시 버그(bash bug) 또는 쉘쇼크(shellshock) (1) | 2014.09.27 |
TISTORY에 애드센스 광고 삽입하기 (0) | 2014.09.13 |
1. tomcat 다운로드
tomcat.apache.org로 이동하여 좌측의 Download에서 적당한 버전을 선택하고 Binary Distributions에서 Core: tar.gz를 다운로드 받는다.
2. 다운로드한 파일을 압축해제한 후 /opt밑으로 이동한다.
$ tar xvfz apache-tomcat-8.0.14.tar.gz
$ sudo mv apache-tomcat-8.0.14 /opt/tomcat8
3. tomcat의 버전정보와 시스템 정보를 확인해보자
$ cd /opt/tomcat8/bin
$ ./version.sh
Using CATALINA_BASE: /opt/tomcat8 |
4. 시스템 설정을 검토해 보자
$ ./configtest.sh
◎ 만약 tomcat을 이미 실행했다면 종료를 한 후에 test를 진행해야 한다.
5. 사용자를 추가해봅시다.
$ sudo vi /opt/tomcat8/bin/tomcat-users.xml
... <role rolename="manager-gui"/> |
username/password를 알맞게 설정해주세요.
6. 실행 및 종료
$ ./startup.sh # 실행
$ ./shutdown.sh # 종료
7. 실행/종료를 위한 스크립트를 init.d에 생성하자.
$ sudo vi /etc/init.d/tomcat8
#!/bin/sh |
$ sudo chmod 755 /etc/init.d/tomcat8
8. tomcat이 부팅시 자동 실행될 수 있도록 등록해줍시다.
$ sudo update-rc.d tomcat8 defaults
자동 실행을 해제
$ sudo update-rc.d tomcat8 remove
OSX의 Terminal에서 ssh로 로그인을 해서 작업중이라면 Perl locale error가 발생할 수 있다. [해결방법]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8”).
9. tomcat을 실행하고 Server Status를 확인해봅시다.
$ sudo /etc/init.d/tomcat8 start
http://localhost:8080을 오픈하여 보세요.
"Server Status" 버튼을 눌러서 5.에서 설정한 username과 password를 입력하여 Server Status를 확인해보세요.
참고) Apache + Tomcat + MySQL 설치 (우분투)
MySQL 유저관리 (0) | 2014.11.12 |
---|---|
Ubuntu의 명령라인에서 패키지 관리 (0) | 2014.11.11 |
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
Ubuntu Server에 GNU GCC컴파일러 설치 (0) | 2014.11.10 |
Ubuntu에 SSH Server 설치하기 (0) | 2014.11.10 |
0. 사전 준비
0.1 PCRE 최신 라이브러리 다운로드
pcre.org -> anonymous FTP를 이용해 최신 버전을 다운로드 받을 수 있는 사이트에 접속하여 최신 버전 다운로드
0.2 컴파일하고 설치하기
$ tar xvfz pcre-8.36
$ cd pcre-8.36
$ ./configure
$ make
$ sudo make install
0.3 pcre 라이브러리를 /usr/local/lib에 설치된다. 로드가 되지 않을 경우, 다음의 명령어를 입력한다.
$ sudo ldconfig
1. apache사이트에서 관련 파일 다운로드 받기
1.1 httpd 다운로드 하기
www.apache.org -> download -> mirror 사이트로 이동 -> httpd 선택 -> 최신 버전을 다운로드 (httd-2.4.10.tar.gz)를 다운로드
1.2 apr과 apr-util 다운로드 하기
www.apache.org -> download -> mirror 사이트로 이동 -> apr 선택택
2. 압축해제
$ tar xvfz httd-2.4.10.tar.gz
$ tar xvfz apr-1.5.1
$ tar xvfz apr-util-1.5.4
3. 이동
$ mv apr-1.5.1 httpd-2.4.10/srclib/apr
$ mv apr-util-1.5.4 httpd-2.4.10/srclib/apr-util
4. apache 컴파일 하고 설치하기
$ cd httpd-2.4.10
$ ./configure --prefix=/usr/local/apache2
$ make
$ sudo make install
5. apache 시작 및 종료
$ sudo /usr/local/apache2/bin/apachectl start
$ sudo /usr/local/apache2/bin/apachectl /etc/init.d/apache2
$ sudo invoke-rc.d apache2 start $ sudo /etc/init.d/apache2 start : 시작
$ sudo invoke-rc.d apache2 stop $ sudo /etc/init.d/apache2 stop : 종료
6. apache 정상동작 확인하기
$ sudo netstat -anp | grep httpd
7. 부팅 시 자동실행
$ sudo vi /etc/init.d/apache2
#!/bin/sh |
$ sudo update-rc.d apache2 defaults
자동실행을 중단하기위해서는
$ sudo update-rc.d apache2 remove
OSX의 Terminal에서 ssh로 로그인을 해서 작업중이라면 Perl locale error가 발생할 수 있다. [해결방법]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8”).
Ubuntu의 명령라인에서 패키지 관리 (0) | 2014.11.11 |
---|---|
Ubuntu Server에 tomcat 설치 (0) | 2014.11.10 |
Ubuntu Server에 GNU GCC컴파일러 설치 (0) | 2014.11.10 |
Ubuntu에 SSH Server 설치하기 (0) | 2014.11.10 |
Ubuntu에서 Apache+Tomcat 연동 (1) | 2014.10.24 |
Ubuntu Server를 설치하면 컴파일 툴이 설치 되어 있지 않다. 따라서 소스를 통한 서버들의 설치가 용이하지 않다. 따라서 개발툴을 설치하면 되면
$ sudo apt-get update
$ sudo apt-get install build-essential
build-essential은 소스를 빌드하기 위한 컴파일러와 make유틸리티들을 포함하고 있다.
>> 만약 문제가 있다면
$ vi /etc/apt/source.list
source.list파일에서 아래의 부분을 찾아 #을 제거하거나 찾을 수 없다면 #이 제거된 2라인을 추가하고 다시 시도해보자.
#deb http://de.archive.ubuntu.com/ubuntu/ saucy-updates main restricted
#deb-src http://de.archive.ubuntu.com/ubuntu/ saucy-updates main multiverse restricte
Ubuntu Server에 tomcat 설치 (0) | 2014.11.10 |
---|---|
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
Ubuntu에 SSH Server 설치하기 (0) | 2014.11.10 |
Ubuntu에서 Apache+Tomcat 연동 (1) | 2014.10.24 |
Ubuntu에서 Open JDK를 Oracle JDK로 대체하기 (0) | 2014.10.24 |
1. 설치되어 있는 SSH확인하기
$ dpkg -l | grep ssh
2. 설치되어 있지 않다면 openssh-server를 설치하기
$ sudo apt-get install openssh-server
3. ssh 포트 변경하기
$ sudo vi /etc/ssh/sshd_config
Port 22 ==> [원하는 포트로 변경]
4. 재실행하기
$ sudo /etc/init.d/ssh restart
VirtualBox의 VM을 사용하고 있다면 네트워크 설정을 "Bridged Adapter"모드로 설정 후 시도해보시길.
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
---|---|
Ubuntu Server에 GNU GCC컴파일러 설치 (0) | 2014.11.10 |
Ubuntu에서 Apache+Tomcat 연동 (1) | 2014.10.24 |
Ubuntu에서 Open JDK를 Oracle JDK로 대체하기 (0) | 2014.10.24 |
VirtualBox VM에서 Ubuntu Resolution 변경하기 (0) | 2014.09.23 |
Apache와 Tomcat이 다음의 위치에 설치하였다고 가정하고 작업을 진행한다.
Apache: $APACHE_HOME=/usr/local/apache2
Tomcat: $CATALINA_HOME=/opt/tomcat8
mod_jk는 Apache Tomcat의 Tomcat Connectors Download 사이트에서 다운로드 받을 수 있다.
$ tar xvfz tomcat-connectors-1.2.40-src.tar.gz $ cd tomcat-connectors-1.2.40-src/native $ ./configure --with-apxs=/usr/local/apache2/bin/apxs $ make $ sudo make install |
$ sudo apt-get install libapache2-mod-jk |
$ sudo vi /usr/local/apache2/conf/mod_jk.conf |
##### mod_jk.conf ##### LoadModule jk_module modules/mod_jk.so <IfModule jk_module> JkWorkersFile conf/workers.properites JkLogFile logs/mod_jk.log JkLogLevel info JkMount /* ajp13_worker </IfModule> |
$ sudo vi /usr/local/apache2/conf/workers.properties |
##### workers.properties ##### |
$ sudo vi /usr/local/apache2/conf/httpd.conf |
IncludeOptional conf/mod_jk.conf |
3. tomcat 설정
- ajp 통신하는 부분의 주석을 제거
$ sudo vi /opt/tomcat8/conf/server.xml |
$ sudo vi /usr/local/apache2/conf/mod_jk.conf |
##### mod_jk.conf ##### LoadModule jk_module modules/mod_jk.so <IfModule jk_module> JkWorkersFile conf/workers.properites JkLogFile logs/mod_jk.log JkLogLevel info JkMount /tomcat-demo* ajp13_worker </IfModule> |
$ sudo vi /usr/local/apache2/conf/httpd.conf |
LoadModule proxy_module modules/mod_proxy.so
... |
2. VirtualHost를 설정해보자!
Include conf/extra/httpd-vhosts.conf |
$ sudo vi /usr/local/apache2/conf/extra/httpd-vhosts.conf |
다음을 추가해주자.
... <VirtualHost *:80> ServerName tomcat-demo.comProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/tomcat-demo/ ProxyPassReverse / http://localhost:8080/tomcat-demo/ <Location /> Order allow,deny Allow from all </Location> </VirtualHost> |
$ sudo vi /etc/hosts |
127.0.0.1 tomcat-demo.com |
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
---|---|
Ubuntu Server에 GNU GCC컴파일러 설치 (0) | 2014.11.10 |
Ubuntu에 SSH Server 설치하기 (0) | 2014.11.10 |
Ubuntu에서 Open JDK를 Oracle JDK로 대체하기 (0) | 2014.10.24 |
VirtualBox VM에서 Ubuntu Resolution 변경하기 (0) | 2014.09.23 |
Ubuntu Server에 Apache httpd 설치하기 (0) | 2014.11.10 |
---|---|
Ubuntu Server에 GNU GCC컴파일러 설치 (0) | 2014.11.10 |
Ubuntu에 SSH Server 설치하기 (0) | 2014.11.10 |
Ubuntu에서 Apache+Tomcat 연동 (1) | 2014.10.24 |
VirtualBox VM에서 Ubuntu Resolution 변경하기 (0) | 2014.09.23 |