LAMP架构集成ownCloud搭建私有云盘日记

一.环境准备

1.Centos7.6
2.owncloud安装文件
3.升级yum源

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

4.关闭防火墙,关闭selinux.

(1)关闭防火墙
临时关闭
systemctl stop firewalld

查看防火墙状态
systemctl status firewalld

永久关闭防火墙
systemctl disable firewalld

(2)关闭SElinux
getenforce 

Enforcing         启动状态
Permissive      关闭状态
setenforce 

usage:  setenforce [ Enforcing | Permissive | 1 | 0 ]     1表示启动,0表示关闭 

setenforce 0                   临时关闭

永久关闭(修改配置文件,即可永久关闭)
[root@localhost ~]# vi /etc/selinux/config 
                 # This file controls the state of SELinux on the system.
                 # SELINUX= can take one of these three values:
                 #     enforcing - SELinux security policy is enforced.
                 #     permissive - SELinux prints warnings instead of enforcing.
                 #     disabled - No SELinux policy is loaded.
                 SELINUX=enforcing         修改为"SELINUX=disabled"
                 # SELINUXTYPE= can take one of three values:
                 #     targeted - Targeted processes are protected,
                 #     minimum - Modification of targeted policy. Only selected processes are protected.
                 #     mls - Multi Level Security protection.
                 SELINUXTYPE=targeted

5.云服务器控制台安全组中,放通所需端口。

二.Apache的安装

1.下载Apache

yum install  httpd  -y

2.设置开机启动

systemctl enable  httpd

3.启动Apache

systemctl start   httpd

三.MySQL 5.7的安装

1.下载mysql 5.7 源

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

2.导入mysql 5.7 源

yum -y localinstall mysql57-community-release-el7-11.noarch.rpm

3.yum 直接安装

yum -y install mysql-community-server

4.启动MySQL

systemctl start mysqld

5.修改数据库密码

grep 'temporary password' /var/log/mysqld.log
这样会得到root的密码(n3-Qvra$Gp.#)

>mysql -u root -p
enter password:(输入原始密码) 直接回车进入

mysql> ALTER USER USER() IDENTIFIED BY 'Qwer123.';
mysql 5.7 版本设置密码需要符合大小写、数字规则、字符规则,满8位

四.安装php70w的安装

yum install –y php70w php70w-opcache
yum install php70w-cli php70w-common php70w-fpm php70w-gd php70w-mbstring php70w-xml php70w-intl  php70w-mysql  -y

五.安装owncloud

上传owncloud并解压
unzip owncloud-10.0.10.zip

移动
mv owncloud /var/www/html/

修改权限
cd  /var/www/html
chmod   -R  777  owncloud/

重启Apache
systemctl  restart httpd

六、初始化安装owncloud

浏览器地址栏输入:http://ip地址/owncloud/index.php,填写必要内容。数据库用root用户初始化,自动跳转到登录界面。
在这里插入图片描述
用客户端连接服务端,需要开启httpd的https.
在这里插入图片描述
输入用户名和密码:
在这里插入图片描述
然后点击下一步,连接即可.


版权声明:本文为chenhanl原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。