美文网首页我爱编程
ubuntu linux搭建lamp环境

ubuntu linux搭建lamp环境

作者: 张老三168 | 来源:发表于2018-05-19 20:14 被阅读0次

1.安装Mysql服务端和客户端

sudo apt-get install mysql-server mysql-client

2.安装apache服务器

sudo apt-get install apache2

3.安装php,apache中php的扩展,mysql中php的扩展

sudo apt-get install php
sudo apt-get install libapache-mod-php
sudo apt-get install php-mysql

这里需要指定apache mysql php的版本

4.修复apache配置文件

5.重启apache,mysql命令

  • 关闭apache /etc/init.d/apache2 stop
  • 开启apache /etc/init.d/apache2 start
  • 重启apache /etc/init.d/apache2 start

6.解决mysql允许远程登录问题

修改mysql配置文件中bind-adress的绑定

#bind-address           = 127.0.0.1 #可以改成绑定的IP 或者直接把mysqld.conf这段配置注释掉

修改登录用户的权限

mysql> grant all PRIVILEGES on *.* to root@'%' identified by '123456';
Query OK, 0 rows affected, 1 warning (0.00 sec)

6.python2.7切换3.5

https://www.cnblogs.com/yifugui/p/8649864.html

相关文章

网友评论

    本文标题:ubuntu linux搭建lamp环境

    本文链接:https://www.haomeiwen.com/subject/jjxfdftx.html