solaris安装java_Solaris是出色的Java开发平台的原因

solaris安装java

几天前,我发布了“ OpenSolaris的死亡:为Java开发人员选择操作系统 ”,其中我说Solaris是Java开发人员的绝佳平台。 这篇文章的重点只是想知道自OpenSolaris淘汰以来我将使用哪个Solaris版本。 正如Neil的评论使我意识到的那样,该帖子未能澄清的原因是您应该选择Solaris作为开发平台的原因。
我决定在这篇文章中写这篇后续文章,以快速总结我最喜欢的文章,并介绍一些在此类技术派上用场的用例。

软件可用性
尽管在过去的几年中,Solaris仍然是一个小众的操作系统(无论如何还是有很多其他平台),但Sun和社区在将其推广为开发人员的桌面替代品方面做得非常出色。 甚至为开发人员提供了一个特定的发行Solaris Express Developer Edition 。 它已经停产了,无论如何如今确实没有必要了。 较新的Solaris发行版(例如SXCE,OpenSolaris,OpenIndiana)包括(捆绑或在官方软件包存储库中):

  • 数据库(MySQL,PostgreSQL)。
  • Web服务器(Apache,Java Enterprise System Web服务器等)。
  • 应用程序服务器(Glassfish)。
  • SAMP堆栈(Solaris + Apache + MySQL + PHP)。
  • IDE(NetBeans,Eclipse)。
  • 支持其他流行语言(Ruby,Groovy等)。
  • 身份管理(LDAP,Java Enterprise System身份服务器)。

Solaris还是企业选择的平台,因此支持常见的企业软件包,作为Java开发人员或Java架构师,您将不会错过构建开发环境所需的部分。 作为Java开发人员,我经常需要的非常基本的软件包是:

  • Oracle RDBMS。
  • Oracle WebLogic应用服务器。
  • IBM WebSphere Application Server。
  • JBoss应用服务器。

Solaris的技术

Solaris拥有一些独特的技术,而其他UNIX(和类似UNIX的)系统可能缺少作为开发平台使用的技术(或从Solaris移植过来)。这里重要的不是“自身的技术”或仅在以下方面有用的技术:大型企业环境,但事实是:

  • 它们已经很好地集成在Solaris中,并且可以相互利用。
  • 在常见的使用案例中,这些技术确实对开发人员有帮助。

他们每个人都应该自己发表几篇文章,但是,我将尝试举一些简洁的例子。

Solaris服务管理工具

尽管此技术可能对系统管理员最有用,但作为开发人员,我经常利用它。 SMF是为服务和服务管理提供统一模型的框架。 基本配方仅需要服务的XML描述符。 SMF可让您:

  • 定义服务:启动脚本的位置,参数和语义。
  • 建立服务之间的依赖关系:
    • 服务和服务实例可能依赖于其他服务实例。
    • 服务启动是在并行考虑服务依赖关系的情况下执行的。
  • 增强的安全性和基于角色的细粒度访问控制:
    • 只能为服务分配运行所需的最低特权集。
    • 可以使用Solaris RBAC(基于角色的访问控制)将服务管理委派给非root用户。
  • 服务健康控制:
    • 服务自动重启。
    • 与Solaris Fault Manager的合作增强了服务的运行状况,该功能可在发生硬件故障时防止服务降级。
  • 自动inetd服务包装器:SMF自动包装inetd服务。
典型用例

我使用的每个软件包都有自己的SMF描述符(随软件包一起提供或由我定义),它大大减少了我设置开发机器所需的时间。 例如,对于WebSphere Application Server,我具有以下单独的服务实例:

  • WebSphere IHS。
  • WebSphere Application Server。
  • WebSphere Application Server DMGR。
  • WebSphere Application Server集群节点。

在它们之间定义了依赖关系,我可以只用一行代码来启动所需的WebSphere服务:

svcadm enable [websphere-service-name]

SMF将负责一切。

