• UID2115
  • Fans0
  • Follows0
  • Posts2

Alibaba Cloud Tech Share --APP applications install Ali cloud server

More Posted time:Feb 25, 2017 21:09 PM
1, APP applications install  Ali cloud  server?
In order to help you understand how to use
Ali cloud server and related applications, mobile cloud aliyun team developed a
simple APP application: Mobile cloud albums, including the use of the ECS is
mainly used for the deployment of cloud album API (picture information service
call, call processing and picture list) picture thumbnail, because the
application server use JAVA language development, so in the above installation
Tomcat to deploy the application.
Specific deployment
1) remote login:
After the first purchase of ECS, the ECS
server will be root account, password to send the buyer's mailbox, and then
buyers can log on to the remote server ECS
2) install Web Environment
According to their application features to
select the installation of the relevant web server Tomcat or jetty, Ali cloud
provides a one-stop installation and deployment script
3) packaging applications
Web source code to download to the local,
the use of command mvnpackage into war packets. If it is not Maven project, you
can use a similar ant into a war package.
4) upload war package

Linux the following can be used to upload
war SFTP package, upload war package to the specified directory after
5) start Web Services
Start Tomcat or jetty service
6) reverse proxy, bind domain name

2, APP application how to save the image to the cloud storage server
The core of image APP application  architecture is the storage and access of a large number of small files. In the
case of a large number of files stored in the hard disk will greatly affect the
access efficiency of the application. Ali cloud storage services OSS mass file storage and
management has a great advantage, the picture is not downloaded from the server
to reduce the server pressure. Ali cloud OSS  backup mechanism also ensures the security
of the file storage, the storage   capacity can be unlimited expansion, the number of requests per second more
than 50000 times, multi line BGP network to ensure smooth access throughout the  country.

Ali cloud OSS steps:
1) log Ali cloud official website
(aliyun.com) opened OSS
2) access to KEY and key
3) Download SDK
4) start APP development
Very simple, the following is a use of Ali
cloud OSS
upload pictures of the code example:
StringupLoadURI =
OSSClient.generateUploadUrl (Constants.SERVER_URL.GENERATE_URL, fileName,null);
Int status =OSSClient.uploadFile   (upLoadURI, path);
3, APP cloud how to use the cloud database
In order to help you understand how to use
Ali cloud server and related applications, mobile cloud aliyun team developed a simple APP application: Mobile cloud albums, including the use of the MYSQL
services provided by RDS, the database stored in the main users to upload
pictures and information, including information storage, the original address
thumbnails, provide the data transfer to the client through the WEB API.
The use of Ali cloud RDS and the use of the   local database is basically no difference,
 the use of examples as follows:
1) create database instance
After the use of Ali cloud account to buy
RDS, you can create a database instance.
2) create database and manage account
Create the database name and manage the
account for the application to call the database connection.
3) access to the database:
Create database (test), added in the
database test account: test, password: test, you can view the relevant
information to the database in the RDS console, it can get the network address
of the database such as xxxx.mysql.rds.aliyuncs.com, can use the application to
connect to the database, javajdbc database connection code examples are as
String url =
String username = "test";
String password = "test";
Connection con =
DriverManager.getConnection (URL, username, password);
}catch (SQLException E) {
(e.printStackTrace); / / the need for
abnormal treatment

The End.

Latest likes:


  • UID3016
  • Fans1
  • Follows0
  • Posts2
1st Reply#
Posted time:Jul 8, 2017 13:44 PM
Hi Folks,

This is PC, now I'm evaluating the Alicloud, could you share me the sample application you have mention? My email is patrick.pc@gmail.com, thanks.