MacOS 不像 Linux 有 /etc/init.d/rc.local 以及 service 的方式可以自动启动。而是使用 plist 文件,文件里描述程序路径和启动参数,用户登录后就会启动这个程序,而且pkill进程以后,程序会自动重启。plist文件分布在:/System/Library/LaunchDaemons # 是用户未登陆前就启动的服务(守护进程) /System/Library/LaunchAgents # 由Mac OS X为用户定义的任务项 /Library/LaunchDaemons # 由管理员定义的守护进程任务项 /Library/Launc
admin 2021-10-18 macOS 884
SSH 密码登录#!/usr/bin/expect -f set password "123456" set timeout -1 spawn ssh user@xxx.xxx.xxx.xx expect "*assword:*" send "$password\r" expect "Last*" interact SSH 证书登录#!/usr/bin/expect -f set password "123456" set timeout -1 spawn ssh -i /Users/user/Cert/id_rsa user@xxx.xxx.xxx.xx -p 3002
admin 2021-05-06 macOS 649
macOS 安装 nginxbrew install nginx cp nginx.conf.default nginx.conf cd www.conf.default www.conf 安装PHP 参考:https://javascript.net.cn/articles/582找到PHP的位置/usr/local/php7 修改 ~/profilePATH="/usr/local/php7/bin:/usr/local/php7/sbin:$PATH" 开启php-fpm 关闭 php-fpmsudo killall php-fpm 如果遇到上传文件权限不够nginx open() cl
admin 2020-11-09 macOS 837
列出历史记录defaults read /Users/ice/Library/Preferences/com.apple.Terminal.plist PreviousCommands 删除历史记录defaults delete /Users/ice/Library/Preferences/com.apple.Terminal.plist PreviousCommands
admin 2020-08-19 macOS 781
简单调用在mac的命令行下面,执行:say hello world 就可以发出"hello world"的声音了,支持中文。文字转为语音新建一个文本文件aa.txt,在终端里在,cd 到该目录,然后执行:say -f aa.txt -o a.m4a 即可生成a.m4a这个语音文件。 -f 后面跟的是需要转换成语音的文件,-o 是 -out 的意思。修改语音声音打开系统偏好设置->辅助功能->语音参考:https://jingyan.baidu.com/article/48b37f8d23eaa61a64648813.htmlhttps://newsn.net/say/mac-command
admin 2020-08-11 macOS 1294
1,macOS QQ 聊天记录文件位置~/Library/Containers/com.tencent.qq/Data/Library/Application Support/QQ 2,Apache 和 PHP 位置PHP 位置 /usr/local/php5Apache 位置 /usr/local/opt/httpdApache 配置文件 /usr/local/etc/httpdApache 重启 sudo apachectl restart3, Xcode 删除过程3.1.根目录下的必须要用管理员权限:sudo rm -rf /Applications/Xcode.app sudo
admin 2020-04-14 macOS 795
一,问题描述在使用SSH连接远程服务器的时候,如果长时间不操作,再次进入 Terminal 时就会有卡死一段时间没有响应。等待一段时间以后,会发现以下错误提示:Write failed: Broken pipe这表示连接管道已经断开,所以只能重进行连接。二,解决方法方法一:客户端配置在客户端的 ~/.ssh/config文件(如不存在请自行创建)中添加下面内容:ServerAliveInterval 60方法二:服务器端配置在服务器的 /etc/ssh/sshd_config 中添加如下的配置:ClientAliveInterval 60方法三:临时SSH命令配置如果只是临时性的连接(即只作用
admin 2020-03-19 macOS 900
macOS自带的PHP没有freetype扩展,需要自己安装。之前使用 https://php-osx.liip.ch/#install 安装PHP。 现在系统升级到 macOS Mojave后。提示:[WARNING] Detected macOS Mojave 10.14. There are serious issues with it, due to the original apache not loading foreign libraries anymore. PHP within apache will most certainly not work anymore if
admin 2019-06-02 macOS 1053
macOS截图默认是png格式,修改为jpg格式: 调出终端 defaults write com.apple.screencapture type jpg
admin 2019-04-02 macOS 822
macOS如何使用终端管理MySQL 一,添加环境变量 打开配置文件,~/.bash_profile 添加一下内容。 # 设置MySQL MYSQL_HOME=/usr/local/mysql PATH=$PATH:$MYSQL_HOME/bin .bash_profile是用户级环境变量,https://javascript.net.cn/article?id=496 二,删除MySQL匿名用户 mysql select host,user from user;  +------------------------+------+ | host        
admin 2019-03-07 macOS 804
Jone
在什么样的花园里面,挖呀挖呀挖
种什么样的种子,开什么样的花
随机推荐
WP_Query 函数
Git 放弃本地修改,强制和之前的某次提交同步
MySQL 字符串截取函数 SUBSTRING_INDEX
什么是 RESTful API 的幂等性
WordPress 的用户角色和权限
WordPress 用户信息
Wordpress 主样式表(style.css)
get_categories() 获取所有分类
JavaScript 中的数据类型自动转换为 Boolean 状态
二分查找法

微信联系我

夜间模式切换
回到顶部