Ubuntu 14.04 Install LAMP Manual

来源:互联网 发布:围巾材质分类 知乎 编辑:程序博客网 时间:2024/05/22 11:58

Ubuntu 14.04 install LAMP:

1、apt-get  install  apache2

2、apt-get  install mysql-server

3、apt-get  install  php5  libapache2-mod-php5


第一步安装apache完成后启动时,会出现" AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message"的错误,解决方法:在/etc/apache2/apache2.conf文件中添加"ServerName locahlost:80"即可解决。如果重启发现80端口被占用,可能和apache2.conf同目录下的ports.conf文件中的端口有关,


第二步有时会出现问题,提示:Depends: mysql-server-5.5 but it is not going to be installed

直接安装mysql-server-5.5有时也会提示错误,所以直接使用如下命令一起安装就行了:

apt-get install mysql-client-5.5 mysql-server-5.5

有时会出现initctl:Unknown job:mysql错误,结果到/etc/init.d/下可以启动mysql,所以需要使用initctl reload-configuration,如果还不行,则需要在命令前加sudo(root用户前也需要加)

0 0
原创粉丝点击