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

awsdiskexpendhowto

就问一句,怎么破~找到了,如果是跟分区,就看这个http:docs.aws.amazon.comAWSEC2latest

这里写图片描述

就问一句,怎么破~

找到了,如果是跟分区,就看这个 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html , 如果是其他分区不是根分区的就简单了。

#!/bin/sh
# Copyright (C) 2011 Canonical Ltd.
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
#
# Authors: Scott Moser
# Juerg Haefliger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .# the fudge factor. if its within this many 512 byte sectors, dont bother
FUDGE=${GROWPART_FUDGE:-$((20*1024))}
TEMP_D=""
RESTORE_FUNC=""
RESTORE_HUMAN=""
VERBOSITY=0
DISK=""
PART=""
PT_UPDATE=false
DRY_RUN=0MBR_CHS=""
MBR_BACKUP=""
GPT_BACKUP=""
_capture=""error() {echo "$@" 1>&2
}fail() {[ $# -eq 0 ] || echo "FAILED:" "$@"exit 2
}nochange() {echo "NOCHANGE:" "$@"exit 1
}changed() {echo "CHANGED:" "$@"exit 0
}change() {echo "CHANGE:" "$@"exit 0
}cleanup() {if [ -n "${RESTORE_FUNC}" ]; thenerror "***** WARNING: Resize failed, attempting to revert ******"if ${RESTORE_FUNC} ; thenerror "***** Appears to have gone OK ****"elseerror "***** FAILED! or original partition table" \"looked like: ****"cat "${RESTORE_HUMAN}" 1>&2fifi[ -z "${TEMP_D}" -o ! -d "${TEMP_D}" ] || rm -Rf "${TEMP_D}"
}debug() {local level=${1}shift[ "${level}" -gt "${VERBOSITY}" ] && returnif [ "${DEBUG_LOG}" ]; thenecho "$@" >>"${DEBUG_LOG}"elseerror "$@"fi
}debugcat() {local level="$1"shift;[ "${level}" -gt "$VERBOSITY" ] && returnif [ "${DEBUG_LOG}" ]; thencat "$@" >>"${DEBUG_LOG}"elsecat "$@" 1>&2fi
}mktemp_d() {# just a mktemp -d that doens't need mktemp if its not there._RET=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX" 2>/dev/null) &&return_RET=$(umask 077 && t="${TMPDIR:-/tmp}/${0##*/}.$$" &&mkdir "${t}" && echo "${t}")return
}Usage() {cat <${0##*/} disk partitionrewrite partition table so that partition takes up all the space it canoptions:-h | --help print Usage and exit--fudge F if part could be resized, but change would beless than &#39;F&#39;, do not resize (default: ${FUDGE})-N | --dry-run only report what would be done, show new &#39;sfdisk -d&#39;-v | --verbose increase verbosity / debug-u | --update R update the the kernel partition table info after growingthis requires kernel support and &#39;partx --update&#39;R is one of:- &#39;auto&#39; : [default] update partition if possible- &#39;force&#39; : try despite sanity checks (fail on failure)- &#39;off&#39; : do not attempt- &#39;on&#39; : fail if sanity checks indicate no supportExample:- ${0##*/} /dev/sda 1Resize partition 1 on /dev/sda
EOF
}bad_Usage() {Usage 1>&2error "$&#64;"exit 2
}mbr_restore() {sfdisk --no-reread "${DISK}" ${MBR_CHS} -I "${MBR_BACKUP}"
}sfdisk_worked_but_blkrrpart_failed() {local ret&#61;"$1" output&#61;"$2"# exit code found was just 1, but dont insist on that#[ $ret -eq 1 ] || return 1# Successfully wrote the new partition tablegrep -qi "Success.* wrote.* new.* partition" "$output" &&grep -qi "BLKRRPART: Device or resource busy" "$output"return
}mbr_resize() {RESTORE_HUMAN&#61;"${TEMP_D}/recovery"MBR_BACKUP&#61;"${TEMP_D}/orig.save"local change_out&#61;${TEMP_D}/change.outlocal dump_out&#61;${TEMP_D}/dump.outlocal new_out&#61;${TEMP_D}/new.outlocal dump_mod&#61;${TEMP_D}/dump.modlocal tmp&#61;"${TEMP_D}/tmp.out"local err&#61;"${TEMP_D}/err.out"local _devc cyl _w1 heads _w2 sectors _w3 tot dpartlocal pt_start pt_size pt_end max_end new_size change_info# --show-pt-geometry outputs something like# /dev/sda: 164352 cylinders, 4 heads, 32 sectors/trackrqe sfd_geom sfdisk "${DISK}" --show-pt-geometry >"${tmp}" &&read _devc cyl _w1 heads _w2 sectors _w3 <"${tmp}" &&MBR_CHS&#61;"-C ${cyl} -H ${heads} -S ${sectors}" ||fail "failed to get CHS from ${DISK}"tot&#61;$((${cyl}*${heads}*${sectors}))debug 1 "geometry is ${MBR_CHS}. total size&#61;${tot}"rqe sfd_dump sfdisk ${MBR_CHS} --unit&#61;S --dump "${DISK}" \>"${dump_out}" ||fail "failed to dump sfdisk info for ${DISK}"{echo "## sfdisk ${MBR_CHS} --unit&#61;S --dump ${DISK}"cat "${dump_out}"} >"${RESTORE_HUMAN}"[ $? -eq 0 ] || fail "failed to save sfdisk -d output"debugcat 1 "${RESTORE_HUMAN}"sed -e &#39;s/,//g; s/start&#61;/start /; s/size&#61;/size /&#39; "${dump_out}" \>"${dump_mod}" ||fail "sed failed on dump output"dpart&#61;"${DISK}${PART}" # disk and partition numberif [ -b "${DISK}p${PART}" -a "${DISK%[0-9]}" !&#61; "${DISK}" ]; then# for block devices that end in a number (/dev/nbd0)# the partition is "p" (/dev/nbd0p1)dpart&#61;"${DISK}p${PART}"elif [ "${DISK#/dev/loop[0-9]}" !&#61; "${DISK}" ]; then# for /dev/loop devices, sfdisk output will be p# format also, even though there is not a device there.dpart&#61;"${DISK}p${PART}"fipt_start&#61;$(awk &#39;$1 &#61;&#61; pt { print $4 }&#39; "pt&#61;${dpart}" <"${dump_mod}") &&pt_size&#61;$(awk &#39;$1 &#61;&#61; pt { print $6 }&#39; "pt&#61;${dpart}" <"${dump_mod}") &&[ -n "${pt_start}" -a -n "${pt_size}" ] &&pt_end&#61;$((${pt_size}&#43;${pt_start})) ||fail "failed to get start and end for ${dpart} in ${DISK}"# find the minimal starting location that is >&#61; pt_end max_end&#61;$(awk &#39;$3 &#61;&#61; "start" { if($4 >&#61; pt_end && $4 \min&#61;${tot} pt_end&#61;${pt_end} "${dump_mod}") &&[ -n "${max_end}" ] ||fail "failed to get max_end for partition ${PART}"debug 1 "max_end&#61;${max_end} tot&#61;${tot} pt_end&#61;${pt_end}" \"pt_start&#61;${pt_start} pt_size&#61;${pt_size}"[ $((${pt_end})) -eq ${max_end} ] &&nochange "partition ${PART} is size ${pt_size}. it cannot be grown"[ $((${pt_end}&#43;${FUDGE})) -gt ${max_end} ] &&nochange "partition ${PART} could only be grown by" \"$((${max_end}-${pt_end})) [fudge&#61;${FUDGE}]"# now, change the size for this partition in ${dump_out} to be the# new sizenew_size&#61;$((${max_end}-${pt_start}))sed "\|^\s*${dpart} |s/${pt_size},/${new_size},/" "${dump_out}" \>"${new_out}" ||fail "failed to change size in output"change_info&#61;"partition&#61;${PART} start&#61;${pt_start} old: size&#61;${pt_size} end&#61;${pt_end} new: size&#61;${new_size},end&#61;${max_end}"if [ ${DRY_RUN} -ne 0 ]; thenecho "CHANGE: ${change_info}"{echo "# &#61;&#61;&#61; old sfdisk -d &#61;&#61;&#61;"cat "${dump_out}"echo "# &#61;&#61;&#61; new sfdisk -d &#61;&#61;&#61;"cat "${new_out}"} 1>&2exit 0fiLANG&#61;C sfdisk --no-reread "${DISK}" ${MBR_CHS} --force \-O "${MBR_BACKUP}" <"${new_out}" >"${change_out}" 2>&1ret&#61;$?[ $ret -eq 0 ] || RESTORE_FUNC&#61;"mbr_restore"if [ $ret -eq 0 ]; then:elif $PT_UPDATE &&sfdisk_worked_but_blkrrpart_failed "$ret" "${change_out}"; then# if the command failed, but it looks like only because# the device was busy and we have pt_update, then go ondebug 1 "sfdisk failed, but likely only because of blkrrpart"elseerror "attempt to resize ${DISK} failed. sfdisk output below:"sed &#39;s,^,| ,&#39; "${change_out}" 1>&2fail "failed to resize"firq pt_update pt_update "$DISK" "$PART" ||fail "pt_resize failed"RESTORE_FUNC&#61;""changed "${change_info}"# dump_out looks something like:## partition table of /tmp/out.img#unit: sectors##/tmp/out.img1 : start&#61; 1, size&#61; 48194, Id&#61;83#/tmp/out.img2 : start&#61; 48195, size&#61; 963900, Id&#61;83#/tmp/out.img3 : start&#61; 1012095, size&#61; 305235, Id&#61;82#/tmp/out.img4 : start&#61; 1317330, size&#61; 771120, Id&#61; 5#/tmp/out.img5 : start&#61; 1317331, size&#61; 642599, Id&#61;83#/tmp/out.img6 : start&#61; 1959931, size&#61; 48194, Id&#61;83#/tmp/out.img7 : start&#61; 2008126, size&#61; 80324, Id&#61;83
}gpt_restore() {sgdisk -l "${GPT_BACKUP}" "${DISK}"
}gpt_resize() {GPT_BACKUP&#61;"${TEMP_D}/pt.backup"local pt_info&#61;"${TEMP_D}/pt.info"local pt_pretend&#61;"${TEMP_D}/pt.pretend"local pt_data&#61;"${TEMP_D}/pt.data"local out&#61;"${TEMP_D}/out"local dev&#61;"disk&#61;${DISK} partition&#61;${PART}"local pt_start pt_end pt_size last pt_max code guid name new_sizelocal old new change_info# Dump the original partition information and details to disk. This is# used in case something goes wrong and human interaction is required# to revert any changes.rqe sgd_info sgdisk "--info&#61;${PART}" --print "${DISK}" >"${pt_info}" ||RESTORE_HUMAN&#61;"${pt_info}"debug 1 "$dev: original sgdisk info:"debugcat 1 "${pt_info}"# Pretend to move the backup GPT header to the end of the disk and dump# the resulting partition information. We use this info to determine if# we have to resize the partition.rqe sgd_pretend sgdisk --pretend --move-second-header \--print "${DISK}" >"${pt_pretend}" ||fail "${dev}: failed to dump pretend sgdisk info"debug 1 "$dev: pretend sgdisk info"debugcat 1 "${pt_pretend}"# Extract the partition data from the pretend dumpawk &#39;found { print } ; $1 &#61;&#61; "Number" { found &#61; 1 }&#39; \"${pt_pretend}" >"${pt_data}" ||fail "${dev}: failed to parse pretend sgdisk info"# Get the start and end sectors of the partition to be grownpt_start&#61;$(awk &#39;$1 &#61;&#61; &#39;"${PART}"&#39; { print $2 }&#39; "${pt_data}") &&[ -n "${pt_start}" ] ||fail "${dev}: failed to get start sector"pt_end&#61;$(awk &#39;$1 &#61;&#61; &#39;"${PART}"&#39; { print $3 }&#39; "${pt_data}") &&[ -n "${pt_end}" ] ||fail "${dev}: failed to get end sector"pt_size&#61;"$((${pt_end} - ${pt_start}))"# Get the last usable sectorlast&#61;$(awk &#39;/last usable sector is/ { print $NF }&#39; \"${pt_pretend}") && [ -n "${last}" ] ||fail "${dev}: failed to get last usable sector"# Find the minimal start sector that is >&#61; pt_end pt_max&#61;$(awk &#39;{ if ($2 >&#61; pt_end && $2 min&#61;"${last}" pt_end&#61;"${pt_end}" \"${pt_data}") && [ -n "${pt_max}" ] ||fail "${dev}: failed to find max end sector"debug 1 "${dev}: pt_start&#61;${pt_start} pt_end&#61;${pt_end}" \"pt_size&#61;${pt_size} pt_max&#61;${pt_max} last&#61;${last}"# Check if the partition can be grown[ "${pt_end}" -eq "${pt_max}" ] &&nochange "${dev}: size&#61;${pt_size}, it cannot be grown"[ "$((${pt_end} &#43; ${FUDGE}))" -gt "${pt_max}" ] &&nochange "${dev}: could only be grown by" \"$((${pt_max} - ${pt_end})) [fudge&#61;${FUDGE}]"# The partition can be grown if we made it here. Get some more info# about it so we can do it properly.# FIXME: Do we care about the attribute flags?code&#61;$(awk &#39;/^Partition GUID code:/ { print $4 }&#39; "${pt_info}")guid&#61;$(awk &#39;/^Partition unique GUID:/ { print $4 }&#39; "${pt_info}")name&#61;$(awk &#39;/^Partition name:/ { gsub(/&#39;"&#39;"&#39;/, "") ; \if (NF >&#61; 3) print substr($0, index($0, $3)) }&#39; "${pt_info}")[ -n "${code}" -a -n "${guid}" ] ||fail "${dev}: failed to parse sgdisk details"debug 1 "${dev}: code&#61;${code} guid&#61;${guid} name&#61;&#39;${name}&#39;"# Calculate the new size of the partitionnew_size&#61;$((${pt_max} - ${pt_start}))old&#61;"old: size&#61;${pt_size},end&#61;${pt_end}"new&#61;"new: size&#61;${new_size},end&#61;${pt_max}"change_info&#61;"${dev}: start&#61;${pt_start} ${old} ${new}"# Dry run[ "${DRY_RUN}" -ne 0 ] && change "${change_info}"# Backup the current partition table, we&#39;re about to modify itrq sgd_backup sgdisk "--backup&#61;${GPT_BACKUP}" "${DISK}" ||fail "${dev}: failed to backup the partition table"# Modify the partition table. We do it all in one go (the order is# important!):# - move the GPT backup header to the end of the disk# - delete the partition# - recreate the partition with the new size# - set the partition code# - set the partition GUID# - set the partition namerq sgdisk_mod sgdisk --move-second-header "--delete&#61;${PART}" \"--new&#61;${PART}:${pt_start}:${pt_max}" \"--typecode&#61;${PART}:${code}" \"--partition-guid&#61;${PART}:${guid}" \"--change-name&#61;${PART}:${name}" "${DISK}" &&rq pt_update pt_update "$DISK" "$PART" || {RESTORE_FUNC&#61;gpt_restorefail "${dev}: failed to repartition"}changed "${change_info}"
}kver_to_num() {local kver&#61;"$1" maj&#61;"" min&#61;"" mic&#61;"0"kver&#61;${kver%%-*}maj&#61;${kver%%.*}min&#61;${kver#${maj}.}min&#61;${min%%.*}mic&#61;${kver#${maj}.${min}.}[ "$kver" &#61; "$mic" ] && mic&#61;0_RET&#61;$(($maj*1000*1000&#43;$min*1000&#43;$mic))
}kver_cmp() {local op&#61;"$2" n1&#61;"" n2&#61;""kver_to_num "$1"n1&#61;"$_RET"kver_to_num "$3"n2&#61;"$_RET"[ $n1 $op $n2 ]
}rq() {# runquieterror(label, command)# gobble stderr of a command unless it errorslocal label&#61;"$1" ret&#61;"" efile&#61;""efile&#61;"$TEMP_D/$label.err"shift;debug 2 "running[$label][$_capture]" "$&#64;"if [ "${_capture}" &#61; "erronly" ]; then"$&#64;" 2>"$TEMP_D/$label.err"ret&#61;$?else"$&#64;" >"$TEMP_D/$label.err" 2>&1ret&#61;$?fiif [ $ret -ne 0 ]; thenerror "failed [$label:$ret]" "$&#64;"cat "$efile" 1>&2fireturn $ret
}rqe() {local _capture&#61;"erronly"rq "$&#64;"
}verify_ptupdate() {local input&#61;"$1" found&#61;"" reason&#61;"" kver&#61;""# we can always satisfy &#39;off&#39;if [ "$input" &#61; "off" ]; then_RET&#61;"false";return 0;fiif command -v partx >/dev/null 2>&1; thenpartx --help 2>/dev/null | grep -q -- --update || {reason&#61;"partx has no &#39;--update&#39; flag in usage."found&#61;"off"}elsereason&#61;"no &#39;partx&#39; command"found&#61;"off"fiif [ -z "$found" ]; thenif [ "$(uname)" !&#61; "Linux" ]; thenreason&#61;"Kernel is not Linux per uname."found&#61;"off"fifiif [ -z "$found" ]; thenkver&#61;$(uname -r) || debug 1 "uname -r failed!"if ! kver_cmp "${kver-0.0.0}" -ge 3.8.0; thenreason&#61;"Kernel &#39;$kver&#39; <3.8.0."found&#61;"off"fifiif [ -z "$found" ]; then_RET&#61;"true"return 0ficase "$input" inon) error "$reason"; return 1;;auto)_RET&#61;"false";debug 1 "partition update disabled: $reason"return 0;;force)_RET&#61;"true"error "WARNING: ptupdate forced on even though: $reason"return 0;;esacerror "unknown input &#39;$input&#39;";return 1;
}pt_update() {local dev&#61;"$1" part&#61;"$2" update&#61;"${3:-$PT_UPDATE}"if ! $update; thenreturn 0fipartx --update "$part" "$dev"
}has_cmd() {command -v "${1}" >/dev/null 2>&1
}pt_update&#61;"auto"
while [ $# -ne 0 ]; docur&#61;${1}next&#61;${2}case "$cur" in-h|--help)Usageexit 0;;--fudge)FUDGE&#61;${next}shift;;-N|--dry-run)DRY_RUN&#61;1;;-u|--update|--update&#61;*)if [ "${cur#--update&#61;}" !&#61; "$cur" ]; thennext&#61;"${cur#--update&#61;}"elseshiftficase "$next" inoff|auto|force|on) pt_update&#61;$next;;*) fail "unknown --update option: $next";;esac;;-v|--verbose)VERBOSITY&#61;$(($VERBOSITY&#43;1));;--)shiftbreak;;-*)fail "unknown option ${cur}";;*)if [ -z "${DISK}" ]; thenDISK&#61;${cur}else[ -z "${PART}" ] || fail "confused by arg ${cur}"PART&#61;${cur}fi;;esacshift
done[ -n "${DISK}" ] || bad_Usage "must supply disk and partition-number"
[ -n "${PART}" ] || bad_Usage "must supply partition-number"has_cmd "sfdisk" || fail "sfdisk not found"[ -e "${DISK}" ] || fail "${DISK}: does not exist"[ "${PART#*[!0-9]}" &#61; "${PART}" ] || fail "partition-number must be a number"verify_ptupdate "$pt_update" || fail
PT_UPDATE&#61;$_RETdebug 1 "update-partition set to $PT_UPDATE"mktemp_d && TEMP_D&#61;"${_RET}" || fail "failed to make temp dir"
trap cleanup EXIT# get the ID of the first partition to determine if it&#39;s MBR or GPT
id&#61;$(sfdisk --id --force "${DISK}" 1 2>/dev/null) ||fail "unable to determine partition type"if [ "${id}" &#61; "ee" ] ; thenhas_cmd "sgdisk" || fail "GPT partition found but no sgdisk"debug 1 "found GPT partition table (id &#61; ${id})"gpt_resize
elsedebug 1 "found MBR partition table (id &#61; ${id})"mbr_resize
fi# vi: ts&#61;4 noexpandtab

也可以从 http://ojv12llai.bkt.clouddn.com/uploads/20170217171332.sh 这里进行下载

执行命令

bash xx.sh /dev/xvda 1

yum install -y parted
partprobe # 如果不行&#xff0c;只能重启了


推荐阅读
  • 成功安装Sabayon Linux在thinkpad X60上的经验分享
    本文分享了作者在国庆期间在thinkpad X60上成功安装Sabayon Linux的经验。通过修改CHOST和执行emerge命令,作者顺利完成了安装过程。Sabayon Linux是一个基于Gentoo Linux的发行版,可以将电脑快速转变为一个功能强大的系统。除了作为一个live DVD使用外,Sabayon Linux还可以被安装在硬盘上,方便用户使用。 ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • Webpack5内置处理图片资源的配置方法
    本文介绍了在Webpack5中处理图片资源的配置方法。在Webpack4中,我们需要使用file-loader和url-loader来处理图片资源,但是在Webpack5中,这两个Loader的功能已经被内置到Webpack中,我们只需要简单配置即可实现图片资源的处理。本文还介绍了一些常用的配置方法,如匹配不同类型的图片文件、设置输出路径等。通过本文的学习,读者可以快速掌握Webpack5处理图片资源的方法。 ... [详细]
  • Commit1ced2a7433ea8937a1b260ea65d708f32ca7c95eintroduceda+Clonetraitboundtom ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • Android系统移植与调试之如何修改Android设备状态条上音量加减键在横竖屏切换的时候的显示于隐藏
    本文介绍了如何修改Android设备状态条上音量加减键在横竖屏切换时的显示与隐藏。通过修改系统文件system_bar.xml实现了该功能,并分享了解决思路和经验。 ... [详细]
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
  • JDK源码学习之HashTable(附带面试题)的学习笔记
    本文介绍了JDK源码学习之HashTable(附带面试题)的学习笔记,包括HashTable的定义、数据类型、与HashMap的关系和区别。文章提供了干货,并附带了其他相关主题的学习笔记。 ... [详细]
  • iOS超签签名服务器搭建及其优劣势
    本文介绍了搭建iOS超签签名服务器的原因和优势,包括不掉签、用户可以直接安装不需要信任、体验好等。同时也提到了超签的劣势,即一个证书只能安装100个,成本较高。文章还详细介绍了超签的实现原理,包括用户请求服务器安装mobileconfig文件、服务器调用苹果接口添加udid等步骤。最后,还提到了生成mobileconfig文件和导出AppleWorldwideDeveloperRelationsCertificationAuthority证书的方法。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • Android日历提醒软件开源项目分享及使用教程
    本文介绍了一款名为Android日历提醒软件的开源项目,作者分享了该项目的代码和使用教程,并提供了GitHub项目地址。文章详细介绍了该软件的主界面风格、日程信息的分类查看功能,以及添加日程提醒和查看详情的界面。同时,作者还提醒了读者在使用过程中可能遇到的Android6.0权限问题,并提供了解决方法。 ... [详细]
  • 本文介绍了贝叶斯垃圾邮件分类的机器学习代码,代码来源于https://www.cnblogs.com/huangyc/p/10327209.html,并对代码进行了简介。朴素贝叶斯分类器训练函数包括求p(Ci)和基于词汇表的p(w|Ci)。 ... [详细]
author-avatar
sanesTT
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有