数据库
首页 > 数据库> > Linux Centos7.4 下安装 LAMP环境及配置(php5.6,mysql5.7)

Linux Centos7.4 下安装 LAMP环境及配置(php5.6,mysql5.7)

作者:互联网

Data Center
11.11.11.11
root / password
远程连接密码: password

rm -f /var/run/yum.pid

 


httpd -v

service mysqld start

yum -y install httpd

yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

systemctl enable httpd.service

yum install epel-release

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof

php --version

yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm

yum install php-gd

yum install php-gd --enablerepo=remi-php56

yum install php-gd

cd /usr/local/src

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

rpm -ivh mysql57-community-release-el7-11.noarch.rpm

yum install -y mysql-server

systemctl start mysqld

/bin/systemctl start mysqld.service

ps aux|grep mysqld

systemctl enable mysqld

cat /var/log/mysqld.log|grep 'A temporary password' 【/var/log/mysqld.log】 password

mysql -u root -p

use mysql;

alter user 'root'@'localhost' identified by 'password';


ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
flush privileges;


GRANT ALL PRIVILEGES ON *.* TO 'db_user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;

 

标签:mysql5.7,remi,LAMP,yum,install,enablerepo,mysqld,php,Centos7.4
来源: https://www.cnblogs.com/denghuachengle/p/10423737.html