centos7安装owncloud搭建个人云服务器

首先登录服务器,安装一些必要程序,因为本地源不支持一些程序的新版本,所以必须把源换一下
1、下载阿里yum源并移动到yum目录中,删除其他源

wget  -nc http://mirrors.aliyun.com/repo/Centos-7.repo
mv Centos-7.repo /etc/yum.repos.d/
yum clean all           #清除yum本地缓存
yum makecache      #生成yum机制的本地缓存

2、接下来安装程序

yum install httpd           #安装apache
yum install mariadb-server mariadb               #数据库
yum install php           #安装PHP

3、配置数据库

systemctl start mariadb.service
mysql_secure_installation       #进入配置  
Enter current password for root (enter for none):       #输入原始root密码,空密码就回车
Set root password? [Y/n]        #是否设置root密码
New password:       #输入新密码
Re-enter new password:       #再次输入
Password updated successfully!
Reloading privilege tables..
 ... Success!
 Remove anonymous users? [Y/n]        #是否移除匿名用户
 ... Success!
Disallow root login remotely? [Y/n]       #是否禁止远程root登陆
 ... skipping.
Remove test database and access to it? [Y/n]       #是否删除测试数据库
Reload privilege tables now? [Y/n]           #重新载入
 ... Success!

4、下载owncloud

wget https://download.owncloud.org/community/owncloud-10.0.8.zip
解压并移到/var/www/html/目录中

#各系统版本repo文件对应的下载操作
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo


猜你喜欢

转载自blog.51cto.com/xudongdong/2115340
今日推荐