环境配置
Posted gh-123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了环境配置相关的知识,希望对你有一定的参考价值。
一。 装完centos6.x后,配置静态ip,参照 https://www.cnblogs.com/GH-123/p/8516474.html
二。永久修改主机名
1. 打开配置文件
[[email protected] ~]# vim /etc/sysconfig/network
2. 修改配置如下
NETWORKING=yes HOSTNAME=host1 # host1 为主机名
三. 修改主机名和IP的映射关系
1. 修改配置文件
[[email protected] ~]# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.20.0.101 host1 # ip 和 主机名
10.20.0.102 host2
10.20.0.103 host3
2. 重启服务,重新登录,主机名生效
[[email protected] ~]# service network restart
[[email protected] ~]#
四. 关闭防火墙iptables
1.关闭防火墙
[[email protected] ~]# service iptables stop iptables:将链设置为政策 ACCEPT:filter [确定] iptables:清除防火墙规则: [确定] iptables:正在卸载模块: [确定] [[email protected] ~]#
2. 关闭防火墙开机启动
[[email protected] ~]# chkconfig iptables off
3.查看防火墙开机启动状态
[[email protected] ~]# chkconfig iptables --list iptables 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
五。关闭selinux
1. 打开配置文件
[[email protected] ~]# vim /etc/sysconfig/selinux
2. 设置SELINUX为disabled
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted
六。安装jdk
1. 下载jdk,官网下载: http://www.oracle.com/technetwork/java/index.html
[[email protected] ~]# rpm -ivh jdk-8u181-linux-x64.rpm [[email protected] ~]# java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) [[email protected] ~]#
七。 配置ssh免登陆, 参考 https://www.cnblogs.com/GH-123/p/7965852.html
以上是关于环境配置的主要内容,如果未能解决你的问题,请参考以下文章
全栈编程系列SpringBoot整合Shiro(含KickoutSessionControlFilter并发在线人数控制以及不生效问题配置启动异常No SecurityManager...)(代码片段