lamp部署itop3.0

该博客详细介绍了如何在CentOS7系统上搭建LAMP环境,并配置MySQL数据库,包括安装、启动、设置密码以及权限分配。此外,还涉及到了数据盘的迁移。同时,文章也提到了Apache的安装与启动,以及PHP的安装,特别地,提到了启用Remi仓库以安装PHP7.4。最后,文章讲述了如何下载并安装ITop,一个IT服务管理应用,用于监控和管理IT基础设施。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# 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
浏览器访问根据引导页面安装
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值