检查IP地址:ip addr 如果没有显示ip地址则执行命令: service network restart 重启network网卡 service NetworkManager stop 关闭网卡 chkconfig NetworkManager off 永久关闭 Manager网卡 检查IP是否开启: 如果IP地址不对则进入IP地址的目录 cd /etc/sysconfig/network-scripts/ 之后修改IP地址 vim ifcfg-ens33
------------------------------------------------------------------------ 确认能否用Windows连上Linux的地址用在windows中cmd: ping 192.168.126.129(Linux中的地址) 无丢失则正常了
将JDK文件放在当前目录 进行解压命令:tar -zxvf jdk-8u51-linux-x64.tar.gz 在当前目录下配置Linux中JDK环境变量: vim /etc/profile 之后再刷新jdk环境: source /etc/profile
命令:
1. 启动命令 [root@localhost src]# systemctl start mariadb 2. 重启命令 [root@localhost src]# systemctl restart mariadb 3. 关闭命令 [root@localhost src]# systemctl stop mariadb命令:mysql_secure_installation
Enter current password for root (enter for none): #这里输入数据库超级管理员root的密码(注意不是系统root的密码),如果这是第一次进入还没有设置密码则直接回车
Set root password? [Y/n]:y New password:设置新密码 Re-enter new password:再次输入密码
Remove anonymous users? [Y/n]:移除匿名用户,y
Disallow root login remotely? [Y/n]:拒绝root远程登录,n,不管输入y/n,都会拒绝root远程登录
Remove test database and access to it? [Y/n]:是否删除test数据库,n
Reload privilege tables now? [Y/n]:重新加载权限表,y
初始化完成:
命令:mysql -u root -p
执行命令:source /usr/local/src/jtdb.sql;
检查命令:firewall-cmd --state
关闭:systemctl stop firewalld.service
systemctl start firewalld.service
firewall-cmd --list-porsts
firewall-cmd --query-port 80/tcp
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --remove-port=9090/tcp --permanent
–zone #作用域 –add-port=80/tcp #添加端口,格式为:端口/通讯协议 –remove-port=80/tcp #移除端口,格式为:端口/通讯协议 –permanent #永久生效,没有此参数重启后失效
firewall-cmd --reload
切换到mysql数据库 查询user表中host/root/password 将host=“localhost” 改为 “%” 刷新数据库权限
