1、右键点虚拟机名称--设置--网络适配器--桥接模式
2、修改网卡配置文件,让虚拟机开机自动获取IP
# cd /etc/sysconfig/network-scripts/
# vim ifcfg-ens33
ONBOOT=yes #将=后面的no改成yes
# service network restart #重启网络
3、安装软件
# yum install httpd php mariadb-server php-mysql -y
4、修改apache配置文件,在以下行增加index.php
# vim /etc/httpd/conf/httpd.conf
青蛙吃苍蝇游戏项目
1、密钥:150105-116578-999990
2、yum install httpd -y
出现的问题一:“book is not in the sudoers file”
解决办法:
1.切换到超级用户:$ su
2.打开/etc/sudoers文件:$vim /etc/sudoers
3.修改文件内容:
找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,内容是“hadoop ALL=(ALL) ALL”,然后在vim键入命令“:wq!”保存并退出。
注:这个文件是只读的,不加“!”保存会失败。
4.退出超级用户:$ exit
出现的问题二:Existing lock /var/run/yum.pid: another copy is running as pid 10947.
解决办法:rm -f /var/run/yum.pid
3、mv qingwacangying.zip /var/www/html
出现的问题三:无法用xftp连接到Linux服务器
解决办法:把ftp换成sftp就可以了
4、cd /var/www/html
5、unzip qingwacangying.zip
6、启动apache服务
systemctl start httpd
7、关闭防火墙
systemctl stop firewalld
8、关闭selinux
setenforce 0
1、yum install httpd mariadb-server php php-mysql -y
2、安装lamp架构。其余步骤同上。
第三天:
create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@localhost identified by 'zabbix';
flush privileges;
cd /usr/share/doc/zabbix-server-mysql-3.4.15/
gzip -d create.sql.gz
mysql -u zabbix -pzabbix -h localhost -D zabbix < create.sql
vim /etc/zabbix/zabbix_server.conf
#cat /etc/zabbix/zabbix_server.conf | grep ^DB
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
vim /etc/httpd/conf.d/zabbix.conf
修改20行 php_value date.timezone Asia/Shanghai
systemctl start zabbix-server.service
systemctl start zabbix-agent.service
用户名:Admin
密码:zabbix
被监控端:
rpm -i zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent -y
vim /etc/zabbix/zabbix_agent.conf
Server=192.168.6.20(监控端ip)
ServerActive=192.168.6.20(监控端ip)
Hostname=web1(被监控端主机名)