安装Webmin

———————————————————– 
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config 
setenforce 0

rpm -ivh http://elrepo.org/linux/elrepo/el7/x86_64/RPMS/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm 
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm

yum -y install wget nano perl perl-Net-SSLeay rsync dd_rescue net-tools vim lsof gcc gcc-c++ net-tools bind-utils bzip2 htop glances iftop iotop

wget http://sourceforge.net/projects/webadmin/files/webmin/1.730/webmin-1.730-1.noarch.rpm/download 
rpm -Uvh download 
yum clean all 
rm -rf download 
————————————————————

service firewalld stop

防火墙firewall用法参考:

https://fedoraproject.org/wiki/FirewallD/zh-cn

http://www.tuicool.com/articles/vMr6Vj

————————————————————-

安装后登录报错:

Require package-updates/install_check.pl failed :

Died at (eval 162) line 1

解决:

yum install perl-Data-Dumper

参考:http://sourceforge.net/p/webadmin/discussion/600155/thread/f4661878/

————————————————————-

更新系统

yum update

yum upgrade

安装net-tools工具包

yum install net-tools -y

查看系统打开的端口和程序

netstat -lntp

查看系统

cat /etc/redhat-release

查看内核

uname –a

 

设置网络信息

nano /etc/sysconfig/network-scripts/ifcfg-eno*

———————————————————–

HWADDR="00:0C:29:A6:94:B8"

TYPE="Ethernet"

BOOTPROTO="static"

DEFROUTE="yes"

PEERDNS="yes"

PEERROUTES="yes"

IPV4_FAILURE_FATAL="no"

IPV6INIT="yes"

IPV6_AUTOCONF="yes"

IPV6_DEFROUTE="yes"

IPV6_PEERDNS="yes"

IPV6_PEERROUTES="yes"

IPV6_FAILURE_FATAL="no"

NAME="eno16777736"

UUID="9753d72d-26b9-47d4-ba27-befed2ab271d"

ONBOOT="yes"

IPADDR0=192.168.0.37

GATEWAY0=192.168.0.5

NETMASK0=255.255.252.0

————————————————————–

IPADDR0=192.168.0.36

NETWORK0=192.168.0.0

GATEWAY0=192.168.0.5

NETMASK0=255.255.252.0

BROADCAST0=192.168.3.255

IPADDR1=192.168.0.37

NETWORK1=192.168.0.0

GATEWAY1=192.168.0.5

NETMASK1=255.255.252.0

BROADCAST1=192.168.3.255

DNS1=223.6.6.6

DNS2=8.8.8.8

——————————————————–

 

重启网络

service network restart

停止防火墙

service firewalld stop

注:系统默认没有安装iptables,在7版本中默认的防火墙是firewalld。

查看地址

ip a

ip addr

注:原ifconfig命令已经弃用。

设置主机名

原在/etc/sysconfig/network不再使用,也无效;

命令设置:

hostname 主机名

nano /etc/hostname

nano /etc/hosts

CentOS7开始使用firewalld为默认防火墙,可以手动修改为iptables防火墙;

关闭firewalld

systemctl stop firewalld.service

systemctl disable firewalld.service

安装iptables防火墙

yum install iptables-services

重启防火墙

systemctl restart iptables.service

设置开机启动

systemctl enable iptables.service

关闭SELINUX

nano /etc/selinux/config

SELINUX=disabled

不修改配置直接生效

setenforce 0

系统服务与启动配置都在

/usr/lib/systemd/system

/etc/systemd/system

 

安装lamp环境

参考:http://www.osyunwei.com/archives/7882.html