栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

lamp+itop

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

lamp+itop

1.基础环境
systemctl stop firewalld && systemctl disabled firewalld                                 
setenforce 0                                                                             
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config                       
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 存储库
yum install -y wget
wget https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
yum install -y  mysql80-community-release-el7-5.noarch.rpm
ls /etc/yum.repos.d/ | grep mysql
 mysql-community.repo
 mysql-community-source.repo
#安装mysql 
yum install -y yum-utils
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 repolist all | grep mysql
yum install  mysql-community-server -y
#启动myqsl
systemctl enable mysqld --now  $设置为开机自动激活单元并现在立刻启动
grep 'temporary password' /var/log/mysqld.log $查看临时密码
mysql -uroot -peUfYiaqly3(N  $登陆
alter user 'root'@'localhost' identified by '997998Hhj!'; $修改密码
#迁移数据盘
mkdir -p /home/data/mysql
systemctl stop mysqld
cp -a /var/lib/mysql   /home/data/mysql/
cd /etc
cp my.cnf my.cnfbak
vim /etc/my.cnf
  datadir=/home/data/mysql/mysql
systemctl start mysqld
mysql -uroot -p997998Hhj!
mysql> show variables like '%dir%';
+-----------------------------------------+----------------------------+
| Variable_name                           | Value                      |
+-----------------------------------------+----------------------------+
| basedir                                 | /usr/                      |
| binlog_direct_non_transactional_updates | OFF                        |
| character_sets_dir                      | /usr/share/mysql/charsets/ |
| datadir                                 | /home/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
3.mysql备选

docker

yum-config-manager 
    --add-repo 
    https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y    
systemctl enable docker --now && systemctl status docker
vim /etc/docker/daemon.json
{
 "registry-mirrors":["https://rsbud4vc.mirror.aliyuncs.com","https://registry.docker-cn.com","https://docker.mirrors.ustc.edu.cn","https://dockerhub.azk8s.cn","http://hub-mirror.c.163.com","http://qtid6917.mirror.aliyuncs.com", "https://rncxm540.mirror.aliyuncs.com"]
}
systemctl daemon-reload && systemctl restart docker && systemctl status docker

mysql

docker run -d -p 3306:3306 --restart=always -v /data/mysql/data:/var/lib/mysql -v /data/mysql/logs:/logs -v /data/mysql/conf:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=997998 --hostname mysql -v /etc/localtime:/etc/localtime --name mysql mysql

docker exec -it mysql /bin/bash
mysql -uroot -p997998
grant all PRIVILEGES on *.* to root@'%' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY '997998' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '997998';
create database itop;
create user 'itop'@'%' identified by 'itopitop';
grant all PRIVILEGES on *.* to itop@'%' WITH GRANT OPTION;
ALTER USER 'itop'@'%' IDENTIFIED BY 'itopitop' PASSWORD EXPIRE NEVER;
ALTER USER 'itop'@'%' IDENTIFIED WITH mysql_native_password BY 'itopitop';
FLUSH PRIVILEGES;
exit
exit
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-config-manager --enable remi-php73
yum -y install php graphviz php-gd php-mysqlnd php-imap php-soap php-ldap php-mbstring php-mcrypt php-pecl-zendopcache
yum install -y php-dom php-xml php-zip

6.itop
unzip iTop-3.0.0-8663.zip -d /var/www/html/itop
chown -R apache:apache /var/www/html/itop
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/748014.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号