转载

安装php环境

执行如下命令安装apache2的php5扩展和php的mysql扩展
apt-get install libapache2-mod-php5 php5-gd php5-mysql php5-curl php5-mcrypt php5-common php-apc
如下提示:
root@241541:~# apt-get install libapache2-mod-php5 php5-gd php5-mysql php5-mcrypt php5-common php-apc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgd2-xpm libjpeg62 libt1-5 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6
  libxpm4 php5-cli php5-common php-apc
Suggested packages:
  php-pear libgd-tools php5-suhosin
The following NEW packages will be installed:
  libapache2-mod-php5 libgd2-xpm libjpeg62 libt1-5 libx11-6 libx11-data
  libxau6 libxcb1 libxdmcp6 libxpm4 php5-cli php5-common php5-gd php5-mysql php5-mcrypt
0 upgraded, 15 newly installed, 0 to remove and 26 not upgraded.
Need to get 8128kB of archives.
After this operation, 22.7MB of additional disk space will be used.
Do you want to continue [Y/n]?
输入 Y,回车继续,以下表示安装完成。 重新启动apache2, 输入如下命令:
/etc/init.d/apache2 restart
提示如下,表示启动成功: root@241541:~# /etc/init.d/apache2 restart * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 0.3.175.133 for ServerName [ OK ]  
正文到此结束
Loading...