ubuntu安装apache2 mysql5 php5

1、安装apache2

  1. apt-get install -y apache2

2、安装mysql5

  1. apt-get install -y mysql-server

3、安装php5

  1. apt-get install -y php5 libapache2-mod-php5 php5-mysql

4、安装更多php5模块

  1. apt-cache search ^php5

得到以下列表模块:

[……]
php5-mcrypt – MCrypt module for php5
php5-cli – command-line interpreter for the php5 scripting language
php5-common – Common files for packages built from the php5 source
php5-curl – CURL module for php5
php5-gd – GD module for php5
[……]

执行安装命令:

  1. apt-get install -y php5-mcrypt php5-cli php5-common php5-curl php5-gd

5、管理命令

apache2:/etc/init.d/apache2 start(stop|restart|reload)
mysql: /etc/init.d/mysql start(stop|restart|reload)

6、配置文件

apache2:/etc/apache2
php5:/etc/php5/apache2
mysql5:/etc/mysql/

标签:UbuntuPHPApacheMySQL 发布于:2019-11-22 20:40:05