1、关闭防火墙:systemctl stop firewalld.service
2、设置防火墙开机不自启:systemctl disable firewalld.service
3、关闭安全上下文:vim /etc/selinux/config
把这个内容改在这样 SELINUX=disabled(修改完)
(可以不用配置)
配置yum源:
先进入yum源目录:cd /etc/yum.repos.d/,
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Sources.repo CentOS-Vault.repo
rm *
删除多余文件只留CentOS-Sources.repo
进入CentOS-Sources.repo删除所有数据,
vim CentOS-Sources.repo
粘贴以下内容:
[base-source]
name=CentOS-$releasever - Base Sources
baseurl=file:///mnt
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
4、更新YUM源
1、wget http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-4.1708.el7.centos.x86_64.rpm
2、rpm -ivh --replacepkgs --replacefiles centos-release-7-4.1708.el7.centos.x86_64.rpm
3、yum update
使用yum源安装samba服务:yum -y install samba.x86_64
安装阿帕奇服务(httpd):yum install httpd.x86_64
5、安装php服务:
执行下面的命令升级软件仓库
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
6、安装php 5.6版本
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
7、安装mariadb服务:
yum install mariadb-server.x86_64
yum install mariadb
8、开启以上所有服务并设置开机自启:
samba:systemctl start smb.service
systemctl enable smb.service
httpd:systemctl start httpd.service
systemctl enable httpd.service
mariadb:systemctl start mariadb.service
systemctl enable mariadb.service
9、修改/var/www/html此文件属主属组为 apache:
chown apache.apache /var/www/html/
10、打开网页输入虚拟机IP地址查看是否”TESTING 123"
11、安装OwnCloud:
进入/var/www/html:cd /var/www/html
wget https://download.owncloud.org/community/owncloud-10.0.4.tar.bz2
ls显示一下文件:[root@localhost html]# ls
11、使用tar命令解包:tar -xjvf owncloud-10.0.4.tar.bz2
12、cd owncloud
cp index.php ..
12、ls
显示结果如下:index.php owncloud owncloud-10.0.4.tar.bz2
13、systemctl restart httpd.service
14、chmod 777 /var/www/html/owncloud
15、打开网页输入IP/owncloud
转载于:https://blog.51cto.com/11412501/2053058