[Linux] ubuntu 16.04¿¡ java 1.8, tomcat8, apache2.4, mysql 5.

   Á¶È¸ 6221   Ãßõ 1    

http://ehostidc.co.kr/center/EH050402.php?no=141561&page=6&choose=tit¡¦ (300)
https://blog.naver.com/goethe1/221546439757 (292)

OS : ubuntu 16.04

서비스 : java 1.8, tomcat8, apache2.4, mysql 5.7 설치

해당 설치는 apt-get 으로 진행되며,

java 설치 정보를 openjdk-java 와 oracle-java 2가지로 나눠서 정리.

0. 서버 설치 완료 후 root 계정으로 테스트 진행되며, 서버 업데이트 완료 후 진행

root@ubuntu:~# apt-get update

root@ubuntu:~# apt-get upgrade

1. JAVA 설치

1.1. openjdk java 설치

a. 자바 해석기 설치

root@ubuntu:~# apt-get install openjdk-8-jre-headless

b. 자바 컴파일러 설치

root@ubuntu:~# apt-get install openjdk-8-jdk

c. java 버전 확인

root@ubuntu:~# java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

1.2 oracle java 설치

a. 의존성 설치

root@ubuntu:~# apt-get install software-properties-common

b. apt 저장소 추가

root@ubuntu:~# add-apt-repository ppa:webupd8team/java




c. apt-get update

root@ubuntu:~# apt-get update

d. oracle-java8 설치


root@ubuntu:~# apt-get install oracle-java8-installer

Reading package lists... Done
Building dependency tree 
Reading state information... Done
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package "oracle-java8-installer" has no installation candidate
root@ubuntu:~# apt-get install software-properties-common
Reading package lists... Done
Building dependency tree 
Reading state information... Done
software-properties-common is already the newest version (0.96.20.7).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use "apt autoremove" to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@ubuntu:~# add-apt-repository ppa:webupd8team/java
Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK8). There are no actual Java files in this PPA.

Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-a...

Update: Oracle Java 9 has reached end of life: http://www.oracle.com/technetwork/java/javase/down...

The PPA supports Ubuntu 18.04, 17.10, 16.04, 14.04 and 12.04.

More info (and Ubuntu installation instructions):
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java...

Debian installation instructions:
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-orac...

For Oracle Java 10, see a different PPA: https://www.linuxuprising.com/2018/04/install-orac...
More info: https://launchpad.net/~webupd8team/+archive/ubuntu...
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpa00m6wfk/secring.gpg" created
gpg: keyring `/tmp/tmpa00m6wfk/pubring.gpg" created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpa00m6wfk/trustdb.gpg: trustdb created
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK




e. java 버전 확인 

root@ubuntu:~# java -version

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

2. tomcat 8 설치

a. tomcat 8 설치

root@ubuntu:~# apt-get install tomcat8

b. tomcat 버전 확인

root@ubuntu:~# apt-get install tomcat8
root@ubuntu:~# /usr/share/tomcat8/bin/version.sh
Using CATALINA_BASE: /usr/share/tomcat8
Using CATALINA_HOME: /usr/share/tomcat8
Using CATALINA_TMPDIR: /usr/share/tomcat8/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.0.32 (Ubuntu)
Server built: May 28 2018 17:21:29 UTC
Server number: 8.0.32.0
OS Name: Linux
OS Version: 4.4.0-128-generic
Architecture: amd64
JVM Version: 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11
JVM Vendor: Oracle Corporation




c. 추가 examples, docs, admin 필요시

root@ubuntu:~# apt-get install tomcat8-admin tomcat8-examples tomcat8-docs

3. apache 설치

a. 패키지 설치

root@ubuntu:~# apt-get install apache2

b. 버전 확인

root@ubuntu:~# apache2 -v
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-04-18T14:53:04




4. mysql 5.7 설치

a. 패키지 설치

root@ubuntu:~# apt-get install mysql-server
b. 버전 확인
root@ubuntu:~# mysqladmin --version
mysqladmin Ver 8.42 Distrib 5.7.22, for Linux on x86_64




5. apache-tomcat 연동 설치 (mod-jk)

a.mod-jk 설치

root@ubuntu:~# apt-get install libapache2-mod-jk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use "apt autoremove" to remove them.
Suggested packages:
libapache-mod-jk-doc
The following NEW packages will be installed:
libapache2-mod-jk
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 159 kB of archives.
After this operation, 451 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 libapache2-mod-jk amd64 1:1.2.41-1 [159 kB]
Fetched 159 kB in 1s (124 kB/s)
Selecting previously unselected package libapache2-mod-jk.
(Reading database ... 130861 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-jk_1%3a1.2.41-1_amd64.deb ...
Unpacking libapache2-mod-jk (1:1.2.41-1) ...
Setting up libapache2-mod-jk (1:1.2.41-1) ...
apache2_invoke: Enable module jk


6. 일괄 설치

root@ubuntu:~# apt-get install openjdk-8-jre-headless openjdk-8-jdk tomcat8 apache2 mysql-server libapache2-mod-jk







https://www.aiocp.co.kr/ ( 딥러닝,머신러닝 서버 판매 ,컨설팅) https://bigbangcloud.co.kr/ ( GPU 클라우드 서비스) ::: AI 서버의 모든것 ::: 인공지능의 시작~ (주)이호스트ICT
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.


PDS
Á¦¸ñPage 22/77
2015-12   1564702   ¹é¸Þ°¡
2014-05   5027973   Á¤ÀºÁØ1
2019-09   5470   µö·¯´×¼­¹ö
2019-09   5503   µö·¯´×¼­¹ö
2019-09   5932   µö·¯´×¼­¹ö
2019-09   4821   µö·¯´×¼­¹ö
2019-09   4674   µö·¯´×¼­¹ö
2019-09   6324   µö·¯´×¼­¹ö
2019-09   7436   µö·¯´×¼­¹ö
2019-09   4851   ±¤Áֱ¸®
2019-09   5658   µö·¯´×¼­¹ö
2019-09   4320   ¹«¾Æ
2019-09   3647   FOXBI
2019-09   5627   µö·¯´×¼­¹ö
2019-09   6274   µö·¯´×¼­¹ö
2019-09   5522   ½ºÄµl¹ÎÇö±â
2019-09   6222   µö·¯´×¼­¹ö
2019-09   5501   À¯Á¤È£»þÄÜ´À
2019-09   5661   µö·¯´×¼­¹ö
2019-09   4915   ±èȲÁß
2019-09   5546   µö·¯´×¼­¹ö
2019-08   7057   ¾Óµå·¹ÁØ