How to Deploy Your Own Website: From Domain Registration to Server Setup
This guide walks beginners through the complete process of publishing a website online, covering domain registration and ICP filing, DNS configuration, selecting and configuring a cloud server, installing Java and Tomcat, and finally uploading the site source files via FTP.
Domain Registration (ICP Filing)
The website ICP filing is required for domestic servers; the law distinguishes between commercial and non‑commercial internet services, mandating filing for the latter. If the server is located abroad, filing is not needed.
Domain Parsing (DNS)
Domain parsing maps a domain name to the server's IP address using DNS servers, allowing users to access the site via a memorable name instead of an IP.
Server Selection and Setup
Choose a cloud server (e.g., Alibaba Cloud, Tencent Cloud, Baidu Cloud). For personal use, ECS or lightweight application servers are common. After purchasing, access the console, enable remote connection, and switch to the administrator account: sudo su root Navigate to /usr, create a java directory, and upload JDK and Tomcat packages via an FTP client (XFTP or FileZilla). cd /usr<br/>mkdir java<br/>ls Extract the packages:
tar -xzvf jdk-xxxxx.tar.gz<br/>tar -xzvf apache-tomcat-xxxxxx.tar.gzSet environment variables by editing /etc/profile:
JAVA_HOME=/usr/java/your_jdk_folder<br/>PATH=/usr/java/your_jdk_folder/bin:$PATH<br/>CLASSPATH=.:/usr/java/your_jdk_folder/lib/dt.jar:/usr/java/your_jdk_folder/lib/tools.jar<br/>CATALINA_HOME=/usr/java/your_tomcat_folder<br/>export JAVA_HOME PATH CLASSPATH CATALINA_HOMEApply the profile and verify Java installation: source /etc/profile<br/>javac Start Tomcat:
cd /usr/java/your_tomcat_folder/bin<br/>./startup.shNote: Alibaba Cloud requires a minimum three‑month server purchase to apply for ICP filing.
Domain Purchase and Configuration
Buy a domain on the cloud provider's console, complete real‑name verification, and then file for ICP if the server is in mainland China. Configure DNS records in the console to point the domain to the server's IP.
Upload Website Source Code
Use an FTP tool (XFTP, FileZilla) to transfer the website source files into the /usr/java directory. After uploading, access the site via http://yourdomain.com/webapps/your_index.html. Ensure Tomcat listens on port 80 by editing server.xml (change 8080 to 80) and restart Tomcat.
Source: blog.csdn.net/Jekin_KE/article/details/87312623
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
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.
