1 yuan experience Jingdong cloud server

1 yuan experience Jingdong cloud server

  • In the Great God HONGYANG and Guo Lin of micro-channel public number push articles we found this good news, the first time registered account, apply for under the order, after all, a limited number. Although the two big God said very detailed, but unfortunately did not take miss CentOS, White Ubuntu, WindowsServer these server systems, or in some places is not very clear, the saying goes, the inquisitor asked in the end, not only to know these even know why ; after a period of pondering. Still figured it out.

Same of different and Ubuntu CentOS

  • CentOS (Community ENTerprise Operating System) is one of the Linux distributions, it comes from the source code for Red Hat Enterprise Linux release in accordance with the provisions of the open-source compiled with. Because from the same source code, so some require a high degree of stability CentOS server to replace the commercial version of Red Hat Enterprise Linux use.
  • And Ubuntu is a desktop-application-based Linux operating system, its name comes from the Southern African Zulu or Hausa of "ubuntu" word (translated as I helped care or Ubuntu), Ubuntu and Debian-based distributions GNOME desktop environment, with different Debian is that it will be released every six months a new version. Ubuntu aims to provide a new operating system, while relatively stable mainly constructed by the free software made for the average user. Ubuntu has a huge community of power users can easily get help from the community.
  • The same point: both for the current version of the same individuals and small teams common service-level Linux operating system, software libraries available online that can be easily installed into a lot of open-source software and libraries. Both use as the basis for bash shell, so in a lot of basic commands, and centos ubuntu difference is not very obvious, but ubuntu to do even better on the desktop interface of choice and if a lot of people are starting to learn linux from interest usually ubuntu, after all, many people are accustomed to operating in the desktop graphics.
  • Differences: There are still many differences on Centos and Ubuntu habits and commands, the following simple list here:
    • 1.centos newly created non-root user is not sudo permissions, if you need to use sudo permissions must be added to the account and permissions in / etc / sudoers in, so the switch to the root account only when you need to enter: su, adding the root account password. In Ubuntu, generally using sudo + command, if it is the first time the user will be prompted to enter the current password (not the root password)
    • 2. Online software installation, centos yum command is used, and is used in ubuntu apt-get command. In addition there are a yum search touch software from the software source method: yum search + Software name
    • 3.centos from redhat, centos therefore support the installation of the rpm format, but ubuntu is clearly not supported.
    • 4. After all, different companies make different releases, the location of many of the configuration file and the default file paths are very different, this process requires the use of a gradually began to feel.

How to apply for official mirrored Cloud Hosting options

Login Change Password

  • Order payment is completed, find console - Cloud Hosting - Cloud Hosting can see that you have the current application, as shown below
  • After the application is successful, you will receive an SMS informing you of the password server, the proposed modification, so she was more easy to remember

Configure the server, install JDK, Tomcat deployment

  • noVNC Login: can of course, on the upper right corner of FIG remote connection, the terminal jumps to the command given by the official mode jingdong cloud, Send CtrlAltDel top right corner of the button
    below , then left output terminal box, will load complete, you are prompted to log in ,
    which is the official help documentation provided by logging on to Windows instance (provided that when the cloud host configuration you choose WindowsServer system image), VNC Log
  • 但试着按照鸿洋大神的方法,总是输入命令点击空格键时,终端又会重新加载,重新登录,而且使用谷歌和火狐浏览器,noVNC加载很慢,而且谷歌浏览器还可能无法加载,卡在那里,况且官方也指出noVNC,不支持复制粘贴,不支持上传下载文件,独享终端很是蛋疼,这里推荐郭霖的推荐的2款工具Xshell和Xftp,当然官方也有文档介绍,如果配置云主机时,选择CentOS和Ubuntu,就参考创建Linux实例登录Linux实例
  • Xshell用于登录服务器,终端界面安装软件,或者进行软件相关的操作;Xftp用于实现服务器和本地文件的上传和下载,而且通过Xftp还可以清楚地看到服务器终端的文件,

CentOS系统镜像安装Tomcat

  • 参考官方网站的CentOS环境下通过YUM源安装软件;来通过yum命令安装软件
  • yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。
  • yum是LINUX类系统上的自动更新组件安装系统。就象windows上的自动更新。都是可以自能分析当前系统的安装环境并根据具体命令网络升级安装所需组件。
  • 下载一个服务器,相信大家接触的比较多的应该都是Java,所以这里选择使用Tomact,不过大家应该都清楚,Tomat是依赖jdk的,所以需要先安装一个jdk。幸福的是,云主机安装这些非常简单,首先安装jdk:
  • 打开Xshell,登录上云主机,通过yum list java*命令查找一系列的JDK安装包
  • yum install java-1.7.0-openjdk* -y选择具体的安装包,进行安装,如下图
  • 安装Tomcat,tomcat我们下载一个压缩包就好。在tomcat官网,找到我们需要下载版本的地址:如下图
  • copy下来,记得选择tar.gz。
  • 通过 wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.81/bin/apache-tomcat-7.0.81.tar.gz
  • 下载完,进行解压通过tar -zxf apache-tomcat-7.0.81.tar.gz,通过cd apache-tomcat-7.0.81/bin/进入到解压后的bin文件夹,执行./startup.sh,就可以打开Tomcat服务器
    yum是什么?(linux命令)
    wget命令详解