SMF的使用模式可以进一步增强。 假设您正在一个或多个项目中工作,并且每个项目都需要一组独特的运行服务。 通常发生以下情况之一:

  • 您将它们全部安装并运行。
  • 您将它们全部安装,并在切换工作项目时手动启动和停止它们。

对于开发人员而言,资源总是很少,而对于节省资源却有些偏执。 使用SMF,您可以:

  • 为每个项目定义一个SMF服务。
  • 对于每个项目,请定义与所需服务的依赖关系。

这样,您至少可以使用一个命令启动和关闭特定项目所需的每个服务。 不再:

  • 每个服务的自定义外壳脚本。
  • inetd服务(例如Subversion,Apache等)的定制配置条目
  • 特定的操作系统定制。
  • 当您不需要服务并浪费资源时可以运行它们,否则可以使用。

以下帖子中提供了SMF服务清单定制的示例:

ZFS

就灵活性和易用性而言,ZFS文件系统是唯一的。 使用极其精简的命令集,您可以:

  • 动态创建文件系统。
  • 动态快照文件系统。
  • 动态复制文件系统,几乎没有使用空间。

关于ZFS的文献很多,我将限制描述我最喜欢的用例。

用例:复用您的开发环境。

软件安装只是用户体验的开始。 通常,我们花时间:

  • 配置我们的环境。
  • 对它们进行微调。
  • 定义我们需要的其他库集。
  • 定义应用程序使用的服务器资源集(JDBC,JMS等)。

等等。 列表是无止境的。

有时有必要为同一项目的不同项目或不同开发阶段准备不同的环境。 为了避免浪费时间和资源来构建不同的环境,我通常将按以下步骤进行操作:

  • 安装和配置我的环境。
  • 为它制作一个ZFS快照。
  • 为我需要的所有其他设置对其进行ZFS克隆。

Oracle JDeveloper是我经常克隆的应用程序的一个很好的例子。 尽管采用了在用户主目录中使用按用户配置目录的通用方法,但JDeveloper基本上是一个单一用户环境。 我只需要安装一次,快照它的安装目录,然后创建一个ZFS克隆(每个环境一个),而不必摆弄脚本来设置每个用户的配置参数。 我自己在用户主目录中使用了几个JDeveloper环境的克隆。

ZFS克隆的功能可由Zones基础结构使用,这将在下一节中看到,从而进一步增强了它的功能。 在处理大型安装(例如您喜欢的虚拟化技术的磁盘映像)时,克隆ZFS文件系统也很有利。

我写的有关ZFS的其他文章可以阐明其一些用例:

容器和其他虚拟化技术

我认为Solaris是出色的桌面虚拟化平台。 再次,用几个命令。 您可以轻松创建半虚拟化的Solaris实例(区域)。 区域基础结构支持ZFS,并且可以利用它。

可以使用其XML配置文件的命令行界面来配置区域。 创建区域非常简单,并且由于它们是轻量级技术,因此您可以根据需要创建任意数量的区域。 如果您使用的是ZFS,则克隆区域的过程非常简单且快速。

用例:群集应用程序服务器

在开发Java EE应用程序期间,通常将需要以下一项(或多项)的实例:

  • 应用服务器。
  • Web服务器。
  • 数据库;
  • 用户注册表。

还希望它们在隔离的环境中运行,以便您可以模拟预期的生产配置。 使用区域很容易:只需创建所需的多个区域,它们中的每一个将表现为一个单独的Solaris实例:例如,每个区域都有:

  • 自己的网卡和IP配置。
  • 它自己的用户,组,角色和安全策略。
  • 自己的服务。

您无需准备多次安装和配置环境,而是准备带有所需服务的“主”区域。 对于以下每一项,我都有一个“主”区域:

  • WebSphere Application Server。
  • WebLogic应用服务器。
  • Oracle数据库。
  • MySQL数据库。
  • LDAP目录。

