ubuntu 16.04 搭建lamp的苦逼经历

本文详述了一位用户在Ubuntu 16.04上搭建LAMP(Linux, Apache, MySQL, PHP)环境的过程,包括Apache和PHP的安装,MySQL的设置,phpmyadmin的安装以及解决依赖问题和配置问题。过程中遇到了apparmor和mysql残余文件导致的问题,最终通过安装包和调整配置成功完成搭建。" 127977901,12221298,PLSQL六表联合查询实现项目文书统计,"['数据库开发', 'SQL查询', '数据统计', 'PL/SQL']
摘要由CSDN通过智能技术生成

大致流程:

apache安装:

edemon@linux:~$ sudo apt install apache2

php安装:

edemon@linux:~$ sudo apt install php7.0-cli
……
Creating config file /etc/php/7.0/cli/php.ini with new version

mysql安装:

edemon@linux:~$ sudo apt install mysql-server
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.12, use –force if you still need to run mysql_upgrade
Setting up mysql-server (5.7.12-0ubuntu1) …

其他模块:

edemon@linux:~$ sudo apt-get install libapache2-mod-php7.0

检测php:

edemon@linux:~$ cat /etc/apache2/mods-enabled/php7.0.load
# Conflicts: php5
LoadModule php7_module /usr/lib/apache2/modules/libphp7.0.so

测试并开启服务:

edemon@linux:~ sudoservicemysqlrestarted

从mysql官网上下载mysql-server_5.7.21-1ubuntu14.04_amd64.deb-bundle.tar,然后进行离线安装,解压该安装包,会出现11个依赖包,按照顺序依次使用sudo dpkg -i 进行安装,中间会报错,显示缺少相应的依赖,具体如下: *******@ubuntu:/opt/mysql$ sudo dpkg -i mysql-community-client_5.7.21-1ubuntu14.04_amd64.deb Selecting previously unselected package mysql-community-client. (Reading database ... 208518 files and directories currently installed.) Preparing to unpack mysql-community-client_5.7.21-1ubuntu14.04_amd64.deb ... Unpacking mysql-community-client (5.7.21-1ubuntu14.04) ... dpkg: dependency problems prevent configuration of mysql-community-client: mysql-community-client depends on libaio1 (>= 0.3.93); however: Package libaio1 is not installed. dpkg: error processing package mysql-community-client (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Errors were encountered while processing: mysql-community-client 和 ********@ubuntu:/opt/mysql$ sudo dpkg -i mysql-community-server_5.7.21-1ubuntu14.04_amd64.deb Selecting previously unselected package mysql-community-server. (Reading database ... 208598 files and directories currently installed.) Preparing to unpack mysql-community-server_5.7.21-1ubuntu14.04_amd64.deb ... Unpacking mysql-community-server (5.7.21-1ubuntu14.04) ... dpkg: dependency problems prevent configuration of mysql-community-server: mysql-community-server depends on libmecab2 (>= 0.996-1.1); however: Package libmecab2 is not installed. dpkg: error processing package mysql-community-server (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Errors were encountered while processing: mysql-community-server 附上依赖包安装顺序: 1.mysql-common_5.7.21-1ubuntu14.04_amd64.deb 2.libmysqlclient20_5.7.21-1ubuntu14.04_amd64.deb 3.libmysqlclient-dev_5.7.21-1ubuntu14.04_amd64.deb 4.libmysqld-dev_5.7.21-1ubuntu14.04_amd64.deb
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值