1、Google的BBR
sysctl net.ipv4.tcp_available_congestion_control
sudo vim /etc/sysctl.conf
在末尾添加下面两行
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
保存退出
重启reboot
检查是否配置成功
lsmod | grep bbr
2、修改ulimit
sudo vim /etc/security/limits.conf
root soft nofile 65535
root hard nofile 65535
root soft noproc 65535
root hard noproc 65535
ulimit -n 65535
ulimit -a
3、创建一个1个G的SWAP交换区空白文件
dd if=/dev/zero of=/swap bs=1M count=10000
mkswap -f /swap
swapon /swap
#-f 使用文件作为swap交换区
启用刚才创建的Swap文件
swapon /swap
如果有必要可以设置开机自动启用swap文件交换区,修改/etc/fstab,增加一行
/swap swap swap defaults 0 0 #启动即启用swap
如果不需要启用swap或需要调整swap大小,可以使用swapoff命令关闭swap。
swapoff /swap
4、安装nvm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
nvm install v8.11.4
node -v
npm -v
5、安装MYSQL
(1)安装MySQL
a、安装服务端
sudo apt-get install mysql-server
b、设置root用户
sudo passwd
c、安装客户端
sudo apt-get install mysql-client
d、查看MySQL是否安装成功
sudo netstat -tap | grep mysql
(2)配置远程访问
a、编辑配置文件
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 将bind-address = 127.0.0.1注释
b、修改用户权限
登录MySQL:mysql -u root -p --远程访问 mysql -h 192.168.0.201 -P 3306 -u root -p123 123为root用户密码
用户权限:grant all on *.* to root@'%' identified by '1'; --添加一个用户名是root且密码是1的远程访问用户
刷新:flush privileges;
查看是否添加成功:select user,host,authentication_string from user; --在5.7中用户密码是列authentication_string
退出:quit
c、重启MySQL服务
/etc/init.d/mysql restart
MySQL卸载:
1、sudo apt-get autoremove --purge mysql-server-5.0
2、sudo apt-get remove mysql-server
3、sudo apt-get autoremove mysql-server
4、sudo apt-get remove mysql-common --这个很重要
5、dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P -- 清除残留数据