月度归档: 2019 年 1 月

  • MacOS XAMPP 目录权限设置 图文教程

    MacOS XAMPP 目录权限设置 图文教程

    XAMPP集成了PHP开发环境所需要的Apache和Mysql等基础组件。但是系统自带的根目录为/Applications/XAMPP/htdocs。有时候我们希望把网站根目录换成我们自定义的目录文件夹。可通过以下方式来实现

    • 1 打开 应用程序->XAMPP->xamppfiles->etc->httpd.conf 文档
    • 2 commond+f搜索htdocs,搜到如下结果:
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    <Directory "/Applications/XAMPP/xamppfiles/htdocs">
    
    • 3 修改DocumentRoot和Directory中的路径为你想要的路径,两个的路径要一样

    在Mac中有些文件夹是只对本机用户有读写权限,如果是服务器去访问这样的文件夹的话会显示forbidden。例如:在安装WordPress时无法写入配置文件 wp-config.php 等权限问题。解决方法如下:

    • commond + f搜索User/Group,搜到如下结果
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    User daemon
    Group daemon
    

    修改User为你的用户名。以此来获取读写权限

  • MacOS 连接 Windows远程桌面 Microsoft Remote Desktop for Mac 下载 图文教程

    MacOS 连接 Windows远程桌面 Microsoft Remote Desktop for Mac 下载 图文教程

    我们在MacOS中连接Windows服务器的话以前比较麻烦下载很多的工具,这里记录微软官方给的连接工具,以防止下次使用找不到。

    微软官网说明 Get started with Remote Desktop on Mac

    https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-mac

    下载工具 Microsoft Remote Desktop for Mac

    https://rink.hockeyapp.net/apps/5e0c144289a51fca2d3bfa39ce7f2b06/

  • MAC OS下切换默认终端为zsh 图文教程

    MAC OS下切换默认终端为zsh 图文教程

    mac os 系统默认的终端为bash,切换默认终端为zsh,可以用以下命令

    chsh -s /bin/zsh

    如过要切回默认终端bash则使用以下命令

    chsh -s /bin/bash
  • MacOS homebrew 加速设置 图文教程

    MacOS homebrew 加速设置 图文教程

    方法一

    brew用curl下载,所以给curl挂上socks5的代理即可。

    在~/.curlrc文件中输入代理地址即可。

    socks5 = "127.0.0.1:1080"

    方法二:替换源

  • 搬瓦工bandwagonhost VPS忘记续费VPS被Suspended 怎么办?

    搬瓦工bandwagonhost VPS忘记续费VPS被Suspended 怎么办?

    有些朋友的搬瓦工VPS 在生成续费账单以后并没有及时支付,然后加上忙或者其他事情,可能忽然想起来账单还没支付的时候,VPS已经是Suspended的状态了。这时候不要慌,Suspended状态只是暂停,你的VPS还没有被Cancel,只要在Cancel以前支付了账单,VPS就会被重新激活,如果Cancel了。那就彻底完蛋了。

    再来说一下搬瓦工续费的机制。搬瓦工是在VPS到期的当天自动生成一个账单(automatically send a new invoice on the renewal date)。然后你有七天的时间来支付这个账单,这7天VPS是可以正常使用的,如果七天以后还没有支付,VPS就会变成Suspended状态( you will have 7 days to pay the due invoice. After 7 days of non-payment the service will be suspended.)。

    而从Suspended到Cancel还有个几天的时间,在Cancel前,VPS还是可以再抢救一下的。

    当然,如果怕忘了续费,可以提前充值到搬瓦工的账户,到续费的时候就会自动支付了。

WeChat
↑