# 1.基础环境
systemctl stop firewalld && systemctl disable firewalld
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
init 6
yum install -y yum-utils device-mapper-persistent-data lvm2 wget net-tools nfs-utils lrzsz gcc gcc-c++ make cmake libxml2-devel openssl-devel curl curl-devel unzip sudo ntp libaio-devel wget vim ncurses-devel autoconf automake zlib-devel python-devel epel-release openssh-server socat ipvsadm conntrack ntpdate telnet ipvsadm
2.mysql
#添加 MySQL Yum 存储库
wget https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
yum install -y mysql80-community-release-el7-5.noarch.rpm
#安装mysql
yum repolist all | grep mysql
yum-config-manager --enable mysql57-community
yum-config-manager --enable mysql57-community-source
yum-config-manager --disable mysql80-community
yum install mysql-community-server -y
#启动myqsl
systemctl enable mysqld --now #设置为开机自启并现在启动
grep 'temporary password' /var/log/mysqld.log #查看临时密码
mysql -uroot -p #登陆
alter user 'root'@'localhost' identified by '123456Qqw!'; #修改密码
set global validate_password_policy=0;
set global validate_password_length=0;
alter user 'root'@'localhost' identified by '000000';
GRANT ALL PRIVILEGES ON *.* TO 'iTop'@'%' IDENTIFIED BY '123456';
FLUSH PRIVILEGES;
#迁移数据盘
mkdir -p /data/mysql
systemctl stop mysqld
cp -a /var/lib/mysql /data/mysql/
cd /etc
cp my.cnf my.cnfbak
vim /etc/my.cnf
datadir=/data/mysql/mysql
systemctl start mysqld
mysql -uroot -p000000
show variables like '%dir%';
+-----------------------------------------+----------------------------+
| Variable_name | Value |
+-----------------------------------------+----------------------------+
| basedir | /usr/ |
| binlog_direct_non_transactional_updates | OFF |
| character_sets_dir | /usr/share/mysql/charsets/ |
| datadir | /data/mysql/mysql/ |
| ignore_db_dirs | |
| innodb_data_home_dir | |
| innodb_log_group_home_dir | ./ |
| innodb_max_dirty_pages_pct | 75.000000 |
| innodb_max_dirty_pages_pct_lwm | 0.000000 |
| innodb_tmpdir | |
| innodb_undo_directory | ./ |
| lc_messages_dir | /usr/share/mysql/ |
| plugin_dir | /usr/lib64/mysql/plugin/ |
| slave_load_tmpdir | /tmp |
| tmpdir | /tmp |
+-----------------------------------------+----------------------------+
15 rows in set (0.00 sec)
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.7.37, for Linux (x86_64) using EditLine wrapper
4.apache
yum install -y httpd && systemctl enable httpd --now
5.php
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
yum repolist all | grep php
yum-config-manager --enable remi-php74
yum -y install php php-dom php-xml php-gd php-mysqli php-soap php-mbstring php-zip php-ldap
yum install -y graphviz
6.itop
wget https://sourceforge.net/projects/itop/files/itop/3.0.0/iTop-3.0.0-8663.zip --no-check-certificate
unzip iTop-3.0.0-8663.zip -d /var/www/html/itop
chown -R apache:apache /var/www/html/itop
yum install -y graphviz
systemctl restart httpd
浏览器访问根据引导页面安装