Ubuntu安装mysql
1、安装mysql
#此命令直接安装最新版mysql8.0
sudo apt-get install mysql-server
2、查看默认用户及密码
cat /etc/mysql/debian.cnf
user =debian-sys-maint
password =s8hjWltF0W2EBU32
3、登录该用户
mysql -u debian-sys-maint -p
use mysql;
update user set plugin = 'mysql_native_password' where user = 'root';
alter user 'root'@'localhost' identified by 'wo990414';
flush privileges;
exit
service mysql restart
mysql -u root -pwo990414
4、修改访问权限
select user,host from user;
update user set host='%' where user='root';
exit
service mysql restart
5、修改配置文件,支持远程访问
vim /etc/mysql/mysql.conf.d/mysqld.cnf
...
bind-address = 0.0.0.0
mysqlx-bind-address = 0.0.0.0
...
service mysql restart
6、防火墙放行3306端口
ufw enable
ufw status
ufw allow 3306
ufw reload
7、服务器安全组添加3306规则,便可远程连接服务器的数据库了
Ubuntu安装jdk8
1、执行安装命令
apt-get install openjdk-8-jdk
java -version
Ubuntu安装nginx1.22.1
apt-get install nginx
1、编辑配置文件
http{
...
server{
listen 6868;
server_name localhost;
}
...
}
2、重启nginx服务器
service nginx restart
2、防火墙放行6868端口
ufw allow 6868
3、服务器安全组添加3306规则
Ubuntu启动nacos
ufw allow 8848
ufw reload
bash startup.sh -m standalone
标签:Ubuntu,MySQL,nacos,nginx,user,mysql,安装,ufw
From: https://www.cnblogs.com/lbao/p/17564185.html