月度归档:2018年11月

Mysql彻底卸载重装

sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/log/mysql
sudo rm -rf /var/log/mysql.*
sudo rm -rf /var/lib/mysql
sudo apt-get install mysql-server --fix-missing --fix-broken

laravel使用php-redis和prefix防止redis键名冲突

首先需要安装 php-redis

apt install php-redis

config/database.php 中,修改 redisclientphpredis,并在 default 中添加 prefix => env('REDIS_PREFIX', ''),

最后在 .env 中配置 REDIS_PREFIX 即可实现隔离。

但是,直接使用 redis 要比使用 php-redis 效率更高。

设置浏览器地址栏URL前面显示的图标

大小16*16,颜色不要超过16色

<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="Shortcut Icon" href="/favicon.ico"  type="image/x-icon" />
<link rel="Bookmark" href="/favicon.ico" type="image/x-icon" />

Fix E: Could not get lock /var/cache/apt/archives/lock

Problem:

The other day a reader asked me that she had troubles with this kind of error:

E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

She was trying to follow one of the tips mentioned in things to do to after installing Ubuntu 14.04 when she encountered this error. Its one of the common occurring update errors in Ubuntu and also one of the least annoying ones.

继续阅读

Fix apt-get update “the following signatures couldn’t be verified because the public key is not available”

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C

apt打包系统有一组可信任的密钥,用于确定是否可以对软件包进行身份验证,从而确认是否可以在系统上安装软件包。有时系统没有所需的所有密钥并遇到此问题。幸运的是,有一个快速解决方案。需要将列为缺失的每个密钥添加到apt密钥管理器,以便它可以对软件包进行身份验证。

看看上面的错误,apt告诉我们缺少以下键:4F4EA0AAE5267A6C

要添加这些密钥,请运行以下命令:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C

vmware 安装 macos

下载懒人包

下载macOS S 10.14 懒人版安装镜像,下载后检查文件信息,如果有新版,可以自行下载最新版:
以下网盘里的文件均是我成功安装过的(由于可能被BD封,以下链接将会只在本文更新):
https://pan.baidu.com/s/1bptBH9P
下面是部分来源,可供参考(论坛打不开的找BD贴吧找找,这里不便明说):
10.11.3 http://bbs.pcbeta.com/viewthread-1670823-1-1.html
10.11.4 http://bbs.pcbeta.com/viewthread-1681877-1-1.html
10.11.5 http://bbs.pcbeta.com/viewthread-1691822-1-1.html
10.11.6 http://bbs.pcbeta.com/viewthread-1702723-1-1.html
10.12.1 http://bbs.pcbeta.com/viewthread-1724437-1-1.html
10.12.2 http://bbs.pcbeta.com/viewthread-1729052-1-1.html
10.12.3 http://bbs.pcbeta.com/viewthread-1732448-1-4.html
10.12.4 http://bbs.pcbeta.com/viewthread-1736680-1-1.html
10.12.5 http://bbs.pcbeta.com/viewthread-1741950-1-3.html
10.12.6 http://bbs.pcbeta.com/viewthread-1750558-1-1.html
10.13    http://bbs.pcbeta.com/viewthread-1760460-1-1.html
10.13.5 http://bbs.pcbeta.com/viewthread-1787663-1-1.html
10.14    http://bbs.pcbeta.com/viewthread-1795372-1-2.html

解除 vmware 的安装限制

克隆 DrDonk/unlocker 项目到本地后,关闭所有 vmware 软件,运行 sudo ./lnx-install.sh

继续阅读

windows系统开启无密码访问共享资源的方法

  1. 确认网络连接,IP地址,网段
  2. 允许「文件和打印机共享」通过防火墙,或关闭防火墙
  3. 「右击我的电脑 – 计算机管理 – 系统工具 – 本地用户和组 – 用户」,右侧「Guest」设「账户已禁用」为「不勾选」
  4. 修改「组策略」
    1. 开始 – 运行,输入 gpedit.msc
    2. 「计算机配置 – Windows 设置 – 安全设置 – 本地策略 – 用户权限分配」,右则「拒绝从网络访问这台计算机」中,移除「Guest」账号
    3. 「计算机配置 – Windows 设置 – 安全设置 – 本地策略 – 安全选项」,右侧「网络访问:本地账户的共享和安全模型」中,设为「仅来宾」;「账户:使用空密码的本地账户只允许进行控制台登录」设为「已禁用」