创建html文件,完善静态网页

  • 可以通过xftp软件将本地已经写好的html文件(也可以上传其他文件)上传到云主机,一定要确保在ROOT目录下(如果是安装的Tomcat服务器的话),才可以打开HTML文件;如下图,左边是本地电脑中的文件,右边是上传到云主机后的文件,而且通过该软件可以清晰地看到云主机盘所装的东西

新手帮助

  • 在官网主页帮助中心—新手入门,下面有6个具体的使用指南,可以创建论坛,博客,电商平台
  • 问题残留:在搭建web网站的Linux系统安装部署Apache ,按照步骤,报如下错误
  • PS:我之前安装了Tomcat服务器,这里又安装了httpd服务器

Apache和Tomcat

  • Apache 和 Tomcat 都是web网络服务器,两者既有联系又有区别,在进行HTML、PHP、JSP、Perl等开发过程中,需要准确掌握其各自特点,选择最佳的服务器配置。
  • Apache是web服务器(静态解析,如HTML),tomcat是java应用服务器(动态解析,如JSP)
  • Tomcat只是一个servlet(jsp也翻译成servlet)容器,可以认为是apache的扩展,但是可以独立于apache运行
  • 真实名称apache:apache httpd
    tomcat:apache tomcat
  • 两者从以下几点可以比较的:
    1. 两者都是apache组织开发的
    2. 两者都有HTTP服务的功能
    3. 两者都是开源免费的
  • 联系
    1. Apache是普通服务器,本身只支持html即普通网页,可以通过插件支持php,还可以与Tomcat连通(Apache单向连接Tomcat,就是说通过Apache可以访问Tomcat资源,反之不然)。
    2. Apache只支持静态网页,但像Jsp动态网页就需要Tomcat来处理。
    3. Apache和Tomcat整合使用:
      • 如果客户端请求的是静态页面,则只需要Apache服务器响应请求;
      • 如果客户端请求动态页面,则是Tomcat服务器响应请求,将解析的JSP等网页代码解析后回传给Apache服务器,再经Apache返回给浏览器端。
      • 这是因为jsp是服务器端解释代码的,Tomcat只做动态代码解析,Apache回传解析好的静态代码,Apache+Tomcat这样整合就可以减少Tomcat的服务开销。
      • 4 Apache和Tomcat是独立的,在同一台服务器上可以集成。
  • 区别:Apache是有C语言实现的,支持各种特性和模块从而来扩展核心功能;Tomcat是Java编写的,更好的支持Servlet和JSP。
    1. Apache是Web服务器,Web服务器传送(serves)页面使浏览器可以浏览,Web服务器专门处理HTTP请求(request),但是应用程序服务器是通过很多协议来为应用程序提供 (serves)商业逻辑(business logic)。  Tomcat是运行在Apache上的应用服务器,应用程序服务器提供的是客户端应用程序可以调用(call)的方法 (methods)。它只是一个servlet(jsp也翻译成servlet)容器,可以认为是Apache的扩展,但是可以独立于apache运行。
    2. Apache是普通服务器,本身只支持html静态普通网页。不过可以通过插件支持PHP,还可以与Tomcat连通(单向Apache连接Tomcat,就是说通过Apache可以访问Tomcat资源,反之不然),Tomcat是jsp/servlet容器,同时也支持HTML、JSP、ASP、PHP、CGI等,其中CGI需要一些手动调试,不过很容易的。
    3. Apache侧重于http server,Tomcat侧重于servlet引擎,如果以standalone方式运行,功能上Tomcat与apache等效支持JSP,但对静态网页不太理想。
    4. Apache可以运行一年不重启,稳定性非常好,而Tomcat则不见得。
    5. 首选web服务器是Apache,但Apache解析不了的jsp、servlet才用tomcat。
    6. Apache是很最开始的页面解析服务,tomcat是后研发出来的,从本质上来说tomcat的功能完全可以替代Apache,但Apache毕竟是tomcat的前辈级人物,并且市场上也有不少人还在用Apache,所以Apache还会继续存在,不会被取代,apache不能解析java的东西,但解析html速度快。
  • 两者例子:Apache是一辆车,上面可以装一些东西如html等,但是不能装水,要装水必须要有容器(桶),而这个桶也可以不放在卡车上,那这个桶就是TOMCAT。
  • 两者整合:Apache是一个web服务器环境程序,启用他可以作为web服务器使用不过只支持静态网页,不支持动态网页,如asp、jsp、php、cgi
    • 如果要在Apache环境下运行jsp就需要一个解释器来执行jsp网页,而这个jsp解释器就是Tomcat
    • 那为什么还要JDK呢?因为jsp需要连接数据库的话就要jdk来提供连接数据库的驱程,所以要运行jsp的web服务器平台就需要APACHE+TOMCAT+JDK
    • 整合的好处:
      • 如果客户端请求的是静态页面,则只需要Apache服务器响应请求
      • 如果客户端请求动态页面,则是Tomcat服务器响应请求;因为jsp是服务器端解释代码的,这样整合就可以减少Tomcat的服务开销

相关参考资料

发布了18 篇原创文章 · 获赞 15 · 访问量 8万+

Guess you like

Origin blog.csdn.net/Alex_wsc/article/details/77760074