zoukankan      html  css  js  c++  java
  • Ubuntu下安装apache2,mysql,php,wordpress.

    【unbuntu系统环境】

    3.2.0-generic-pae  GNU/Linux

    ====================

    mysql的安装很简单,就不多说了.

    提前新建一个数据库db_wordpress为wordpress做准备.

    image

    ====================

    *******第一步【apache2】

    sudo apt-get install apache2

    安装完成后重启:

    sudo /etc/init.d/apache2 restart

    (下图已经安装过后,没有检测到更新的情况.)

    image

    或者

    sudo service apache2 restart

    (重启成功后,右下角有提示.)

    image

    如果重启失败,可能是端口号已用,或者是不能绑定ip的,复制错误信息,自己百度,

    这里给出几个错误信息的解决方法:

    0.ubuntu 下安装apache服务器

    http://www.cnblogs.com/xilifeng/archive/2012/10/16/2726856.html

    1.apache启动报错(98)Address already in use: make_sock: could not bind to...

    http://blog.csdn.net/huihzzwpx/article/details/6907065

    2.当apache2重启提示:

    * Starting web server apache2  
    apache2: Could not reliably determine the server's fully qualified domain name,
    ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

    解决的问题是:

    sudo vim /etc/apache2/sites-available/default

    打开default文件后,在default文件顶端加入:

    ServerName 127.0.0.1

    重启apache2 就不会提示上述错误了。

    3.重新启动系统.(懒得杀死进程的童鞋可以使用.)

    *******第二步【php】

    /*安装php5*/

    sudo apt-get install php5               

    /*安装php的其他模块*/

    sudo apt-get install libapache2-mod-php5   //配置php和apache

    sudo apt-get install libpache2-mod-auth-mysql //apache支持mysql

    sudo apt-get install php5-mysql      //myslq连接

    sudo apt-get isntall php5-gd   //GD库.

    /*安装phpMyAdmin*/

    sudo apt-get install phpMyAdmin

    phpAdmin需要选择两次:

    1.服务器,这里当然是选择apache2.

    2.用户,密码.     ┛

    (部分截图如下.)

    image image

    image image

    *******第三步【wordpress】

    下载wordpresss安装包.

    解压到 /var/www (apache的服务器目录)

    然后打开浏览器,输入localhost/wordpress后安装提示,一步就安装成功.

    image 

    =======================

    安装成功后:

    localhost/wordpress   如下

    image localhost/index.php  如下

    image localhost/phpmyadmin 如下

    image

    下面的参考资料介绍的比较详细,有问题就搜搜下来,然后把遇到的问题总结下,记录下来。OK,That's all.

    【参考资料】

    1.

    Ubuntu下LAMP(linux+apache+mysql+php)环境的配置与安装

    http://wenku.baidu.com/view/05e8e84f2e3f5727a5e962e7.html

    2.

    linux下搭建属于自己的博客(WordPress安装)

    http://www.cnblogs.com/xiaofengkang/archive/2011/11/16/2251608.html

    3.

    Ubuntu搭载PHP环境(安装MySQLApachephpMyAdminWordPress)

    http://wenku.baidu.com/view/ba8a32a6284ac850ad024251.html

  • 相关阅读:
    检查型异常(Checked Exception)与非检查型异常(Unchecked Exception)
    maven跳过单元测试-maven.test.skip和skipTests的区别
    java JFR
    Docker常用命令
    关键字group by 、 Having的 用法
    css特效
    sql
    初识Hibernate之理解持久化类
    Hibernate 搭建
    基本 SQL 之增删改查
  • 原文地址:https://www.cnblogs.com/xilifeng/p/2737712.html
Copyright © 2011-2022 走看看