Ubuntu搭建LAMP环境的详细步骤

2024-10-13 21:57:30

1、安装Apache2,apt-get update更新源之后,切换到管理员root

Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤

2、安装PHP模块,apt-get install php5 -y 如下图:

Ubuntu搭建LAMP环境的详细步骤

3、安装Mysql 数据库 apt-get install mysql-server和mysql-client

Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤

4、安装 其他模块 libapache2-mod-php5、libapache2-mod-auth-myql、 php5-mysql、 php5-gd 如下图:

Ubuntu搭建LAMP环境的详细步骤

5、测试Apache是否正常工作,打开浏览器,输入IP地址192.168.31.207,看看是否有It Works!网页展示。

Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤

6、修改权限/var/www sudo chomod 777 /var/www

Ubuntu搭建LAMP环境的详细步骤

7、安装phpmyadmin,sudo apt-get install phpmyadmin安装过程中选择apache2,点击确定。下一步选择是要配置数据库,并输入密码。

Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤

8、测试phpmyadmin, ln -s/usr/share/phpmyadmin/var/www然后直接运行http://ip地址/phpmyadmin,看有没有数据库管理软件出现。

Ubuntu搭建LAMP环境的详细步骤Ubuntu搭建LAMP环境的详细步骤
猜你喜欢