1.ubuntu 修改系统默认语言为英文
(1)修改配置文件
vim /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LC_ALL="en_US.UTF-8"
(2)修改完毕,重启系统即可
reboot
2.VMware 虚拟机NAT网络模式设置
3.安装vim工具:
apt install vim
4.ubuntu自动安装mysql脚本
#!/bin/bash
#将mysql二进制包上传到/tmp目录
#卸载/清理残余
dpkg --list|grep mysql
apt-get remove mysql-common
#安装依赖:
apt-get install libmecab2
apt-get install libaio*
#创建基目录:
mkdir /usr/local/mysql
#创建组和用户
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
#授权
chmod 750 /usr/local/mysql
chown -R mysql. /usr/local/mysql
#解压:
tar -xvf /tmp/mysql* -C /usr/local/mysql
#安装mysql:
/usr/bin/dpkg -i --force-overwrite /usr/local/mysql/mysql-common_*.deb
/usr/bin/dpkg -i --force-overwrite /usr/local/mysql/mysql-community-client_*.deb
/usr/bin/dpkg -i --force-overwrite /usr/local/mysql/mysql-client_*.deb
/usr/bin/dpkg -i --force-overwrite /usr/local/mysql/mysql-community-server_*.deb
/usr/bin/dpkg -i --force-overwrite /usr/local/mysql/mysql-server_*.deb
#修改密码和创建远程连接用户
mysql -e "UPDATE mysql.user SET authentication_string = PASSWORD('Malimei@123') WHERE user = 'root' AND host = 'localhost';"
mysql -e "update mysql.user set plugin = 'mysql_native_password' where user = 'root' and host='localhost';"
mysql -e "create user 'root'@'%' IDENTIFIED BY 'Malimei@123';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;"
mysql -e "flush privileges;"
#修改配置文件bind地址
sed -i.bak 's#127.0.0.1#0.0.0.0#g' /etc/mysql/mysql.conf.d/mysqld.cnf
#重启数据库
/etc/init.d/mysql restart
mysql -uroot -p'Malimei@123' -e "show databases;"