杜郎俊赏

debian部署

个人环境部署

apt-get install sudoapt-get install vimvim /etc/sudoers #增加 shagon ALL=(ALL:ALL) NOPASSWD:ALLsudo vim /etc/vim/vimrc#去掉 syntax on 前的注释set tabstop=4set softtabstop=4colorscheme desertvim /home/shagon/.ssh/authorized_keys#增加本地密钥#安装 oh-my-zshsudo apt-get install zshsudo apt-get install gitsh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"sudo apt-get install autojump#皮肤配置放入 /home/shagon/.oh-my-zsh/themesvim ~/.zshrc#增加配置alias l='ls -lahF --color=auto'alias ll='ls -lhF --color=auto'alias ls='ls -GF --color=auto'#禁止 root 远程密码登录vim /etc/ssh/sshd_configPermitRootLogin noPasswordAuthentication no#替换阿里云源vim /etc/apt/sources.listdeb http://mirrors.aliyun.com/debian stretch main contrib non-freedeb-src http://mirrors.aliyun.com/debian stretch main contrib non-freedeb http://mirrors.aliyun.com/debian stretch-updates main contrib non-freedeb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-freedeb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-freedeb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free#校准时间sudo apt-get install ntpdatesudo ntpdate -u cn.pool.ntp.org

web环境部署

sudo apt-get install nginxsudo apt-get install php7.0 php7.0-fpmsudo apt-get install redis-serversudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.6-1_all.debsudo dpkg -i mysql-apt-config_0.8.6-1_all.debsudo apt-get install mysql-server

其他工具部署

sudo apt-get install supervisor

禁用 swap

sudo vim /etc/sysctl.conf#添加vm.swappiness=0sudo vim /etc/fstab#将 swap 所在行注释掉

取消开机菜单

sudo vim /etc/default/grubGRUB_DEFAULT=0GRUB_HIDDEN_TIMEOUT=0GRUB_HIDDEN_TIMEOUT_QUIET=trueGRUB_TIMEOUT=0sudo update-grub

标签:开发
日期:2017-10-30