centos7安装搭建部署iTop管理系统并集成一键shell脚本
一、系统准备阶段1. 系统更新与基础工具
# 更新系统并安装必要工具
yum update -y
yum install -y epel-release wget curl unzip vim git
2. 禁用SELinux(生产环境建议单独配置)
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
二、LAMP环境部署
1. Apache安装
yum install -y httpd
systemctl start httpd
systemctl enable httpd
2. MariaDB安装
yum install -y mariadb-server mariadb
systemctl start mariadb
systemctl enable mariadb
3. PHP 7.4安装(需Remi仓库)
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php74
yum install -y php php-mysqlnd php-gd php-ldap php-xml php-mbstring php-json php-cli php-soap php-zip
三、数据库配置
1. 安全加固MySQL
mysql_secure_installation
页:
[1]