Ubuntu18.04下搭建LAMP环境
1、Apache2 web 服务器的安装 : 可以先更新一下服务器 sudo apt-get update # 获取最新资源包 sudo apt-get upgrade # 本机软件全部更新 sudo apt-get dist-upgrade # 本机系统软件更新 PS: 1. 问题详细提示如下: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is an other process using it? 2. 解决方案 2.1 首先查看是否有apt-get这个程序在运行 ps aux|grep apt-get 2.2 如果发现存在这样的程序在运行那么就kill掉,否则执行2.3 2.3 直接删除锁文件 sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock 安装Apache sudo apt install apache2 -y 检查是否开启Apache,一般安装完会默认开启。 systemctl