ownCloud安装基本没啥难度,按照官方文档的安装说明做就可以了,不过我这里用到了另一个机器上的iSCSI target,所以过程稍微有些复杂。
Prerequisites
To
run ownCloud, your webserver must have the following installed:
·
php5 (>= 5.3)
·
php5-gd
·
php-xml-parser
·
php5-intl
And
as optional dependencies:
·
php5-sqlite (>= 3)
·
php5-mysql
·
smbclient
·
curl
·
libcurl3
·
php5-curl
You
have to install at least one of php5-sqlite or php5-mysql, depending on which
of the two database systems you want to use.
smbclient
is only used if you want to mount SMB shares to your ownCloud. The curl
packages are needed for some apps (e.g. http user authentication)
Commands
for Ubuntu and Debian (run as root):
apt-get install apache2
php5 php5-gd php-xml-parser php5-intl
apt-get install php5-sqlite
php5-mysql smbclient curl libcurl3 php5-curl
Extract
ownCloud and Move to Your Webserver
tar -xjf
path/to/downloaded/owncloud-x.x.x.tar.bz2
(如果下载的是zip版本 则是sudo unzip owncloud-x.x.x.zip)
sudo mv owncloud
/path/to/your/webserver
Set
the Directory Permissions
The owner of your webserver must own
the apps/, data/ and config/ directories in your ownCloud install. You can do this by
running the following command for the apps, data and config directories:
chown -R www-data:www-data
/path/to/your/owncloud/install/data
Replace www-data:www-data with
the user and group of the owner of your webserver.
【这里我们使用了iSCSI作为ownCloud的存储】
1、首先在freenas上设置好network,iscsi volume,chap secret等,并记住iscsi的target名称
2、sudo apt-get install open-iscsi
3、如果iSCSI Target有启用CHAP(非相互CHAP),要编辑/etc/iscsi/iscsid.conf中的CHAP Settings区段,将以下2行启用(删掉前面的#)
node.session.auth.username
= username
node.session.auth.password
= password
并将正确的帐号密码填入,存档后重新启动open-iscsi
sudo /etc/init.d/open-iscsi restart
4、寻找iSCSI Target:
sudo iscsiadm -m discovery -t st -p 10.18.32.28 找到后会列出可用的iSCSI Target名称,而且在/etc/iscsi/nodes下会产生对应的目录
5、 iscsiadm -m node --targetname "iqn.2010-10.synology-iscsi:newvirtualdisk.1"
--portal "10.18.32.28:3260" –login
6、fdisk –l
fdisk
/dev/sdb
用n命令创建primary分区
7、创建文件系统
mkfs.ext3
/dev/sdb1
8、挂载文件系统
mount
/dev/sdb1 /mnt
sudo chown
www-data:www-data –R /mnt
9、在moodle安装时使用/mnt作为存储目录
|
l 登出已连接的iSCSI Target:
sudo iscsiadm -m node -T 已登入的Target名称 -p NAS的IP -u
l 设定开机自动登入iSCSI Target:
方法1、针对已存在的Target单独设定
sudo iscsiadm -m node -T Target名称 -p NAS的IP -o update -n node.conn[0].startup -v automatic
sudo /etc/init.d/open-iscsi restart
方法2、针对设定之后,新加入的Target,已存在的Target不受影响
编辑/etc/iscsi/iscsid.conf
node.startup 设为 automatic
sudo /etc/init.d/open-iscsi restart
|
Enable
.htaccess and mod_rewrite if Running Apache
If
you are running the apache webserver, it is recommended that you
enable .htaccess files as ownCloud uses them to enhance security and
allows you to use webfinger. To enable .htaccess files you need to ensure that AllowOverride is set
to All in the Directory /var/www/ section of your
virtual host file. This is usually
in /etc/apache2/sites-enabled/000-default. You should also run
a2enmod rewrite
and
a2enmod headers.
Then
restart apache:
service apache2 restart
In
order for the maximum upload size to be configurable, the .htaccess file in the ownCloud folder needs
to be made writable by the server.
【修改配置文件设定最大文件上传大小】
upload_max_filesize = 8M
post_max_size = 10M
memory_limit = 20M
Follow
the Install Wizard
Open
your web browser and navigate to your ownCloud instance. If you are installing
ownCloud on the same machine as you will access the install wizard from, the
url will be: http://localhost/ (or http://localhost/owncloud). For basic installs we recommend
SQLite as it is easy to setup (ownCloud will do it for you). For larger
installs you should use MySQL or PostgreSQL. Click on the Advanced options to
show the configuration options. You may enter admin credentials and let ownCloud
create its own database user, or enter a preconfigured user. If you are not
using apache as the webserver, please set the data directory to a location
outside of the document root. See the advanced install settings.
没有评论:
发表评论