Huawei Cloud ECS Ubuntu18 Practice

Modify the Ubuntu source

apt-get update

get the error info as following:

buntu.com:80 (91.189.88.152), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.142), connection timed out

Look at the Huawei Cloud Portal

mv /etc/apt/sources.list /etc/apt/sources.list.bak
wget -O /etc/apt/sources.list http://mirrors.myhuaweicloud.com/repo/sources.list.bionic
apt-get update

It works now.

Server Configuration

  • Security Group
    Modify the security group, change 3389 to 80 and add 443 for SSL connection
  • SSH Transfer too slow
vi /etc/ssh/sshd_config

uncomment UseDNS: no
restart SSH:service sshd restart

  • Connect too slow
    Open ICMP in at the Security Group

Install and configure Nginx

apt-get install nginx
systemctl start nginx
systemctl enable nginx

And you can access the nginx default html now.

vi /etc/nginx/nginx.conf

uncomment the gzip option to accelerate the website download speed

vi /etc/nginx/conf.d/default.conf
service nginx reload

Install JDK8

wget https://mirrors.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz
tar -xzvf jdk-8u202-linux-x64.tar.gz
vi ~/.bashrc
export JAVA_HOME=/java/jdk1.8.0_202
export JRE_HOME=${JAVA_HOME}/jre  
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
export PATH=${JAVA_HOME}/bin:$PATH 

here, JAVA_HOMEis the jdk unzip path

source ~/.bashrc

system register

update-alternatives --install /usr/bin/java java /java/jdk1.8.0_202/bin/java 300
java -version

ok

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值