1. ubuntu18 서버에서 국내 이미지 소스 설정

6348 단어

1. 국내 미러 소스 구성

##  , 
vim /etc/apt/source.list
## -------------------------------   start -------------------------------------------
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
## -------------------------------   end ---------------------------------------------
sudo apt-get update && sudo apt-get upgrade
## sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common

2. 자체 디렉토리 만들기

mkdir /my/
##  , ,
##  -R 
chmod -R 777 /my/

3.java 개발 환경 변수 설정

## 1. 
vim ~/.bashrc
## ----------------------start----------------------------
## jdk8 env
export JAVA_HOME=/my/jdk1.8.0_251
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
## maven3.5.4   env
export M2_HOME=/my/apache-maven-3.5.4
export PATH=${M2_HOME}/bin:$PATH
## ----------------------end----------------------------
## 2. 
source ~/.bashrc 

4. 서버 시간 차이 8시간

## 1.  
vim /etc/profile
export TZ='CST-8'
## 2. 
source /etc/profile
## 3. 
. /etc/profile

5. 마븐 아리원 설정

vim /my/apache-maven-3.5.4/conf/settings.xml
## localRepository  maven 
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>/my/apache-maven-3.5.4/repo/</localRepository>
  <mirrors>
  <mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public class="hljs-tag"></url>
    </mirror>
  </mirrors>
</settings>

좋은 웹페이지 즐겨찾기