当前位置: 首页 > 编程日记 > 正文

Oracle VDI 安装

为什么80%的码农都做不了架构师?>>>   hot3.png

你可以在这里找到本文的原文。

虽然说Oracle已经停止了VDI的开发,之后支持服务业很快停止了。但是,作为经典的桌面虚拟化产品,还是值得研究一番。虽然Oracle VDI的文档已经写的很详细了,但是在实际操作过程中,还是会遇到很多问题。最近,终于鼓起勇气,在VDI即将消失之前,把安装过程记录一下。

安装环境和前期条件

  • OS: Oralce Linux 6 update5 x86-64
  • Oracle VDI 3.5.2
  • SELinux 已经禁用
  • 防火墙(iptables)已经关闭

安装步骤

配置Yum源

首先需要保证能上外网,并能够访问public-yum.oracle.com

开始配置Yum环境,把public-yum-ol6.repo下载到/etc/yum.repos.d目录,并编辑内容如下:

[ol6_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1 ###开启[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1 ###开启[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1 ###开启[ol6_gdm_multiseat]
name=Oracle Linux 6 GDM Multiseat ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/gdm_multiseat/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1 ###开启

配置/etc/yum.conf,在文件末尾加入如下内容:

# 开启多版本库支持
protected_multilib=0

代理服务器配置

如果使用代理服务器上外网的话,还需要做如下设置。

设置wget的代理

/etc/wgetrc修改为如下内容:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://my-proxy.example.com:80/
http_proxy = http://my-proxy.example.com:80/
ftp_proxy = http://my-proxy.example.com:80/

设置Yum的代理

/etc/yum.conf末尾加入如下内容:

proxy=http://my-proxy.example.com:80/

预先安装可能导致出错的包

sssd-client可能在安装过程中出现错误,先手动安装一下。

[root@vdi ~]# yum install sssd-client

在64为系统中会安装libXfont.x86_64,但是VDI需要32位的版本 - libXfont.i686,这也可能出现问题,先手动安装一下。

[root@vdi]# yum install -y libXfont.i686

安装过程中会需要安装pam.i686,在64位环境下,已经安装了pam.x86-64。同时安装32位和64位的包可能会产生如下错误:

Transaction Check Error:file /etc/security/limits.conf from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/doc/pam-1.1.1/Linux-PAM_SAG.txt from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/doc/pam-1.1.1/html/sag-pam_cracklib.html from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/doc/pam-1.1.1/html/sag-pam_limits.html from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/doc/pam-1.1.1/html/sag-pam_userdb.html from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/doc/pam-1.1.1/txts/README.pam_cracklib from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/doc/pam-1.1.1/txts/README.pam_userdb from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man5/limits.conf.5.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man5/namespace.conf.5.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/faillock.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/pam_cracklib.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/pam_env.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/pam_faillock.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/pam_lastlog.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/pam_tty_audit.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64file /usr/share/man/man8/pam_userdb.8.gz from install of pam-1.1.1-20.el6.i686 conflicts with file from package pam-1.1.1-17.el6.x86_64

这个pam包中的一个既存的bug,通过下面的方法解决:

[root@vdi ~]# yum install -y yum-downloadonly
[root@vdi ~]# yum install pam.i686 -y --downloadonly --downloaddir=/tmp
[root@vdi ~]# cd /tmp
[root@vdi tmp]# rpm -ivh --force --nodeps pam-1.1.1-20.el6.i686.rpm
[root@vdi tmp]# yum reinstall pam.i686

题外话,使用yum安装软件,老是会遇到这种提示:

Existing lock /var/run/yum.pid: another copy is running as pid 3053.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit

只要把/etc/yum/pluginconf.d/refresh-packagekit.conf改为如下就OK了:

enabled=0

开始安装 vda

由于VDI安装脚本调用了curl来检查联网状态,所以如果是通过代理服务器上外网的,还需要在执行安装命令之前为curl设置如下环境变量以使用代理:

[root@vdi vda_3.5.2_linux]# export http_proxy=http://my-proxy.example.com:80/
[root@vdi vda_3.5.2_linux]# export https_proxy=$http_proxy
[root@vdi vda_3.5.2_linux]# export HTTP_PROXY=$http_proxy
[root@vdi vda_3.5.2_linux]# export HTTPS_PROXY=$http_proxy

现在可以开始安装了,安装过程中Yum会自动连外网下载依赖的包,过程会很漫长:

[root@vdi vda_3.5.2_linux]# unzip p21441793_350_Linux-x86-64.zip
[root@vdi vda_3.5.2_linux]# cd vda_3.5.2_linux
[root@vdi vda_3.5.2_linux]# ./vda-install Oracle Virtual Desktop Infrastructure 3.5.2 Installation
Checking for required libraries and packages...30 packages are missing and will be installed by the software manager yum:
iscsi-initiator-utils.x86_64, nss.x86_64, nss.i686, libgcc.x86_64, libgcc.i686, libstdc++.x86_64, libstdc++.i686, gtk2.x86_64, gtk2.i686, compat-openldap, compat-openldap.i686, dhcp, gdbm.i686, gdm-multiseat, ksh, libusb.i686, libXcursor.i686, libXfixes.i686, libXfont.i686, libXinerama.i686, libXp.i686, libXpm.i686, libXtst.i686, libXv.i686, openldap-clients, openmotif.i686, sssd-client.i686, tftp, tftp-server, tkDo you want to continue? ([y]/n) y+ Installing missing packages...Oracle VDI 3.5.2 Installation+ Installing Oracle VDI Installation Utilities...+ Installing Java DMK 5.1 Libraries...+ Installing Common Agent Container - Runtime...+ Installing Oracle VDI Core...+ Installing Oracle VDI Center Agent...+ Installing MySQL Database...+ Installing Oracle VDI Web server...+ Installing Oracle VDI Manager...+ Installing RDP Broker...+ Installing Java Runtime Environment...+ Installing Sun Ray Server Software...+ Installing Sun Ray Client Software...Oracle VDI 3.5.2 was successfully installed.
A log file is available at '/var/log/vda-install.2015_08_18_12:14:18.log'.You can continue to configure Oracle VDI 3.5.2 with '/opt/SUNWvda/sbin/vda-config'.Do you want to configure Oracle VDI 3.5.2 now? ([y]/n) yOracle Virtual Desktop Infrastructure 3.5.2 ConfigurationAn Oracle VDI Center consists of one or several Oracle VDI Hosts. You can create a new Oracle VDI Center by configuring this server as the Primary Oracle VDI Host.High availability requires a second Oracle VDI Host in the center. You can add as many Secondary Oracle VDI Hosts to an existing Oracle VDI Center as needed. During configuration, you will be asked to enter user name and password of a privileged account on the Primary Oracle VDI Host.
Please note that joining an Oracle VDI Center causes a short interruption of active sessions on the Primary Oracle VDI Host.1 New Oracle VDI Center2 Join Oracle VDI CenterSelect (1/2): 1Review the settings for a new Oracle VDI Center:Name: VDI CenterAdministrator Password: ********VDI Administrator (super-user): rootDNS name of this host: vdi.example.comMaximum number of sessions on this host: 100User ID range start: 150000Database: Embedded Oracle VDIDo you want to create the Oracle VDI Center now? Enter 'c' to customize the settings. ([y]/c): ySystem Configuration+ Creating new instance of Common Agent Container (vda)...+ Common Agent Container (vda) is reachable at vdi.example.com:11174+ Setting properties for Common Agent Container (vda)...+ Enabling Common Agent Container (vda) at system boot...Oracle VDI Center Agent Configuration+ Stopping Common Agent Container (vda)...+ Deploying center agent module in Common Agent Container (vda)...+ Restarting Common Agent Container (vda)...+ Creating Oracle VDI Center...+ Configuring time synchronization...Sun Ray Server Software Configuration+ Configuring Sun Ray Server Software...Sun Ray Client Configuration+ Setting Kiosk Mode Session Type to 'Oracle Virtual Desktop Infrastructure'...+ Setting Sun Ray Policy ...+ Enabling LAN Connections...+ Restarting Sun Ray Server Software...MySQL Database Server Configuration+ Generating Secure Socket Layer certificates...+ Creating MySQL group (vdadb)...+ Creating MySQL user (vdadb)...+ Setting up MySQL directory...+ Initializing database...+ Registering database service...+ Starting Oracle VDI database (MySQL)...+ Configuring MySQL Root Password...+ Creating database user with Administrator privileges...+ Creating database users for replication...+ Configuring MySQL Information...MySQL Database Client Configuration+ Setting user rights...+ Creating database tables...+ Configuring database connection...+ Importing Secure Socket Layer certificates...+ Updating Common Agent Container properties...Oracle VDI Service Configuration+ Deploying service module in Common Agent Container (vda)...+ Configuring primary administrator rootOracle VDI Manager Configuration+ Registering Oracle VDI Manager...+ Restarting Oracle VDI Manager...RDP Broker Configuration+ Registering RDP broker...+ Starting RDP broker...The configuration of Oracle VDI 3.5.2 has completed.WARNING: The current DBus file descriptor limit can only support up to approximately 120 logged-in desktops. It is recommended to reboot the system if you require support for more desktops.This server is configured as a Primary Oracle VDI Host of the new Oracle VDI Center 'VDI Center'.
A log file is available at '/var/log/vda-config.2015_08_18_12:28:08.log'.The command line tools are located at '/opt/SUNWvda/sbin'.
You can access the Oracle VDI Manager at http://vdi.example.com:1800
[root@vdi vda_3.5.2_linux]# 

安装 VirtualBox

接下来,需要安装 VirtualBox。需要连外网通过wget来下载VirtualBox的安装文件。

[root@vdi vda_3.5.2_linux]# unzip vbox_4.2.zip 
Archive:  vbox_4.2.zipcreating: vbox_4.2/inflating: vbox_4.2/SLA.txt        inflating: vbox_4.2/vda-solaris.conf  inflating: vbox_4.2/vb-install     inflating: vbox_4.2/httpd.conf     inflating: vbox_4.2/config.conf    inflating: vbox_4.2/vda-linux.conf  inflating: vbox_4.2/ReadMe.txt     inflating: vbox_4.2/Oracle_VM_VirtualBox_Extension_Pack-4.2.30-100415-ENTERPRISE.vbox-extpack  inflating: vbox_4.2/autoresponse   
[root@vdi vda_3.5.2_linux]# cd vbox_4.2
[root@vdi vbox_4.2]# ./vb-install
Oracle VM VirtualBox 4.2.30 Installation for LinuxVerifying dependencies
VirtualBox 4.2.30 for Linux hosts Download+ Downloading ''... Select an existing user for VirtualBox [root]: root
Enter the password for user 'root': Specify the VirtualBox SSL port [443]: Oracle VM VirtualBox 4.2 Installation+ Installing Oracle VM VirtualBox Core+ Installing Oracle VM VirtualBox Extension PackSSH Configuration+ Enabling root access+ Restarting SSH ServiceOracle VM VirtualBox Webservice Configuration+ Creating SSL certificates+ Configuring Webservice+ Enabling WebserviceOracle VM VirtualBox was successfully installed.
A log file is available at '/var/log/vb-install.2015_08_18_12:34:05.log'.You can access the Oracle VM VirtualBox host at vdi.example.com, port 443.
[root@vdi vbox_4.2]# 

至此,Oracle VDI的安装已经完成,接下来就可以登录到 Oracle VDI Manager开始配置了:

http://vdi.example.com:1800

由于接下来的配置工作都是基于图形界面完成的,这里就不再赘述,可以查看这篇文档来进行。

(END)

转载于:https://my.oschina.net/xintq/blog/519698

相关文章:

Python 写了一个网页版的「P图软件」,惊呆了!

作者 | 小欣来源 | Python爱好者集中营今天是开工第一天,这篇文章可以算作是虎年的第一篇干货技术类文章了,今天小编用Python做了一个网页版的“P图软件”,大致的流程在于我们可以将上传的照片进行黑白处理、铅笔素描处理、模糊化处理等一系列…

Template mode HTML5 has not been configured

#thymeleafspring.thymeleaf.prefixclasspath:/templates/spring.thymeleaf.suffix.htmlspring.thymeleaf.cachefalsespring.thymeleaf.content-typetext/htmlspring.thymeleaf.enabledtruespring.thymeleaf.encodingUTF-8spring.thymeleaf.modeHTML5 解决办法:注释…

Java数据结构与算法(第四章栈和队列)

2019独角兽企业重金招聘Python工程师标准>>> 本章涉及的三种数据存储类型:栈、队列和优先级队列。 不同类型的结构 程序员的工具 数组是已经介绍过的数据存储结构,和其他结构(链表、树等等)一样,都适用于数…

可构建AI的「AI」诞生:几分之一秒内,就能预测新网络的参数

‍‍来源 | 学术头条人工智能在很大程度上是一场数字游戏。当深度神经网络在 10 年前开始超越传统算法,是因为我们终于有了足够的数据和处理能力来充分利用它们。今天的神经网络更依赖于数据和算力。训练网络时,需要仔细调整表征网络的数百万甚至数十亿参…

It is not safe to rely on the system's timezone settings

在写php程序中有时会出现这样的警告: PHP Warning: date(): It is not safe to rely on the systems timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those metho…

.NET MVC+ EF+LINQ 多表联查VIEW显示列表

1.VIEW 页面显示代码 <link href"~/Content/bootstrap.css" rel"stylesheet" /><div class"well"><table class"table"><tr><th>用户名</th><th>地址</th><th>订单编号</th…

从奥运订票系统说起——谈FastCGI 与IT 架构

2008年&#xff0c;对于首都人民来说&#xff0c;没有什么比奥运会更大的事情了。如何买到一张称心如意的比赛门票&#xff0c;也成了很多人的一个梦想。然而&#xff0c;在奥运官网抢票购买的时候&#xff0c;这个梦想却轻易地被网上购票系统的当机击成碎片&#xff0c;很多充…

【哲学百科】文艺复兴及唯理主义时期(公元1500~公元1750)

我为达目的&#xff0c;不择手段-尼古拉.马基雅维利要令习惯于君主统治的民众保有自由是一件多么困难的事情。马基雅维利的观点之一是君主不应受到道德标准的束缚&#xff0c;而应竭尽所能保全自身的荣耀以及所统治的城邦的胜利与繁荣&#xff0c;这种做法随后被人们归为现实主…

如何用 OpenGL 绘制雪花?

作者 | 许向武 责编 | 张红月出品 | CSDN博客看冬奥才知道&#xff0c;阿勒泰不但是中国的“雪都”&#xff0c;还是“人类滑雪起源地”。这个说法是否成立&#xff0c;姑且不论&#xff0c;阿勒泰的雪的确很漂亮。冬奥会有一个宣传片&#xff0c;就是借用一朵阿勒泰雪花…

面试之Hashtable和ConcurrentHashMap

那么要如何保证HashMap的线程安全呢&#xff1f; 方法有很多&#xff0c;比如使用Hashtable或者Collections.synchronizedMap&#xff0c;但是这两位选手都有一个共同的问题&#xff1a;性能。因为不管是读还是写操作&#xff0c;他们都会给整个集合上锁&#xff0c;导致同一时…

PHP动态编译出现Cannot find autoconf

在安装完PHP后,想动态编译PHP的memcache扩展库 cd memcache-2.2.5//usr/local/webserver/php/bin/phpize./configure --with-php-config/usr/local/webserver/php/bin/php-config 但是执行/usr/local/webserver/php/bin/phpize时出现错误:Configuring for:PHP Api Version: …

AnimeGANv2 实现动漫风格迁移,简单操作

作者 | Yunlord出品 | CSDN博客前言之前一直在研究如何将图像动漫化&#xff0c;尝试了阿里云api和百度api&#xff0c;效果都不尽如人意。结果发现了一个宝藏github项目——AnimeGANv2&#xff0c;能够将现实世界场景照片进行动漫风格化。可以看出AnimeGAN的效果非常好&#x…

C#调用win32 api程序实例

1、声明static extern 方法&#xff0c;使用DllImport特性 class MyClass{[DllImport("kernel32", SetLastError true)]public static extern int GetCurrentDirectory(int a, StringBuilder b);} 2、调用 StringBuilder sbnew StringBuilder {Length 250}; MyClas…

Python 之 pip拒绝访问

起因 在我使用pip安装第三方库的时候&#xff0c;控制台提示我升级pip版本 You are using pip version 9.0.1, however version 10.0.1 is available. You should consider upgrading via the python -m pip install --upgrade pip command. 很显然&#xff0c;需要使用这样的指…

Unix / 类 Unix shell 中有哪些很酷很冷门很少用很有用的命令?(转)

著作权归作者所有。 商业转载请联系作者获得授权&#xff0c;非商业转载请注明出处。 作者&#xff1a;孙立伟 链接&#xff1a;http://www.zhihu.com/question/20140085/answer/14107336 来源&#xff1a;知乎 这个问题quora上有人提过 What are some lesser known but useful…

干货满满的 Python 实战项目,点赞收藏

作者 | 俊欣来源 | 关于数据分析与可视化今天小编来给大家介绍3个干货满满的计算机视觉方向的Python实战项目&#xff0c;主要用到的库有opencv-pythonnumpypillow要是大家所配置的环境当中没有这几个模块的话&#xff0c;就需要先用pip命令下载安装pip install opencv-python …

php安装完成以后要复制php.ini文件

直接 #find / -name "php.ini" 找不到&#xff0c;是因为安装php的时候没有复制配置文件 php版本变化以后ini文件名有变 php.ini-production对应于php.ini-recommended php.ini-development对应于php.ini-dist二者差异&#xff1f; 由于版本更新,这些文件有了新的命…

MASQUERADE --random 端口不随机

iptables -t nat -A POSTROUTING -o xxxx -j MASQUERADE --random发现源端口并不是随机的而是有规律递增&#xff0c;经过Google的搜索查找&#xff0c;发现新的版本有--random-full 这个参数iptables -t nat -A POSTROUTING -o xxxx -j MASQUERADE --random-full经过测试端口随…

PHP安装与使用VLD查看opcode代码【PHP安装第三方扩展的方法】

需要分析PHP代码的性能&#xff0c;或者说实现同样功能的代码到底哪个更好呢&#xff1f;或者说想知道底层的实现可以使用VLD查看opcode 下载与安装VLD # wget http://pecl.php.net/get/vld-0.11.2.tgz# tar zxvf vld-0.11.2.tgz# cd ./vld-0.11.2# /usr/local/php/bin/phpize …

实现数组字符串翻转的两种方法

//第一种方法&#xff1a;递归法 #include <stdio.h> int reverse_string(char * string) {if (*string ! \0){reverse_string(string1);printf("%c", *string);} } int main() {char *string "abcde";printf("源字符串为&#xff1a;%s\n&quo…

详解 Python 如何将爬取到的数据分别存储到 txt、excel、mysql 中!

作者 | 黄伟呢来源 | 数据分析与统计学之美1. 页面分析我爬取的页面是腾讯体育&#xff0c;链接如下&#xff1a;https://nba.stats.qq.com/player/list.htm观察上图&#xff1a;左边展示的分别是NBA的30支球队&#xff0c;右边就是每只球队对应球员的详细信息。此时思路就很清…

蹭了BCH热度,还来诋毁BCH,这些跳梁小丑到底在玩什么阴谋?

最近一些分叉币为了博眼球简直什么招数都用。有的某分叉币对主链暂停10天的问题闭口不提&#xff0c;靠微博撕逼来吸引关注&#xff0c;有的则自导自演了一出51%***的大戏。而奇怪的是当别人开始谈论他们这些错误的时候&#xff0c;他们却把矛头指向了火热的比特币现金。这些跳…

比 GPT-3 更擅长理解用户意图,OpenAI发布 InstructGPT

作者 | 青苹果来源 | 数据实战派近日&#xff0c;OpenAI 发布了一项令人瞩目的研究—— InstructGPT。在这项研究中&#xff0c;相比 GPT-3 而言&#xff0c;OpenAI 采用对齐研究&#xff08;alignment research&#xff09;&#xff0c;训练出更真实、更无害&#xff0c;而且更…

The C10K problem原文翻译

原文地址&#xff1a;http://www.cnblogs.com/fll/archive/2008/05/17/1201540.htmlThe C10K problem如今的web服务器需要同时处理一万个以上的客户端了&#xff0c;难道不是吗&#xff1f;毕竟如今的网络是个big place了。 现在的计算机也很强大了&#xff0c;你只需要花大概$…

mysql中模糊查询的四种用法介绍

下面介绍mysql中模糊查询的四种用法&#xff1a; 1&#xff0c;%&#xff1a;表示任意0个或多个字符。可匹配任意类型和长度的字符&#xff0c;有些情况下若是中文&#xff0c;请使用两个百分号&#xff08;%%&#xff09;表示。 比如 SELECT * FROM [user] WHERE u_name LIKE …

spring data jpa 详解

2019独角兽企业重金招聘Python工程师标准>>> 本篇进行Spring-data-jpa的介绍&#xff0c;几乎涵盖该框架的所有方面&#xff0c;在日常的开发当中&#xff0c;基本上能满足所有需求。这里不讲解JPA和Spring-data-jpa单独使用&#xff0c;所有的内容都是在和Spring整…

php使用curl可以get 模拟post

本机windows测试需要打开curl php.ini extensionphp_curl.dll重启apacheinclude (Curl.php);$cunew QP_Curl_Curl();$s$cu->get(http://www.baidu.com);echo $s;Curl.php可以使用http://www.myquickphp.com/的框架中的组件Curl.php/*** CURL 工具* * category QuickPHP(II…

为什么使用模块?

# -*- coding: utf-8 -*- #python 27 #xiaodeng #模块01#每个文件都是一个模块&#xff0c;并且模块导入之后就可以导入模块定义的变量名。#为什么使用模块&#xff1f; #命名空间提供了将部件组织为系统的简单的方法。 #在一个模块文件的顶层定义的所有变量名都成了被导入的模…

报告!插件×元宵来啦

欢欢喜喜 闹元宵迈过新年&#xff0c;开工大吉&#xff0c;元宵节的脚步悄悄靠近&#xff0c;在大家努力搬砖得同时&#xff0c;CSDN插件带着它的元宵活动走来啦~元宵喜乐汇虎年的第一个月圆之夜&#xff0c;除了吃汤圆还能干啥呢&#xff1f;当然是猜灯谜咯&#xff01;CSDN插…

%f%g%e区别

%f 表示按浮点数的格式输出 %e 表示按指数形式的浮点数的格式输出 %g 表示自动选择合适的表示法输出&#xff0c;可以去小数末尾多余的0转载于:https://www.cnblogs.com/holyday/p/9111777.html