热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

利用脚本在Virtualbox中部署fuelOpenstack

准备工作:MirantisFuelOpenStack安装文件(ISO格式)VirtualBoxScriptsCygwin及相关组件VirtualBox安装文件及扩展文件下载地址:M

准备工作:

  • Mirantis Fuel OpenStack安装文件(ISO格式)

  • Virtual Box Scripts

  • Cygwin及相关组件

  • Virtual Box安装文件及扩展文件


下载地址:

  • Mirantis相关:https://software.mirantis.com/releases/#supported

  • Virtual Box相关:https://www.virtualbox.org

  • Cygwin相关:https://cygwin.com/mirrors.html


安装Virtual Box及扩展包

安装Virtual Box比较简单,直接根据提示进行安装即可,步骤忽略。

安装Virtual Box扩展包的方法:在Virtual Box界面,选择管理-全局设定-扩展界面,选择添加安装并选择Virtual Box扩展包文件即可。

PS:注意扩展包一定要与Virtual Box版本一致。

技术分享

安装Cygwin及组件

双机下载的Cygwin安装包,在安装至选择下载站点界面时,尽量选择国内的下载站点以加快下载速度。

技术分享

在包选择界面输入expect并将单击搜索结果中的记录是指状态边为install

技术分享

然后进行包安装界面,安装完毕后点击上一步,然后依次选择openssh、procps、xxd三个软件包,然后完成安装。

技术分享

部署openstack环境

如果前面步骤顺利的话,部署openstack一般会比较简单。将openstack的Virtual box script文件包解压(最好解压到C盘),然后将fuel openstack文件(ISO格式)放到脚本文件夹下的\virtualbox\iso目录。


运行Cygwin工具,并将工作路径切换到

cd /cygdrive/c/vbox-scripts-8.0-mu-1/virtualbox/


执行安装程序

sh launch.sh


PS:一共有launch.sh、aunch_8GB.sh、launch_16GB.sh三个安装文件,请根据自己电脑的配置进行选择,也可以先运行config.sh脚本先配置虚机的配置参数,再运行launch.sh脚本,具体参考https://docs.mirantis.com/openstack/fuel/fuel-8.0/quickstart-guide.html#installing-mirantis-openstack-using-the-mirantis-virtualbox-scripts


安装过程为自动执行(含自动检验环境、自动创建虚机网络、自动创建虚机并完成部署),大约需要30分钟(依赖于自己电脑配置)。


openstack环境检验

安装完毕后,根据界面提示在浏览器打开下面的地址

技术分享

web界面默认的用户名和密码均为admin

技术分享

至此,fuel部署完成,后续是利用fuel部署openstack环境的步骤。


附1:安装界面打印(版本7)

