Quick Guide to Secure Alibaba Cloud Server Setup with JDK, Tomcat & Docker
This step‑by‑step tutorial shows how to enable security groups, configure a BT panel or command‑line environment, install JDK, Tomcat, and Docker on an Alibaba Cloud Linux server, and verify firewall and service status for a production‑ready setup.
1. Enable Security Group
1.1 Enable Security Group
1.2 Get public IP and change password (first time requires reboot)
2. Build Environment Using Panel
2.1 Build Environment
1. BT panel: https://www.bt.cn/download/linux.html
2.2 Open ports in security group
2.3 Execute command
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.shAnswer "y" to all prompts.
3. Build Environment via Command Line
3.1 Command line operations
1. Prepare work, open ports in the Alibaba Cloud console.
2. Download software.
Xshell and Xftp installation and usage https://blog.csdn.net/qq_44895397/article/details/107677573
Download and use: https://www.yuque.com/docs/share/42e4002d-1a9c-43d0-91fa-107d07ec61ee?#
4. Install JDK, Tomcat, Docker
1. Upload previously downloaded JDK and Tomcat archives
2. Install JDK via rpm
Upload resources.
Check environment:
java -versionIf a default JDK is already installed, uninstall it:
First find installed OpenJDK packages: rpm -qa | grep java Then remove packages that start with java:
yum -y remove java-1.7.0-openjdk-1.7.0.141-2.6.10.5.el7.x86_64
yum -y remove java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64
... (omitted) ...3. Install uploaded JDK
# essentially unzip the JDK archive
rpm -ivh jdk-11.0.8_linux-x64_bin.rpmAfter installation run java -version to verify.
4. Install Tomcat
Extract archive: tar -zxvf apache-tomcat-9.0.37.tar.gz Enter directory and start test:
cd apache-tomcat-9.0.375. Start Tomcat
6. Firewall information (check if ports are open)
# Check firewall status
systemctl status firewalld
# Start, restart, stop firewalld
service firewalld start
service firewalld restart
service firewalld stop
# List firewall rules
firewall-cmd --list-all # full info
firewall-cmd --list-ports # only ports
# Open port 80/tcp permanently
firewall-cmd --zone=public --add-port=80/tcp --permanent
systemctl restart firewalld.serviceCommand meanings:
--zone # scope
--add-port=80/tcp # add port with protocol
--permanent # make permanent, otherwise lost after reboot7. Install Docker via yum
Official documentation: https://docs.docker.com/engine/install/centos/
Check system version
Prepare installation environment
yum -y install gcc
yum -y install gcc-c++Remove previous Docker versions
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engineInstall basic utilities
sudo yum install -y yum-utilsConfigure mirror repository
# Use domestic mirror
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoUpdate yum cache
yum makecache fastInstall Docker CE
yum -y install docker-ce docker-ce-cli containerd.ioStart Docker
systemctl start docker
ps -ef|grep dockerSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