等等。 使用一个简单的命令( zoneadm clone [-m复制] [-s zfs_snapshot] source_zone ),您将在几分钟之内得到一个全新的工作环境。

用例:VirtualBox和ZFS

有时,您宁愿使用其他操作系统的虚拟实例,例如GNU / Linux,FreeBSD和Windows。 Solaris是出色的VirtualBox主机,ZFS的强大功能将使您:

  • 为您需要的每个操作系统或每个“操作系统角色”创建“主”映像。
  • 即时对其进行克隆,以创建全新的虚拟OS映像。

就我而言,我有:

  • 具有Visual Studio for .NET开发的Windows 7主客户端。
  • 主Windows Server 2008。
  • 带有SQL Server 2008的主Windows Server 2008(是先前版本的克隆)。
  • 熟练的Debian GNU / Linux。

每当我需要一个新实例时,我只需要克隆磁盘映像即可。 在短短的几秒钟内,我便有了所需的环境。 我不仅节省了宝贵的时间,而且还节省了大量的磁盘空间。 如果我不使用ZFS技术而存储的所有映像(和区域),则至少需要4倍的磁盘。

用例:虚拟网络堆栈

Solaris为您提供了非常强大的网络虚拟化功能。 例如,您可以根据需要创建任意数量的虚拟NIC,并在Solaris Zones中或作为其他虚拟化技术(例如VirtualBox)的网卡独立使用它们。网卡可以与虚拟交换机(etherstub)互连,并使您能够创建“盒子中的网络”。 您不仅可以使用虚拟化实例来模拟您的生产环境:还可以创建虚拟化网络来模拟环境可能需要的复杂网络策略。

如果您需要测试一个环境,如果没有其他物理计算机就无法复制其配置,则可以在其中使用虚拟化技术(例如Zones或VirtualBox)和虚拟化网络堆栈。 我正在从事的项目的开发人员环境由以下组成:

  • 具有两个负载平衡的IBM IHS实例的两个区域。
  • 具有LDAP目录的区域。
  • 两个区域具有IBM WebSphere Application Server的两个集群实例。
  • 具有IBM WebSphere DMGR实例的区域。

使用Solaris,我可以在生产环境中复制生产环境,并尊重我们使用的每个网络配置。 没有这些技术,要实现这个目标将变得更加困难,否则我将获得自定义配置(例如,避免端口冲突)。 在所有情况下,如果区域不是那么容易使用,我将在管理和配置此类环境上浪费更多时间。

DTrace

DTrace功能非常容易向开发人员解释。 同时,如果不亲自尝试就很难掌握其有用性。 Solaris上的DTrace提供了数以万计的探针,其他探针可以即时创建。 此“探针”为您提供了一种非常有效的方法来解决应用程序和基础操作系统中的问题。 要使用探针,您必须使用D语言编写的脚本。 幸运的是,这种语言在设计上非常简单,您可以用几行代码编写功能强大的D脚本。

DTrace毫不费力,即使在生产环境中,您也可以立即解决问题,而无需修改应用程序。 一些IDE(例如NetBeans)具有强大的插件,可让您编写D脚本并以精美的图形查看探针收集的数据。

作为开发人员,我不止一次地重视DTrace的实用性。 不必排除必须深入研究源代码并引入其他代码的问题(即使在方便的情况下),我也可以使用D脚本从外部观察应用程序并快速收集数据,以帮助我确定问题可能出在哪里。

此外,在某些情况下,您会发现自己正在处理没有可用代码的情况。 我可以快速解决带有D脚本的WebSphere Application Server所遇到的问题,而不是依赖于WebSphere跟踪工具和解释日志文件的任务。

结论

介绍性文章就这么多。 对于任何开发平台,都必须“尽可能”地构建与目标环境尽可能接近的开发环境。 此外,我认为在尽可能接近生产环境的环境中工作不仅在应用程序开发阶段为您提供了额外的价值和见解,而且还应视为我们参与的每个项目的强制性要求。 Solaris提供了开发人员实现此目标所需的所有工具。

