Mac重装系统一些常用工具raybet雷竞技网页版入口小记,记录重装某些软件时遇到的问题,方便下次重装的时候查阅

raybet雷竞技网页版入口Agnoster-fcamblor

下载raybet雷竞技网页版入口

# 1.下载主题
git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor
# 2.raybet雷竞技网页版入口主题
cd oh-my-zsh-agnoster-fcamblor
./install

vim ~/.zshrc
ZSH_THEME="agnoster-fcamblor"

PIPraybet雷竞技网页版入口Powerline-status

执行pip install powerline-status可能会报错信息如下:

#片段
error: [Errno 1] Operation not permitted: u'/System/Library/Frameworks/Python.framework/Versions/2.7/bin/powerline'

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/5x/fyxcdxsn6_30jt9q6272hrjm0000gn/T/pip-build-FdR_Of/powerline-status/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/5x/fyxcdxsn6_30jt9q6272hrjm0000gn/T/pip-N2Hl1q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/5x/fyxcdxsn6_30jt9q6272hrjm0000gn/T/pip-build-FdR_Of/powerline-status/

只需要在raybet雷竞技网页版入口的时候加上--user就行了

$ pip install --user powerline-status

Vim使用Powerline-status

 set rtp+=/Library/Python/2.7/site-packages/powerline/bindings/vim/
 set laststatus=2
 set t_Co=256

Nginx配置

Ningx运行过程中经常会遇到权限不足的问题解决方法

$ vim /usr/local/etc/nginx/nginx.conf

修改#user nobody修改为user root owner记住root后面的owner要不然会报403

Nginx中PHP-FPM配置

/usr/local/etc/nginx中新建php-fpm文件内容如下:

location ~ \.php$ {
        try_files                   $uri = 404;
        fastcgi_pass                127.0.0.1:9000;
        fastcgi_index               index.php;
        fastcgi_intercept_errors    on;
        include /usr/local/etc/nginx/fastcgi.conf;
 }  

servers中添加conf以laravel为例:vim servers/laravel.conf添加内容:

server {
    listen       80;
    server_name  fengkong.local;
    root         /Users/csi0n/Docker/www/risk-control-system/public;

    access_log  /usr/local/var/log/nginx/fengkong_local_access.log;

    location / {
        index  index.html index.htm index.php;
    try_files $uri $uri/ /index.php?$query_string;
        autoindex   on;
        include     /usr/local/etc/nginx/php-fpm;
    }

    error_page  404     /404.html;
    error_page  403     /403.html;
}

Docker Mysql报错

修改docker-compose.yml在mysql下添加user: "1000:50" OK.

Docker Redis报错

 MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

执行docker-compose exec redis bash进入工作空间 执行redis-cli进入redis执行config set stop-writes-on-bgsave-error no