Administrator@A23136070 /cygdrive/c/vbox-scripts-7.0/virtualbox
$ sh launch.sh
Checking for ‘free‘... OK
Checking for ‘expect‘... OK
If you run this script under Cygwin, you may have to add path to VirtualBox directory to your PATH.
Usually it is enough to run "export PATH=$PATH:"/cygdrive/c/Program Files/Oracle/VirtualBox"
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking for Mirantis OpenStack ISO image... OK
Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-7.0.iso
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Setup is done.
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #4...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #2 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #2...
Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #2...
+ VBoxManage hostonlyif ipconfig ‘VirtualBox Host-Only Ethernet Adapter #2‘ --ip 10.20.0.1 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter #2 has IP 10.20.0.1 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #3 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #3...
Configuring IP address 172.16.0.254 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #3...
+ VBoxManage hostonlyif ipconfig ‘VirtualBox Host-Only Ethernet Adapter #3‘ --ip 172.16.0.254 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter #3 has IP 172.16.0.254 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #4 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #4...
Configuring IP address 172.16.1.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #4...
+ VBoxManage hostonlyif ipconfig ‘VirtualBox Host-Only Ethernet Adapter #4‘ --ip 172.16.1.1 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter #4 has IP 172.16.1.1 and mask 255.255.255.0 properly set.
OK.
Virtual machine ‘fuel-master‘ is created and registered.
UUID: 33207018-c9d7-4222-967f-9877d545d060
Settings file: ‘D:\VMs\fuel-master\fuel-master.vbox‘
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-master, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: bb04f877-9579-4ae1-8473-c9a735703eb8
Adding serial numbers of disks to fuel-master...
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding NAT adapter to fuel-master for outbound network access through the host system...
Waiting for VM "fuel-master" to power on...
VM "fuel-master" has been successfully started.
Waiting for product VM to install. Please do NOT abort the script...
Checking for internet connectivity on the host system... FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Checking local DNS configuration... /etc/resolv.conf does not contain a nameserver. Using 8.8.8.8 for DNS.
Enabling outbound network/internet access for the product VM...
Waiting until the network services are restarted...
FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Master node has been installed.
Virtual machine ‘fuel-slave-1‘ is created and registered.
UUID: d086ecbb-47b5-4537-894b-ea0430235313
Settings file: ‘D:\VMs\fuel-slave-1\fuel-slave-1.vbox‘
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: fb7ce950-1295-4b58-8387-b65017c92ee4
Adding serial numbers of disks to fuel-slave-1...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 3e053bc2-2495-4d63-b61b-44b60bbb11e9
Adding serial numbers of disks to fuel-slave-1...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 431cd2aa-0f07-4864-9943-fc4a8445b6d0
Adding serial numbers of disks to fuel-slave-1...
Waiting for VM "fuel-slave-1" to power on...
VM "fuel-slave-1" has been successfully started.
Virtual machine ‘fuel-slave-2‘ is created and registered.
UUID: 3b6089d2-863f-4d60-be73-6d1c98a79fb3
Settings file: ‘D:\VMs\fuel-slave-2\fuel-slave-2.vbox‘
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: e6220313-1e5c-4cfb-9625-c4309ab81f72
Adding serial numbers of disks to fuel-slave-2...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 48bea890-63f9-451a-a828-31fc298e8ae2
Adding serial numbers of disks to fuel-slave-2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 3a5ab4b3-ce8a-452b-a3ef-a1b1a0bcba3e
Adding serial numbers of disks to fuel-slave-2...
Waiting for VM "fuel-slave-2" to power on...
VM "fuel-slave-2" has been successfully started.
Virtual machine ‘fuel-slave-3‘ is created and registered.
UUID: 544d2774-bb46-482c-9354-f4579d8ec42f
Settings file: ‘D:\VMs\fuel-slave-3\fuel-slave-3.vbox‘
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 52a9342e-34a6-46ac-ba98-14f007773d08
Adding serial numbers of disks to fuel-slave-3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 55fcce35-13ef-4e90-b30d-00a6d02bca1c
Adding serial numbers of disks to fuel-slave-3...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 7ccc2083-227d-4677-bf99-3376b6133de8
Adding serial numbers of disks to fuel-slave-3...
Waiting for VM "fuel-slave-3" to power on...
VM "fuel-slave-3" has been successfully started.
Slave nodes have been created. They will boot over PXE and get discovered by the master node.
To access master node, please point your browser to:
    http://10.20.0.2:8000/
The default username and password is admin:admin

附2:安装界面打印(版本8)

