1. LAMP 的安装 在终端下执行
$ sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
2.配置apache环境
2.1 .在/home/下创建 apache/etc/ apache/www 两个路径
$ cd /home/
$ mkdir apache
$ cd /apache
mkdir etc
mkdir www
2.2 .同时从/etc/apache2下的 sites-available/ sites-enabled/ 两个目录下的所有文件拷贝到/home/apache/etc/下(配置虚拟路径)
cd /etc/apache2
$ cp -R sites-available /home/apache/etc
$ cp -R sites-enabled /home/apache/etc
2.3 .修改apache2.conf配置文件
$ sudo vim /etc/apache2/apache2.conf
# Include the virtual host configurations:
Include /home/apache/etc/sites-enabled/
3.安装phalcon框架
3.1 安装git 和 php5-dev:
$ sudo apt-get install git-core gcc autoconf
$ sudo apt-get install php5-dev
3.2 .下载和安装phalcon:
$ cd ~/下载/
$ git clone git://github.com/phalcon/cphalcon.git
$ cd cphalcon/build
$ sudo ./install
3.3 .编辑php.ini 添加phalcon.so
$ sudo vim /etc/php5/apache2/php.ini
extension=phalcon.so #添加phalcon.so扩展
*3.4 .添加phalcon规则 .htaccess
$ vim /home/apache/etc/sites-available/项目名
AllowOverride None None改为 All (改两处);
4.安装phpmyadmin 下载地址 http://dl.pconline.com.cn/html_2/1/86/id=4670&pn=0.html
$ cd ~/下载/
wget http://dl.pconline.com.cn/html_2/1/86/id=4670&pn=0.html
4.1 .处理下载文件 重命名为phpmyadmin
$ cd ~/下载/
$ cp -R phpmyadmin /home/apache/www/
4.2 .配置phpmyadmin的软连接
4.2.1 .创建虚拟主机
$ sudo vim /etc/hosts
127.0.0.1 phpmyadmin
4.2.2 .编辑phpmyadmin
$ cd /home/apache/etc/sites-available
$ cp default phpmyadmin
$ vim phpmyadmin
#本段不要复制主要是修改 ServerName phpmyadmin,DocumentRoot 和
ServerName phpmyadmin
DocumentRoot /home/apache/www/phpmyadmin
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
4.2.3 .建立连接
$ cd /home/apache/etc/sites-enabled
$ ln -s ../sites-available/phpmyadmin,
4.2.4 .重启apache
$ sudo apache2ctl graceful;