CentOS 6.6上安装及配置owncloud

0.安装centOS (ver.6.6)

1.CentOS配置IP:
setup配置ip mask等,vim /etc/sysconfig/network-scripts/ifcfg-eth0
设置ONBOOT=yes

2.安装Vmware tools:
现在vsphere里安装vmware tools挂载好安装程序,然后:
执行下面的命令:
mkdir /mnt/cdrom
mount -t iso9660 /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
tar -zxvf VMwareTools-*.tar.gz -C /tmp
cd /tmp/vmware-tools-distrib
umount /mnt/cdrom
yum install perl
./vmware-install.pl
根据提示选择yes/no

3.修改yum源(以163为例)

进入存放源配置的文件夹
cd /etc/yum.repos.d

备份默认源
mv ./CentOS-Base.repo ./CentOS-Base.repo.bak

使用wget下载163的源 http://mirrors.163.com/.help/centos.html
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

4.安装MySQL:
yum install mysql mysql-server

开机自启动:
chkconfig –levels 235 mysqld on[root@localhost ~]# /etc/init.d/mysqld start

开启MySQL:
service mysqld start

设置MySQL密码:
mysql_secure_installation

登录mysql
mysql -u root -p XXXXXX

5.安装Apache:
安装httpd:
yum install httpd

开机自启动:
chkconfig –levels 235 httpd on

开启httpd:
service httpd start

6.安装PHP:
yum install php

安装相关模块:
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring

重启Apache,使其生效:
service httpd restart

7.安装ownCloud(自动):
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-6/isv:ownCloud:community.repo
yum install owncloud
7*.安装ownCloud(手动):
cd /etc/yum.repos.d/

安装lrzsz:
yum install lrzsz

手工下载owncloud后上传至服务器:
(Xshell直接拖动进)

安装ownCloud:
tar -xjvf owncloud-X.X.X.tar.bz2 -C /var/www/html/
(版本号具体而定)

8.启动owncloud:
为Web服务器上文件目录设置读写权限:
chown -R apache.apache /var/www/html/owncloud/

创建数据库:
登录:
mysql -u root -p
键入:
mysql> create database owncloud;
mysql> create user ‘owncloud’@’xx.xx.xx.xx’ identified by’databasepassword’;(自己设置pswd)
mysql> grant all on owncloud.* to ‘owncloud’@’xx.xx.xx.xx’;
mysql> flush privileges;
mysql> quit;

编辑外部配置文件:
vim /etc/httpd/conf.d/owncloud.conf

键入:
————————————————–
Alias /owncloud /var/www/html/owncloud
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
————————————————–

发表评论

电子邮件地址不会被公开。 必填项已用*标注

8 + 2 =