1、 sudo apt-get install apache2 //安装命令
2、 sudo vim /etc/apache2/apache2.conf //修改配置文件
文件末尾添加ServerName localhost
3、 http://localhost //本机浏览器测试
4 apache2 服务器基本命令
service apache2 status 查看apache2是否启动
service apache2 stop 停止
service apache2 restart 重启
service apache2 start 启动
5 默认的网站根目录的路径为/var/www/html
缓存文件 cd ~
cd .cache/ 缓存文件夹
tomcat 启动 关闭 查询
systemctl start tomcat
systemctl stop tomcat
systemctl status tomcat