kohana(3.2)和gleez(1.1.5)的安装

来源:互联网 发布:免费杀毒软件for mac 编辑:程序博客网 时间:2024/06/05 08:47

*保证在kohanna的环境下安装gleez

一、配置虚拟主机(即添加端口:例如localhost:801)

以http://www.gleezcms.com为例

1: cd /etc/apache2/sites-available
 cp default  gleezcms

2.sudo gedit /etc/apache2/sites-available/gleezcms

<VirtualHost *:803>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/gleezcms
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    <Directory /var/www/gleezcms>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride All
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/gleezcms.error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/gleezcms.access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

3:sudo gedit /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80//默认制定80端口,如过不指定的话
Listen 80
NameVirtualHost *:801//添加801端口,
Listen 801
NameVirtualHost *:803//添加803端口
Listen 803
<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

4:sudo a2ensite  gleezcms(以sudo权限执行)

jack@jack-System-Product-Name:~$ sudo a2ensite  gleezcms
Site gleezcms already enabled

5:sudo a2enmod rewrite(以sudo权限执行)

jack@jack-System-Product-Name:~$ sudo a2enmod rewrite
Module rewrite already enabled

6:sudo service apache2 reload(以sudo权限执行)
sudo service apache2 reload
 * Reloading web server config apache2             

大公告成:(继续给gleezcms/application权限)

1.sudo  chmod  777 /var/www/gleezcms/application/ -R

jack@jack-System-Product-Name:~$ cd /var/www/gleezcms/application
jack@jack-System-Product-Name:/var/www/gleezcms/application$ ls -l
总用量 28
-rwxrwxrwx 1 jack jack 5144  6月  3  2014 bootstrap.php
drwxrwxrwx 2 jack jack 4096  6月  3  2014 cache
drwxrwxrwx 2 jack jack 4096 10月 26 12:01 config
drwxrwxrwx 3 jack jack 4096 10月 26 12:01 logs
drwxrwxrwx 3 jack jack 4096 10月 26 12:01 media
drwxrwxrwx 2 jack jack 4096  6月  3  2014 uploads

2.给(gleezcms/media)权限

sudo chmod 777 /var/www/gleezcms/media/ -R

 

注意:在安装gleez前,提前在mysql里先建好一个gleezcms的数据库:

然后访问:localhost:803就可以看到安装页面了(一定要指定端口)。

最后一路next,先连接数据库,数据会自动生成在(gleezcms/application/config/database.php的配置文件)有个登录帐号和密码记住然后登录,根据情况修改自己的密码。

0 0