= array(); } $post['classname'] = 'post'; } function comment_format(&$post) { global $conf, $uid, $gid, $forumlist; if (empty($post)) return; $forum = $post['fid'] ? forum_read($post['fid']) : ''; $thread = well_thread_read_cache($post['tid']); if ($thread) { //$post['fid'] = $thread['fid']; $post['closed'] = $thread['closed']; $post['subject'] = $thread['subject']; $post['url'] = $thread['url']; } else { $post['closed'] = 0; $post['subject'] = lang('thread_not_exists'); $post['url'] = ''; } $post['create_date_fmt'] = humandate($post['create_date']); //$post['message'] = stripslashes(htmlspecialchars_decode($post['message'])); $user = user_read_cache($post['uid']); $post['username'] = array_value($user, 'username'); $post['user_avatar_url'] = array_value($user, 'avatar_url'); $post['user'] = $user ? user_safe_info($user) : user_guest(); isset($post['floor']) || $post['floor'] = 0; // 权限判断 $post['allowupdate'] = 2 == array_value($forum, 'comment', 0) && ($uid == $post['uid'] || forum_access_mod($post['fid'], $gid, 'allowupdate')); $post['allowdelete'] = group_access($gid, 'allowuserdelete') && $uid == $post['uid'] || forum_access_mod($post['fid'], $gid, 'allowdelete'); $post['user_url'] = url('user-' . $post['uid'] . ($post['uid'] ? '' : '-' . $post['pid'])); if ($post['files'] > 0) { list($attachlist, $imagelist, $filelist) = well_attach_find_by_pid($post['pid']); // 使用图床 评论使用图床,mysql会过多,写死链接到内容是减轻mysql的过多的方法 if (2 == $conf['attach_on']) { foreach ($imagelist as $key => $attach) { $url = $conf['upload_url'] . 'website_attach/' . $attach['filename']; // 替换成图床 $post['message'] = FALSE !== strpos($post['message'], $url) && $attach['image_url'] ? str_replace($url, $attach['image_url'], $post['message']) : $post['message']; } } $post['filelist'] = $filelist; } else { $post['filelist'] = array(); } $post['classname'] = 'post'; } function comment_format_message(&$val) { global $conf; if (empty($val)) return; // 使用云储存 if (1 == $conf['attach_on'] && 1 == $val['attach_on']) { $val['message'] = str_replace('="upload/', '="' . file_path($val['attach_on']), $val['message']); } elseif (2 == $conf['attach_on'] && 2 == $val['attach_on']) { // 使用图床 list($attachlist, $imagelist, $filelist) = well_attach_find_by_tid($val['tid']); foreach ($imagelist as $key => $attach) { $url = $conf['upload_url'] . 'website_attach/' . $attach['filename']; // 替换成图床 $val['message'] = FALSE !== strpos($val['message'], $url) && $attach['image_url'] ? str_replace($url, $attach['image_url'], $val['message']) : $val['message']; } } else { $val['message'] = str_replace('="upload/', '="' . file_path($val['attach_on']), $val['message']); } //$val['message'] = stripslashes(htmlspecialchars_decode($val['message'])); } // 把内容中使用了云储存的附件链接替换掉 function comment_message_replace_url($pid, $message) { global $conf; if (0 == $conf['attach_on']) { $message = FALSE !== strpos($message, '="../upload/') ? str_replace('="../upload/', '="upload/', $message) : $message; $message = FALSE !== strpos($message, '="/upload/') ? str_replace('="/upload/', '="upload/', $message) : $message; } elseif (1 == $conf['attach_on']) { // 使用云储存 $message = str_replace('="' . $conf['cloud_url'] . 'upload/', '="upload/', $message); } elseif (2 == $conf['attach_on']) { // 使用图床 评论使用图床,mysql会过多,写死链接到内容是减轻mysql的过多的方法 list($attachlist, $imagelist, $filelist) = well_attach_find_by_pid($pid); foreach ($imagelist as $key => $attach) { $url = $conf['upload_url'] . 'website_attach/' . $attach['filename']; // 替换回相对链接 $message = $attach['image_url'] && FALSE !== strpos($message, $attach['image_url']) ? str_replace($attach['image_url'], $url, $message) : $message; } } return $message; } function comment_filter($val) { unset($val['userip']); return $val; } function comment_highlight_keyword($str, $k) { $r = str_ireplace($k, '' . $k . '', $str); return $r; } // //
function comment_message_format(&$s) { if (xn_strlen($s) < 100) return; $s = preg_replace('#.*?
#is', '', $s); $s = str_ireplace(array('
', '
', '
', '

', '', '', '', '' . ''), "\r\n", $s); $s = str_ireplace(array(' '), " ", $s); $s = strip_tags($s); $s = preg_replace('#[\r\n]+#', "\n", $s); $s = xn_substr(trim($s), 0, 100); $s = str_replace("\n", '
', $s); } // 对内容进行引用 function comment_quote($quotepid) { $quotepost = comment_read($quotepid); if (empty($quotepost)) return ''; $uid = $quotepost['uid']; $s = $quotepost['message']; $s = comment_brief($s, 100); $userhref = url('user-' . $uid); $user = user_read_cache($uid); $r = '
' . $user['username'] . ' ' . $s . '
'; return $r; } // 获取内容的简介 0: html, 1: txt; 2: markdown; 3: ubb function comment_brief($s, $len = 100) { $s = strip_tags($s); $s = htmlspecialchars($s); $more = xn_strlen($s) > $len ? ' ... ' : ''; $s = xn_substr($s, 0, $len) . $more; return $s; } ?>使用U盘安装Ubuntu 16.04 系统
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

使用U盘安装Ubuntu 16.04 系统

运维笔记admin37浏览0评论

使用U盘安装Ubuntu 16.04 系统

安装Ubuntu的方法有很多,本文介绍的是U盘安装Ubuntu的方法。

1、首先准备一个U盘,通常CD版2G就够了,而DVD版需要4G,插入U盘后,如果U盘中有文件,先拷贝出去,然后右键选择格式化。(切记,一定要把U盘中的文件备份好,一会安装的时候U盘还是会被格式化)

2、文件系统选择FAT32,勾选快速格式化,其它默认。

3、下载Ubuntu 系统文件,Ubuntu 官方镜像下载链接:
http://releases.ubuntu/16.04/

64位cpu:下载 ubuntu-16.04-desktop-amd64.iso
32位cpu:可以下载i386的版本
其中的,desktop是桌面版,server是服务器版,torrent是BT下载。

4、烧录Ubuntu系统,常见的有两种方法,使用UNetbootin和Universal USB Installer。
方法一:使用UNetbootin (亲测成功)

a、下载UNetbootin,无需安装直接运行。
下载地址:https://unetbootin.github.io/

根据你电脑目前的系统,选择下载,而不是你要装Ubuntu,就选择Linux下载。

b、选择光盘镜像,然后在右侧添加第3步下载的Ubuntu系统文件路径,类型选择USB驱动器,驱动器选择你的U盘,一定不要选择错误!然后点确定就开始烧录了。

c、UNetbootin正在烧录中,等一会

d、烧录好了,暂时先不要重启,点退出

方法二 :使用Universal USB Installer (没有亲测,不过应该没问题)

a、下载 Universal USB Installer ,无需安装,直接运行。下载链接:
https://www.pendrivelinux/universal-usb-installer-easy-as-1-2-3/

翻到网页中间,点击Download UUI 进行下载。

b、打开下载好的Universal USB Installer,选择第3步下载的本地Ubuntu系统路径

c、上面点击Creat后会列出一个步骤,可以不用管,点是即可

d、这部是把ISO镜像解压到一个临时目录,不用管,等待完成

e、正式开始烧录,大概5分钟左右,完成后会出现下图的Installation Done, Process is Complete,然后点Close关闭,U盘就烧录好了

4、把U盘插进你想装系统的电脑上,将U盘设置为第一启动盘。设置方式就是进入BIOS里面将里面的第一启动设置为U盘启动就可以了,不同品牌的电脑进入bios的方式也不同。

本文就说说惠普笔记本进入bios将第一启动设置为U盘启动的方法。
方法链接:https://jingyan.baidu/article/7f41ecec26ff1d593c095c61.html

别的品牌的设置方式,可以自行在网上搜索,很简单。

5、下面以第3步中的方法一,使用UNetbootin烧录为例,选择Install Ubuntu,上面的Try Ubuntu without installing是试用Ubuntu而又不安装,也就是俗话说的U盘系统,尝鲜可以点这个

6、开始安装了

7、在左侧找到自己的语言,中文在最下面,然后点继续

8、接下来是检查准备情况,要求磁盘空间足够,不要连接网络,一般不勾选更新和第三方软件,直接点“继续”按钮

9、接下来是询问安装到哪个分区,选择最下边的“其他选项”,点“继续”按钮

10、分区后,点“现在安装”,如果提示没有交换空间,点“继续”,这个是用于休眠的,大小跟内存相同的分区,内存大于2G了可以不用它

11、然后出来询问地区,点“继续”即可,修改地区可能会产生时差问题

12、接下来是键盘布局,一般是“汉语”,直接点“前进”继续

13、设置姓名、帐号、计算机名和密码

14、下面就开始安装了,点击左侧两册的半圆,可以看一些介绍

15、系统安装完成了,需要重启,点击现在重启

16、重启后,Ubuntu就算安装完毕了,下面是登录界面,输入你的密码

17、已经可以用了,下面是主界面,很漂亮,而且对配置要求很低

本文参考博客:https://blog.csdn/s634772208/article/details/78573486

发布评论

评论列表(0)

  1. 暂无评论