Administrator@A23136070 /cygdrive/c/vbox-scripts-8.0-mu-1/virtualbox
$ sh launch.sh
Prepare the host system...
Checking for ‘free‘... OK
Checking for ‘expect‘... OK
Checking for ‘xxd‘... OK
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking for VirtualBox iPXE firmware...SKIP
VirtualBox iPXE firmware is not found. Used standard firmware from the VirtualBox Extension Pack.
Checking for Mirantis OpenStack ISO image... OK
Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-8.0.iso
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Done.
Check available memory on the host system...
Done.
Сlean previous installation if exists...
Done.
Deleting old interfaces if exists...
Done.
Creating host-only interface...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #2 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #2...
Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #2...
Verifying interface VirtualBox Host-Only Ethernet Adapter #2 has IP 10.20.0.1 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #3 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #3...
Configuring IP address 172.16.0.254 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #3...
Verifying interface VirtualBox Host-Only Ethernet Adapter #3 has IP 172.16.0.254 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #4 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #4...
Configuring IP address 172.16.1.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #4...
Verifying interface VirtualBox Host-Only Ethernet Adapter #4 has IP 172.16.1.1 and mask 255.255.255.0 properly set.
OK.
Virtual machine ‘fuel-master‘ is created and registered.
UUID: f633e7d0-523d-42bf-b542-939db284934f
Settings file: ‘D:\VMs\fuel-master\fuel-master.vbox‘
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-master, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: ba25dcd4-2acb-47a0-b0e3-61c975161f5f
Adding serial numbers of disks to fuel-master...
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding NAT adapter to fuel-master for outbound network access through the host system...
Waiting for VM "fuel-master" to power on...
VM "fuel-master" has been successfully started.
Waiting for product VM to download files. Please do NOT abort the script... OK
Checking for internet connectivity on the host system... FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Checking local DNS configuration... /etc/resolv.conf does not contain a nameserver. Using 8.8.8.8 for DNS.
Enabling outbound network/internet access for the product VM... OK
Waiting until the network services are restarted... FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Waiting for product VM to install. Please do NOT abort the script... OK
Master node has been installed.
Virtual machine ‘fuel-slave-1‘ is created and registered.
UUID: f007664b-d706-4666-8f1f-3c55fb7296ea
Settings file: ‘D:\VMs\fuel-slave-1\fuel-slave-1.vbox‘
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 0cfeac5e-26e2-4c36-aa17-8687d2e4ce07
Adding serial numbers of disks to fuel-slave-1...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 2026f819-d843-4633-96ac-721e4e5dbfce
Adding serial numbers of disks to fuel-slave-1...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: cb00d081-6654-408a-9e11-cd0fecbf9b2b
Adding serial numbers of disks to fuel-slave-1...
Waiting for VM "fuel-slave-1" to power on...
VM "fuel-slave-1" has been successfully started.
Virtual machine ‘fuel-slave-2‘ is created and registered.
UUID: 48d832c1-6f3d-4362-91ee-91ce07f03c66
Settings file: ‘D:\VMs\fuel-slave-2\fuel-slave-2.vbox‘
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: de07d288-ae1f-486f-bf0e-6dc979742bdd
Adding serial numbers of disks to fuel-slave-2...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 24d4688f-c71d-4042-ae23-3240a13d94c9
Adding serial numbers of disks to fuel-slave-2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 3f92c896-7c8d-4784-91f1-07a65f212aaa
Adding serial numbers of disks to fuel-slave-2...
Waiting for VM "fuel-slave-2" to power on...
VM "fuel-slave-2" has been successfully started.
Virtual machine ‘fuel-slave-3‘ is created and registered.
UUID: 7d046487-6e7f-419c-a48e-c9c2f6b16b0d
Settings file: ‘D:\VMs\fuel-slave-3\fuel-slave-3.vbox‘
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 33a963f5-7049-43fc-8235-0ad5854abc43
Adding serial numbers of disks to fuel-slave-3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 30be8af7-a99f-4846-88f8-0dc6df025b9f
Adding serial numbers of disks to fuel-slave-3...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 2058eed9-74c7-4a86-a0dd-4c2c447e48bb
Adding serial numbers of disks to fuel-slave-3...
Waiting for VM "fuel-slave-3" to power on...
VM "fuel-slave-3" has been successfully started.
Slave nodes have been created. They will boot over PXE and get discovered by the master node.
To access master node, please point your browser to:
    http://10.20.0.2:8000/
The default username and password is admin:admin

附3:删除环境需要运行sh clean.sh

Administrator@A23136070 /cygdrive/c/vbox-scripts-8.0-mu-1/virtualbox
$ sh clean.sh
Prepare the host system...
Checking for ‘free‘... OK
Checking for ‘expect‘... OK
Checking for ‘xxd‘... OK
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Done.
Сlean previous installation if exists...
Found existing VM: fuel-master. Deleting it...
Stopping Virtual Machine fuel-master...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-master...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Found existing VM: fuel-slave-1. Deleting it...
Stopping Virtual Machine fuel-slave-1...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-slave-1...
0%...10%...20%...
Progress state: VBOX_E_INVALID_OBJECT_STATE
VBoxManage.exe: error: Machine delete failed
VBoxManage.exe: error: Medium ‘D:\VMs\fuel-slave-1\fuel-slave-1_0.vdi‘ is locked for reading by another task
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Medium, interface IMedium
VBoxManage.exe: error: Context: "int __cdecl handleUnregisterVM(struct HandlerArg *)" at line 166 of file VBoxManageMisc.cpp
Found existing VM: fuel-slave-2. Deleting it...
Stopping Virtual Machine fuel-slave-2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-slave-2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Found existing VM: fuel-slave-3. Deleting it...
Stopping Virtual Machine fuel-slave-3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-slave-3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Done.
Deleting old interfaces if exists...
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #4...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Done.




