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;

 

上一篇:Centos7安装php5.6并配置php-fpm协同工作


下一篇:python项目报错 ERROR: 'gbk' codec can't decode byte 0xa1 in position 82: illegal multibyt