一、linux所有命令失效
解决办法:重新设置环境变量PATH
export PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin
二、比较混杂的命令
1.后台启动jar包
nohup java -jar jar包名字 &
2.启动mysql
systemctl start mysqld
3.查看所有进程
ps aux | less
4.杀死进程
kill -9 (reids)
5.make: *** No rule to make target build', needed by
default’. Stop.
解决Centos7 解决安装Nginx编辑make && make install的不成功
make: *** No rule to make target build', needed by
default’. Stop.
解决方案
1、安装下面配置
yum -y install make zlib-devel gcc-c++ libtool openssl openssl-devel
2、重新configure
./configure
3、编译
make && make install
6.删除本行数据: dd
7.查看进程是否启动
ps -ef | grep 进程名
8.删除文件
rm -rf 删除的文件名
9.重启nginx
./nginx -s reload
三、搭建nacos集群
1.访问nginx:localhost:80
2.访问nacos,从nginx进入:localhost:80/nacos
四、修改权限
chmod 777 mycat
五、防火墙
# 开启
service firewalld start
# 重启
service firewalld restart
# 关闭
service firewalld stop
4、查看防火墙规则
firewall-cmd --list-all
5、查询、开放、关闭端口
# 查询端口是否开放
firewall-cmd --query-port=8080/tcp
# 开放80端口
firewall-cmd --permanent --add-port=80/tcp
# 移除端口
firewall-cmd --permanent --remove-port=8080/tcp
#重启防火墙(修改配置后要重启防火墙)
firewall-cmd --reload