1.通过命令进行定位
find /etc -name "host*" -type f
#vim /etc/hosts
2.关闭防火墙
systemctl stop firewalld # 先临时关闭防火墙
systemctl disable firewalld # 再永久关闭防火墙
# 临时关闭
getenforce # 查看状态(0表示关闭 1表示开启)
setenforce 1/0 # 表示开启/关闭
# 永久关闭
vim /etc/selinux/config
# 修改
SELINUX=disabled
3.linux下修改dns的方法
vim /etc/resolv.conf
nameserver 223.5.5.5
nameserver 119.23.23.23
4.linux_centos(修改环境变量)
1.echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
2.环境变量配置文件:
vim ~/.bash_profile # 用户环境变量控制文件
vim /etc/profile # 系统环境变量控制文件
注意: 一定要将python3的目录放在第一位!!!!!!
注意: 一定要将python3的目录放在第一位!!!!!!
注意: 一定要将python3的目录放在第一位!!!!!!
3.为了永久生效path设置,添加到/etc/profile全局环境变量配置文件中
vim /etc/profile
在最后一行加入:
PATH=/opt/python36/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
4.重载配置文件/etc/profile
source /etc/profile ##因为修改了文件,需要重新刷新下
5.mariadb安装,修改配置
vim /etc/my.cnf
完成中文显示问题
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
log-error=/var/log/mysqld.log
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8