如何在CentOS 6.5上安装ownCloud 7
版本1.0
作者:Srijan Kishore
本文档介绍如何在CentOS 6.5上安装和配置ownCloud 7。 我还将使用Ubuntu 14.04桌面和Windows 7机器连接到ownCloud Server的数据。 ownCloud通过Web界面或WebDAV提供对数据的访问,同时提供了一个平台,可以轻松查看,同步和共享设备,这些都在您的控制之下。 ownCloud的开放架构可以通过一个简单但功能强大的API扩展,用于应用程序和插件,并可与任何存储一起使用。
1初步说明
本教程基于CentOS 6.5服务器,因此您应该在继续本教程之前设置基本的CentOS 6.5服务器安装。 系统应该有一个静态IP地址。 我在本教程中使用192.168.0.100
作为我的IP地址,将server1.example.com
用作主机名。 再次,我有192.168.0.101
作为Ubuntu 14.04桌面和server2.example.com的
IP地址作为主机名。 我将使用user = srijan
进行安装和配置。 我也会显示自己的Windows共享选项与Windows机器,所以我也有工作的Windows 7机器。
2安装ownCloud 7
ownCloud是一个Web应用程序,可以从集中的位置存储和提供内容,就像Dropbox一样。 不同之处在于,ownCloud 7允许您在自己的计算机上托管服务软件,从而将您的个人数据放在其他人的服务器上。
我们将首先下载与ownCloud软件相关联的发行版:
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-6/isv:ownCloud:community.repo
那么我们还需要添加epel仓库:
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
最后,更新包数据库并安装ownCloud:
yum install owncloud
ownCloud将安装Apache的依赖关系,如果没有自动安装手动安装httpd:
yum install httpd
Apache必须在每次启动时重新启动,所以我们将其添加到chkconfig:
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
此外,我们需要允许具有apache的SELINUX在http
和https中
,如下所示:
setup
选择防火墙配置
:
选择Cutomize
:
允许
安全WWW(HTTPS)
和
WWW(HTTP)
进一步保存并退出:
3 CentOS 6.5上的ownCloud 7配置
此外,我们需要安装Mysql来获取配置如下:
yum install mysql-server
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
我们将配置我们的ownCloud服务器,以利用更强大的MySQL数据库,而不是SQLite默认实现。 为此,我们必须首先将MySQL配置为:
mysql_secure_installation
[root@server1 ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] <-- ENTER
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] <-- ENTER
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] <-- ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] <-- ENTER
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
现在转向Mysql提示符:
mysql -u root -p
将您之前选择的Mysql密码,并在Mysql提示符下为ownCloud创建数据库:
CREATE DATABASE owncloud;
为新的MySQL用户分配权限以处理ownCloud的数据库操作:
GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'database_password';
exit
现在,如果您在浏览器中访问您的IP地址或域名后跟“/ owncloud”,您将看到如下所示的页面:
点击存储和数据库
:
现在选择
MySQL / MariaDB
并创建一个管理员帐户,就像我的情况我已经选择了自己的
cisco
作为我的管理员帐户和该用户所需的密码:
在MySQL / MariaDB下方的下方标签中,输入
username = owncloud password = database_password databasename = owncloud
。
然后按完成设置
。