1, Use pagoda panel management
When we purchase servers from Alibaba cloud or Tencent cloud, we use the pagoda panel to manage the server. First, we need to install Xshell or SecureCRT. Here, take Xshell 6 as an example,
1.get into Xshell Then click "new"
2.In the pop-up box, enter the public address displayed in the instance of Alibaba cloud terminal ip Address, here my address is 120.79.42.168
3.Click OK
Install pagoda linux panel
4.Then enter https://www.bt.cn/bbs/thread-19376-1-1.html, this is the link to pagoda Linux panel installation tutorial,
Execute the following code to install the pagoda linux panel. Note: the pagoda linux version 6.0 is developed based on CentOS 7. Be sure to ensure that the server you buy is CentOS 7. X system
If your server system is below centos7, you can use the installation script below pagoda 6.0 (Centos has officially announced that the maintenance and update of Centos6 will be stopped in 2020, and it is recommended that you install centos7 directly)
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
5.Return to Xshell6 By the server you purchased in centos Version to install pagoda linux Panel, because the alicloud server I purchased is centos7.7 So I chose to execute the following code installation
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
6.After installation, the following interface appears:
7.After entering the account and password in the browser, you can enter the pagoda panel. Here, you should pay attention to the setting of the panel port number. If you need to release the port number on the server with security group, otherwise you can't enter the pagoda login panel. The default port number of the pagoda panel is 8888
Port release
8.Since the server I purchased needs to release the port, we go to the Alibaba cloud console to release port 8888, find the security group at the Alibaba cloud terminal, and click the configuration rule to release the port
9. We click "add manually" to release the port number
10. After entering the account and password into the pagoda panel, we can customize the configuration of the pagoda panel
11.As shown above, the login address of the pagoda panel will change to http://120.79.42.168:55555/tomorrow
2, Deploy Java Web project in pagoda panel
1.Enter the software store of pagoda panel and install it Nginx ,mysql,ftp,Tomcat(The version depends on your needs). After the software installation is completed, we should configure it java environment,Actually, we put Tomcat After installation java The environment is already installed. In the pagoda panel Tomcat7,Default installation jdk Link 1.7,If installed Tomcat8 Or 9 is installed by default jdk Link 1.8
2.We import the database file of the project in the pagoda panel mysql Database root The password is installed in the pagoda mysql Then it is generated randomly. We reset the database password
We import the database sql file of javaweb project. After importing, it is as follows:
3.We also need to release in Alibaba cloud's security group MySQL Database port 3306
4.Add release ports as follows:
5.At this point, we can Navicat Manage the added database in, but first set the database permissions in the pagoda to make other ip Address accessible
Then we were Navicat Create a new database connection in (select new instead of Alibaba cloud) MySQL (options for)
6.We have to change javaweb The database connection of the project is changed to the address of Alibaba cloud server, as follows:
Export project as war package
7.We export javaweb Project is war Bag, in ideal The specific steps in are as follows
click apply After that, we click on the following
In the pop-up window, select the following:
Then find the exported war Package, in the of the compiled bytecode file artifacts Directory:
Then we went back to the pagoda panel and found the file www Under directory server Lower tomcat Lower webapps,Then upload
After uploading successfully, it will be decompressed automatically. After refreshing the page, it is as follows:
Then we can access it in two ways:
One is the direct ip address plus Tomcat port number + project name
http://120.79.42.168:8080/studentHealth_war
Second, navigate the "website" under the pagoda panel and click add site
The configuration in the pop-up page is as follows. If there is no domain name, you can write it freely and add the port number. Remember that the port number here should be released by the security group in Alibaba cloud console, otherwise the port cannot be accessed. The root directory is set as your corresponding project path, as follows:
After that, we can access it directly by ip address + port number.
3, Configure general static websites
Directly upload it to the www directory, and then press "add site" to access it (index.html is accessed by default, otherwise it will be created automatically by the server). The php version can be pure static
Access method: ip address + port number
4, If you like, please pay attention to me
So far, our study of Alibaba cloud server using pagoda panel management has come to an end. If you like me, you can pay attention to my WeChat official account. I love to learn, hee hee, and share all kinds of resources regularly.