摘要: 1、apache和PHP结合 修改httpd主配置文件/usr/local/apache2.4/conf/httpd.cnf编辑以下内容,在修改前,需要先在iptables上放行80端口 1.设置ServerName,取消本行注释。若注释本行,则在启动httpd服务时,则会产生如下告警,取消注释本行 阅读全文
posted @ 2018-08-01 22:06 wangshuai614 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 1、安装PHP5 进入/usr/local/src/目录下,下载PHP安装包,目前主流版本是5.6/7.1,现在用的比较多的还是版本5 然后执行tar zxvf进行解压缩 执行./configure进行编译 ./configure --prefix=/usr/local/php --with-apx 阅读全文
posted @ 2018-07-31 22:07 wangshuai614 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1、Maria DB安装 安装方法与mysql进行安装 下载完成后执行tar zxvf进行解压 然后执行mv maria=10.2.6-linux-glibc_214-x86_64 /usr/local/mariadb 进入到该目录下,创建用户和data目录/data/mariadb 执行./scr 阅读全文
posted @ 2018-07-30 22:30 wangshuai614 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1、LAMP架构介绍 LAMP=Linux+apache+mysql+php apache(httpd)是web服务软件 mysql是存储应用,存储数据字符串等内容 php是脚本语言 apache、mysql和php开在同一台机器上,也可以分开(httpd和php要在一起) 2、mysql_mari 阅读全文
posted @ 2018-07-29 22:49 wangshuai614 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1、rsync通过服务同步 rsync通过服务同步,需要监听端口873(可以自定义端口号),开启端口以后,客户端就可以通过873端口与服务器通信 服务端配置 在开启服务之前,要编辑配置文件/etc/rsyncd.conf,将下图中的内容添加到配置文件中,建议将path=/root/rsync修改为p 阅读全文
posted @ 2018-07-19 21:22 wangshuai614 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1、rsync同步工具 同步可以实现增量的拷贝,只将更新的文件拷贝到指定目录 rsync -av /etc/passwd /tmp/1.txt将passwd同步到/tmp/下,并重命名为1.txt rsync -av /etc/passwd root@192.168.1.1:/tmp/1.txt将p 阅读全文
posted @ 2018-07-18 20:25 wangshuai614 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1、linux任务计划cron cat /etc/crontab 查看任务计划的配置文件 crontab -e 进入crontab的配置文件中,按“i”进入编辑模式 每天三点指定脚本123.sh,并将正确输出和错误输出分别记录到相应的日志文件中 偶数月1到10号中的周二和周五的三点指定脚本123.s 阅读全文
posted @ 2018-07-16 21:05 wangshuai614 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1、iptables规则备份和恢复 service iptables save 讲规则保存在/etc/sysconfig/iptables中 iptables-save > /tmp/my.ipt将iptables规则备份到my.ipt文件中 iptables-restore < /tmp/my.i 阅读全文
posted @ 2018-07-15 20:36 wangshuai614 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1、iptables案例 查看iptables规则:iptables -nvL iptables -F:清空规则 services iptables save:保存规则 iptables -t nat:指定表 iptables -Z:把所有计数器清零 iptables -nvL --line-num 阅读全文
posted @ 2018-07-15 19:43 wangshuai614 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1、linux网络相关 ifconfig查看网卡ip(yum install -y net-tools) ifconfig -a显示所有网卡信息,包括down状态的网卡信息 ifup ens33/ifdown ens33启动和关闭网卡,关闭以后网卡不会显示IP,当单独针对某个网卡进行更改时,可以只对 阅读全文
posted @ 2018-07-11 22:14 wangshuai614 阅读(183) 评论(0) 推荐(0) 编辑