Ubuntu 安装 eyeOS
eyeOS是一个超酷的在线OS,界面是非常的漂亮,不过,现在有很多的在线OS,但我选择eyeOS的一个最重要的原因是它完全开发源代码!啊,开源真是伟大!
贴个图:
注意了哦,这可是全部在浏览器中的哦~~
下面介绍如何在本地安装eyeOS:
1.
首先在http://www.eyeos.org/open-source/download/下载eyeOS的最新版,我的是eyeos2.5
2.
启动apache,把eyeos2.5解压后放在apache的web目录中,我的是/usr/local/apache2/htdocs
注意,在下面的操作中,你要时刻sudo apachectl restart重启apache,来使配置生效!
3.
浏览器:http://localhost/eyeos-2.5/index.php
一般情况下会出现下面几个错误:
错误:Fatal error: Call to undefined function mb_strlen()
解决:重新编译了php源码,在configure的时候额外加上--enable-mbstring=all,然后重启apache:sudo apachectl restart
不过又出现问题了:
There is an error in this eyeOS installation, please contact the system administrator
不急,慢慢解决:
现在开始在mysql中创建所需的数据库和表:
首先进入mysql,创建database:
create database myeyeos;
然后,退出mysql,顺序执行如下命令(-D 参数表示指定数据库):
mysql -D myeyeos -u root -p < /usr/local/apache2/htdocs/eyeos-2.5/eyeos/extras/EyeosUMSQL/EyeosUMSQL.sql
mysql -D myeyeos -u root -p < /usr/local/apache2/htdocs/eyeos-2.5/eyeos/extras/EyeosEventsNotificationSQL/EyeosEventNotification.sql
mysql -D myeyeos -u root -p < /usr/local/apache2/htdocs/eyeos-2.5/eyeos/extras/EyeosPeopleSQL/EyeosPeopleSQL.sql
mysql -D myeyeos -u root -p < /usr/local/apache2/htdocs/eyeos-2.5/eyeos/extras/CalendarSQL/Calendar.sql
mysql -D myeyeos -u root -p < /usr/local/apache2/htdocs/eyeos-2.5/eyeos/extras/MailApplicationSQL/MailApplicationSQL.sql
然后在eyeos根目录下的settings.php中设置连接数据库的主机,用户名和密码:
1. 搜索“SQL_CONNECTIONSTRING”字样,然后把host修改成localhost(dbname如果不是一开始新建的数据库myeyeos,则要相应修改成myeyeos)
注意:define('SQL_CONNECTIONSTRING', 'mysql:dbname=myeyeos;host='.SQL_HOST); 这句话用了php的语法,点号表示连接字符串!这里一定要注意!
2. 搜索“SQL_USERNAME“字样,然后修改成连接数据库的用户名
3. 搜索“SQL_PASSWORD”字样,然后修改成连接数据库的密码
然后修改整个eyeos根目录的权限:
chmod 777 -R eyeos-2.5/
然后在浏览器中输入:http://localhost/eyeos-2.5/index.php出现了上述提到的问题:There is an error in this eyeOS installation, please contact the system administrator
打开 eyeos-2.5/index.php,找到“There is an error in this eyeOS installation, please contact the system administrato”字样,发现它是在一个try-catch块内的,在后面加上echo $e->getMessage();
语句,然后再运行的时候就会显示出错误:
[function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead
解决办法是:
找到php下的php.ini文件(找不到可以find -name php.ini,我的是在/usr/local/php5/lib/php.ini),查找 ”;date.timezone = “字样,然后去掉前面的分号(即取消注释),改为 date.timezone = Asia/Shanghai,然后在eyeOS的根目录下的index.php打开 eyeos-2.5/index.php,在其中的中的php代码内加入“date_default_timezone_set('Asia/Shanghai');”字样(我加在了整个文件的第二行,第一行是<?php)
然后在浏览器中输入:http://localhost/eyeos-2.5/index.php 就可以啦!
贴个图:
不过点“Create an account” 就出错了,如下(至今不知如何解决???):