推荐阅读
  • 本文内容为asp.net微信公众平台开发的目录汇总,包括数据库设计、多层架构框架搭建和入口实现、微信消息封装及反射赋值、关注事件、用户记录、回复文本消息、图文消息、服务搭建(接入)、自定义菜单等。同时提供了示例代码和相关的后台管理功能。内容涵盖了多个方面,适合综合运用。 ... [详细]
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 基于layUI的图片上传前预览功能的2种实现方式
    本文介绍了基于layUI的图片上传前预览功能的两种实现方式:一种是使用blob+FileReader,另一种是使用layUI自带的参数。通过选择文件后点击文件名,在页面中间弹窗内预览图片。其中,layUI自带的参数实现了图片预览功能。该功能依赖于layUI的上传模块,并使用了blob和FileReader来读取本地文件并获取图像的base64编码。点击文件名时会执行See()函数。摘要长度为169字。 ... [详细]
  • HDU 2372 El Dorado(DP)的最长上升子序列长度求解方法
    本文介绍了解决HDU 2372 El Dorado问题的一种动态规划方法,通过循环k的方式求解最长上升子序列的长度。具体实现过程包括初始化dp数组、读取数列、计算最长上升子序列长度等步骤。 ... [详细]
  • 本文讨论了Alink回归预测的不完善问题,指出目前主要针对Python做案例,对其他语言支持不足。同时介绍了pom.xml文件的基本结构和使用方法,以及Maven的相关知识。最后,对Alink回归预测的未来发展提出了期待。 ... [详细]
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • 本文介绍了九度OnlineJudge中的1002题目“Grading”的解决方法。该题目要求设计一个公平的评分过程,将每个考题分配给3个独立的专家,如果他们的评分不一致,则需要请一位裁判做出最终决定。文章详细描述了评分规则,并给出了解决该问题的程序。 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • Mac OS 升级到11.2.2 Eclipse打不开了,报错Failed to create the Java Virtual Machine
    本文介绍了在Mac OS升级到11.2.2版本后,使用Eclipse打开时出现报错Failed to create the Java Virtual Machine的问题,并提供了解决方法。 ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • 阿里Treebased Deep Match(TDM) 学习笔记及技术发展回顾
    本文介绍了阿里Treebased Deep Match(TDM)的学习笔记,同时回顾了工业界技术发展的几代演进。从基于统计的启发式规则方法到基于内积模型的向量检索方法,再到引入复杂深度学习模型的下一代匹配技术。文章详细解释了基于统计的启发式规则方法和基于内积模型的向量检索方法的原理和应用,并介绍了TDM的背景和优势。最后,文章提到了向量距离和基于向量聚类的索引结构对于加速匹配效率的作用。本文对于理解TDM的学习过程和了解匹配技术的发展具有重要意义。 ... [详细]
  • 本文介绍了使用AJAX的POST请求实现数据修改功能的方法。通过ajax-post技术,可以实现在输入某个id后,通过ajax技术调用post.jsp修改具有该id记录的姓名的值。文章还提到了AJAX的概念和作用,以及使用async参数和open()方法的注意事项。同时强调了不推荐使用async=false的情况,并解释了JavaScript等待服务器响应的机制。 ... [详细]
  • 目录实现效果:实现环境实现方法一:基本思路主要代码JavaScript代码总结方法二主要代码总结方法三基本思路主要代码JavaScriptHTML总结实 ... [详细]
  • CSS3选择器的使用方法详解,提高Web开发效率和精准度
    本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
author-avatar
lxm淡淡嘚甜_671
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有