Solaris是一个复杂的企业操作系统,具有许多您可能永远不会使用的功能。 然而,正如我在本文中试图指出的那样,其中许多其他情况都有一个用例。 由于其中一些技术是使用开放源代码许可证开发的,因此它们也可以在其他操作系统上使用:ZFS在FreeBSD上可用,并且需要社区的努力将其移植到OSX。 DTrace在OS X,Linux和FreeBSD上可用。

“ Solaris优势”是所有这些技术都是高度集成的,并且可以相互利用。 结果比它们的总和还有价值。 这些技术具有非常完善且易于使用的管理界面:当时间很重要时,“您的工作方式”至关重要。

我希望这些见解可以帮助您了解Solaris操作系统是否以及何时对您有用。 即使您认为并非如此,我还是建议您尝试一下:在工具箱中添加新技术总是很好的。

参考: The Gray Blog上的 JCG合作伙伴提供了Solaris为什么是 出色的 Java开发平台的一些原因

相关文章 :

翻译自: https://www.javacodegeeks.com/2011/05/solaris-java-development-platform.html

solaris安装java

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2013年最新版的强悍Unix版本Solaris 11.1系统文件,功能十分强大,不愧是真正血统的Unix系统! Oracle Announces Availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1 Delivers Oracle Database and Java Enhancements, Expanded Mission Critical Cloud Management Capabilities and Advanced Platform Features Redwood Shores, Calif – October 26, 2012 News Facts Oracle today announced general availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1. Oracle Solaris 11 is the first cloud OS that allows customers to build large-scale enterprise-class Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) clouds on a wide range of SPARC and x86 servers and Oracle engineered systems. Oracle Solaris Cluster 4.1 extends high availability and disaster recovery capabilities of Oracle Solaris and includes unique virtual cluster features supporting highly efficient application consolidation with best-in-class availability. Oracle Solaris 11 is already widely in production with thousands of customers with mission critical deployments across industries such as financial services, communications, healthcare, retail, public sector and media and entertainment. Read customer success stories about Oracle Solaris here. Oracle Solaris 11 is also gaining strong momentum among enterprise application vendors with hundreds of applications already qualified for Oracle Solaris Ready status through the Oracle PartnerNetwork (OPN). OPN members can develop, sell and implement their solutions on Oracle Solaris 11 and take advantage of specialized Oracle Solaris resources to expand their market reach. Customers and partners can quickly and safely upgrade to Oracle Solaris 11.1 using the built-in update tools and software repositories available with Oracle Solaris 11. Oracle will host a webcast on November 7, 2012 at 8 a.m. Pacific time on Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1, featuring Markus Flierl, vice president, Oracle Solaris Engineering, Core Technology and Bill Nesheim, vice president, Oracle Solaris Engineering, Platform Software. Register here. This event will also include an interactive chat with core developers of Oracle Solaris and Oracle Solaris Cluster. New and Enhanced Features in Oracle Solaris 11.1 Oracle Solaris 11.1 increases the performance, availability and I/O throughput of the latest Oracle Database technology. A new, optimized shared memory interface between the Oracle Database and Oracle Solaris 11.1 provides 8x faster database startup and shutdown, as well as online resizing of the Oracle Database System Global Area (SGA). Oracle Solaris 11.1 introduces unique new capabilities for optimizing Oracle Database performance. Oracle Solaris 11.1 exposes Oracle Solaris DTrace I/O interfaces that allow an Oracle Database administrator to identify I/O outliers and subsequently isolate network or storage bottlenecks. A new Oracle Solaris DTrace plug-in for Oracle Java Mission Control to enable customers to profile Java applications on Oracle Solaris production systems. New cloud management features add to Oracle Solaris 11’s zero overhead built-in virtualization capabilities across system, network and storage resources, including expanded support for Software Defined Networks (SDN) with Edge Virtual Bridging enhancements, to maximize network resource utilization and manage bandwidth in cloud environments. New built-in memory predictor monitors application memory use and provides optimized memory page sizes and resource location to speed overall application performance. Support for an unprecedented 32 TB of RAM and thousands of CPUs unlocks the full potential of Oracle’s latest server systems. Oracle Solaris Cluster 4.1 Highlights New Oracle Solaris 10 Zone Clusters allow customers to consolidate mission critical Oracle Solaris 10 applications on Oracle Solaris 11 cloud environments. Expanded disaster recovery operations using Oracle’s Sun ZFS Storage Appliance services along with Oracle Solaris Cluster 4.1 to coordinate failover of applications and data to a remote disaster recovery site. Faster application recovery with improved storage failure detection and resource dependencies management. New labeled security capability in Oracle Solaris Zone Clusters provides military grade application separation in highly consolidated mission-critical deployments using Oracle Solaris 11 Trusted Extensions. Integrated Oracle Deployments and Support Oracle Enterprise Manager Ops Center provides comprehensive cloud management capabilities for Oracle Solaris 11, including self-service provisioning of Oracle Solaris 11 Zones. Ops Center’s integrated systems management delivers enterprise scale cloud performance. Oracle Enterprise Manager Ops Center is available to Oracle Solaris customers at no additional cost under the Ops Center Everywhere Program. Oracle Solaris Studio delivers the latest in compiler optimizations, multithread performance and powerful analysis tools for native development, and optimized application performance and reliability on Oracle Solaris 11.1 systems. Oracle Solaris 11 guarantees binary compatibility with previous Oracle Solaris versions through the Oracle Solaris Binary Application Guarantee Program, which provides customers a seamless upgrade path and the industry’s best investment protection. Oracle Solaris Legacy Containers allows older Oracle Solaris environments to be brought forward onto latest generation hardware to provide power, cooling and footprint consolidation savings. OPN members can find Oracle Solaris tools and resources in the Oracle Solaris Knowledge Zone, including Oracle Solaris Ready, Oracle Solaris 11 Specialization and Oracle Solaris Development Initiative. The Oracle Solaris Remote Lab now provides a secure cloud environment for OPN members to test and validate their applications with Oracle Solaris 11 in SPARC and x86 virtual environments. Supporting Quotes “Oracle recommends Oracle Solaris 11 for all UNIX®-based Oracle implementations. Oracle Solaris 11.1 delivers over 300 new performance and feature enhancements and is engineered together with Oracle Database, middleware, applications to increase performance, streamline management and automate support for Oracle deployments,” said John Fowler, executive vice president, Systems, Oracle. “The combination of the secure, highly available capabilities of Oracle Solaris Cluster 4.1 and the built-in virtualization of Oracle Solaris 11.1 helps customers bring their most mission-critical applications into a cost effective, agile cloud environment and delivers extreme availability for enterprise applications.” “Clients are looking for ways to reduce the complexity of systems management while enabling Platform as a Service (PaaS) & Software as a Service (SaaS) clouds,” says Lee Diamante, solutions architect, Systems Computing Solutions at Forsythe. “The value of Oracle Solaris 11 is that it maintains all the enterprise-class features expected with a mission-critical OS, while bringing in new, innovative technologies. Forsythe has a long and rich history of delivering customer solutions on Oracle Solaris systems. This is why we are excited about the Solaris 11.1 release.” “Oracle is making it much easier for partners like Informatica to gain access to their software with the new testing environments; shrinking the time to measurable results and value,” said Julie Lockner, vice president, ILM, Informatica. “With the release of Oracle Solaris 11.1 Informatica customers now have access to mission critical deployments across major industries, with an environment of high performance and high availability. With all the new feature enhancements, we look forward to making the Informatica Platform certified on the Oracle Solaris 11 product family.”

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值