2020-06-07 17:21:28
1、关闭firewall:
systemctl stop firew
alld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、安装iptables防火墙(#可不安装)
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
//配置文件:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
//:wq! #保存退出
关闭 SELINUX
vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
:wq! #保存退出
setenforce 0 #使配置立即生效
yum install httpd #根据提示,输入Y安装即可成功安装
systemctl start httpd.service #启动apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重启apache
systemctl enable httpd.service #设置apache开机启动
yum install mariadb mariadb-server
//#询问是否要安装,输入Y即可自动安装,直到安装完成
systemctl start mariadb.service #启动MariaDB
systemctl stop mariadb.service #停止MariaDB
systemctl restart mariadb.service #重启MariaDB
systemctl enable mariadb.service #设置开机启动
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
//拷贝配置文件(注意:如果/etc目录下面默认有一个my.cnf,直接覆盖即可)
mysql_secure_installation
systemctl restart mariadb.service
//主程序
yum install php
//安装模块
yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash
systemctl restart mariadb.service #重启MariaDB
systemctl restart httpd.service #重启apache
//主程序
sudo yum install phpmyadmin php-mcrypt
//修改配置文件
vi /etc/httpd/conf.d/phpMyAdmin.conf
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
systemctl restart httpd #重启httpd
CentOS 7.0安装配置LAMP服务器(Apache+PHP+MariaDB)
05-06
CentOS 7安装MariaDB 10详解以及相关配置
04-19
CentOS 7.2安装配置MariaDB Galera Cluster(10.1.21-MariaDB) 三主集群环境
05-13
CentOS7安装配置PostgreSQL数据库服务器
06-20
在Apache服务器使用mod_rewrite模块重定向URL
04-28
CentOS 6安装LAMP
03-16
Zabbix3.0监控Apache2.4服务器状态
07-17
Debian 7 (Wheezy)安装配置Apache mod_fastcgi PHP-FPM
07-20
TR260 G2服务器内存DIMM安装配置和内存插的槽分布
06-23
Ubuntu 14.04安装Pritunl VPN服务器(带控制面板)
06-09
ubuntu安装mongodb数据库服务器
05-29
CentOS 7编译安装及yum安装Python 3
06-15
CentOS7源码编译安装Nginx
06-11
Linux smbd Samba服务器程序命令详解
06-28
T168 G7服务器板载Intel 82574L和82579LM网卡指示灯状态说明
06-30
T270 G5服务器liunx系统运行过程报“nautilus崩溃”错误的原因?
07-18
搭建自己的git服务器
07-08
Apache mod_alias设置路径别名
06-22
Apache优化:修改最大并发连接数
05-01
Apache禁止访问目录列出文件列表
07-22
服务器安全工具下载
329.2K
下载BIGEMAP离线地图服务器下载
48.9M
下载C-Lodop云打印服务器(云打印工具)v4.115官方版
9.3M
下载Titan FTP Server(SFTP服务器软件) v19.00.3537 免费版
50.1M
下载tomcat7.0 (Web 应用服务器)官方版
9.3M
下载xp iis(Web服务器)6.0 中文版
13.4M
下载护卫神主机大师(服务器软件) v3.2 最新版
222MB
下载深蓝群Ping工具 V2.1 绿色版 多服务器多线程群ping工具
487 KB
下载Apache Logs Viewer(Apache日志分析工具) v5.0.0.42
22.98 MB
下载PHP开发工具(PHP程序开发软件) V7.3.3.0 中文版
22.56 MB
下载360安全桌面 v2.8.0.1001 官方安装版
42.53M
下载3d蓝光播放器(高清3D影音播放软件) V1.8.0.4 绿色免安装版
36.8 MB
下载editplus3中文版 (附安装教程) v3.41
1.41M
下载securecrt(SSH远程终端服务软件) v9.0 破解版
67.7MB
下载tftpd32(网络服务包) V32.452 官方版
0.52MB
下载word字体(word字体服务软件) 2021 免费版
225MB
下载矮人DOS工具箱 V5.3 Bulid 6.713 安装版
9.01M
下载硬盘安装器下载
17.35 MB
下载系统之家一键重装系统(系统自动安装工具)12.5.48.1830 最新版
28.4M
下载驱动总裁最新绿色免安装版 2.6.0.0 最新版
287.73M
下载