Ubuntu 18.04 Server Environment Setup(Ubuntu 18.04 服务器环境设置)

本文详细介绍如何在Ubuntu系统中进行基本配置,包括更改源镜像以提高软件下载速度,并安装常用开发工具如Vim、Git及Java等。此外,还介绍了如何安装并配置Tomcat、Docker以及GDAL等软件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Mirror

  • vim sudo apt-get install vim
  • backup sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  • change sudo vim /etc/apt/sources.list
    press ESC type ggdG
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get dist-upgrade
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

GIT

  • install sudo apt-get install git

Java1.8

use installer for java provided by oracle,the install path is /usr/lib/jvm/java-8-oracle/

##1.add ppa source
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
##2.install  oracle-java8-installer
sudo apt-get install oracle-java8-installer
##3.set default java compiler
sudo update-java-alternatives -s java-8-oracle
##4.test
java -version

Tomcat


Docker

##1 remove exist docker
sudo apt-get remove docker docker-engine docker.io
##2 add dependency
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
##3 add GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
##4 add repo
sudo add-apt-repository \
   "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
   $(lsb_release -cs) \
   stable" 
 ##5install docker
 sudo apt-get update
 sudo apt-get install docker-ce
 ##6 test
 docker version

###mysql


###GDAL

##1 download tar file
wget -c http://download.osgeo.org/gdal/2.3.1/gdal-2.3.1.tar.gz
##2 unzip tar file 
tar -zxvf gdal-2.3.1.tar.gz -C gdal
##3 configure enviroment
sudo ./configure
##4 install 
sudo make
sudo make install
##5 append following into `.bashrc` file 
export PATH=/usr/bin/gdal/lib:$PATH
export LD_LIBRARY_PATH=/usr/bin/gdal/lib:$LD_LIBRARY_PATH
export GDAL_DATA/usr/bin/gdal/share/gdal
##6 test
gdalinfo --version
##7 install swig and ant for java build
sudo apt-get install swig
sudo apt-get install ant
##8 build for java or python
http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值