Loading

邢栋博客

“服务器笔记“

Mac系统实现git命令补全

1、先安装brew,安装过的可以忽略 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2、安装bash-completion brew install bash-completion 3、系统配置 下载此文件 https://github.com/git/git/blob/master/contrib/completion/git-completion.bash 然后复制到家目录 cp ...

mac命令行终端显示当前git分支

vim ~/.bash_profile,写入以下内容 function git_branch { branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`" if [ "${branch}" != "" ];then if [ "${branch}" = "(no branch)" ];then branch="(`git rev-parse --short HEAD`...)" fi echo " ($branch)" fi...

阿里云服务器执行df和du查看磁盘结果不一致

lsof | grep deleted (如果lsof命令不存在,执行yum install lsof进行安装) 我这里执行后,显示都是nginx相关进程 于是我执行 nginx -s reload 如果不行,可以执行 killall nginx; nginx -c /usr/local/nginx/conf/nginx.conf

linux查看某个进程的安装目录

1.获取到进程号 ps aux|grep php-fpm 得到php-fpm的master进程的id号是10100 2.查看安装目录 ll /proc/10100/exe

centos7下gcc升级

下载地址 https://ftp.gnu.org/gnu/gcc/ 下载gcc和相关依赖 wget https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.gz tar -zxvf gcc-5.4.0.tar.gz cd gcc-5.4.0 ./contrib/download_prerequisites //相关依赖 建立存放编译文件的文件夹+编译 mkdir gcc-build-5.4.0 cd gcc-build-5.4.0/ ../configure --prefix=/usr/local/gcc5...

centos7下安装gitlab问题总结

问题:执行 systemctl start postfix Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details. 解决方法 vim /etc/postfix/main.cf myhostname = mail.flycoder.cn mydomain = fl...

centos7下安装gitlab并修改访问端口

官网安装说明 https://about.gitlab.com/install/#centos-7 1.第一步 sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld 2.第二步 sudo yum install post...

nginx中fastcgi_param参数说明

fastcgi_param QUERY_STRING $query_string; #请求的参数;如?app=123 fastcgi_param REQUEST_METHOD $request_method; #请求的动作(GET,POST) fastcgi_param CONTENT_TYPE $content_type; #请求头中的Content-Type字段 fastcgi_param CONTENT_LENGTH $content_length; #请求头中的Content-length字段。...

nginx负载均衡 - 根据url做一致性hash

实现前奏 目标:按照指定的参数(如分类/商品编号)做一致性hash,从而保证相同数据到一台机器上 先说下nginx里$request_uri和$uri的区别 $request_uri This variable is equal to the original request URI as received from the client including the args. It cannot be modified. Look at $uri for the post-rewrite/altered URI. Does not include ho...

php+nginx+mysql+apache查看其编译参数

查看nginx编译参数:/usr/local/nginx/sbin/nginx -V 查看php编译参数:/usr/local/php/bin/php -i | grep configure 查看mysql编译参数:cat /usr/local/mysql/bin/mysqlbug | grep CONFIGURE_LINE //待纠正 查看apache编译参数:cat /usr/local/apache2/build/config.nice //待认证