Centos 6.9 build owncloud private cloud disk

This article mainly introduces the rapid installation and deployment of owncloud private cloud disk in lamp environment


Basic process:

  1.Introduction to owncloud

  2.yum deploy lamp environment

  3. Download the owncloud package and install it

  4. Test whether owncloud is used normally




Process 1: Introduction to owncloud

  

   ownCloud is a tool for building private cloud storage. It can be used in a pure LAN environment or built on a public cloud. It is divided into two parts: server and client. The server used to support Windows, Mac OS and Linux, but the current version only supports Linux.

   Clients support desktop systems such as Windows, Mac OS, and Linux, as well as mobile terminals such as iOS, Android, and BlackBerry. Specifically, it is available on ownCloud. Many installation methods are available.




Process 2: yum deploys lamp environment


1) System version description:


cat /etc/redhat-release 

CentOS release 6.8 (Final)


uname -r

2.6.32-696.6.3.el6.x86_64


close SELINUX


Modify the configuration file and it will take effect permanently after restarting the service.


sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config


Command line settings take effect immediately.


setenforce 0


Open firewall:


#vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 9000 -j ACCEPT

service iptables  restart

iptables -nL View firewall rules


2) Install NetEase official source

For more yum sources, please refer to: http://blog.51cto.com/13707680/2104644

cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.$(date +%F)
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
yum clean all
yum makecache

3) yum install the required packages


yum install httpd httpd-devel

yum install mysql mysql-server mysql-devel

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm       ##This step is very important, otherwise yum will not be able to install the package below. As a result, the interface cannot be accessed later

[root@localhost yum.repos.d]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm

Preparing...                                                            (10########################################### [100%]

        package webtatic-release-6-9.noarch is already installed ##Indicates that it has been installed, it is recommended to uninstall and reinstall

[root@localhost yum.repos.d]# rpm -e --nodeps webtatic-release-6-9.noarch

[root@localhost yum.repos.d]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm

Preparing...                                                            (10########################################### [100%]

   1:webtatic-release                                                   (  ########################################### [100%]


[root@localhost yum.repos.d]# ll /etc/yum.repos.d/webtatic*     ##You can see three more repo files

-rw-r--r--. 1 root root 963 Nov 13  2016 /etc/yum.repos.d/webtatic-archive.repo

-rw-r--r--. 1 root root 865 Nov 13  2016 /etc/yum.repos.d/webtatic.repo

-rw-r--r--. 1 root root 963 Nov 13  2016 /etc/yum.repos.d/webtatic-testing.repo


  yum install php70w php70w-bcmath php70w-cli php70w-common php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-fpm php70w-gd php70w-imap php70w-interbase php70w-intl php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-mysqlnd php70w-odbc php70w-opcache  php70w-pdo  php70w-pdo_dblib php70w-pear php70w-pecl-apcu php70w-pecl-imagick php70w-pecl-xdebug  php70w-pgsql php70w-phpdbg php70w-process  php70w-pspell php70w-recode  php70w-snmp  php70w-soap php70w-tidy  php70w-xml  php70w-xmlrpc --skip-broken


4) Start the service and start it automatically

/etc/init.d/httpd start

/etc/init.d/php-fpm start

/etc/init.d/mysqld start

[root@localhost yum.repos.d]# netstat -tnlp|grep -E "80|3306|9000"

tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      2020/php-fpm        

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      2166/mysqld         

tcp        0      0 :::80                       :::*                        LISTEN      1999/httpd  

chkconfig httpd on

chkconfig mysqld on

chkconfig php-fpm on




Step 3: Download owncloud private cloud disk and install it


owncloud official website: https://owncloud.org/install/#edition

owncloud version: owncloud-10.0.7.zip (10.x version requires at least PHP 5.6 or above, and php-7.0.29 is installed on it)

cd / var / www / html

wget https://download.owncloud.org/community/owncloud-10.0.7.zip

unzip owncloud-10.0.7.zip

chown -R apache.apache owncloud




Step 4: Test whether owncloud is in normal use


The browser enters ip/owncloud and the test access is normal as shown in the following figure: (If this web interface does not appear, then you need to check whether the php package installation is successful, and whether /var/www/html/owncloud/config has 777 permissions, Whether the service is normally turned on)

image.png

 For the first login, you need to set the database name, account number and password.

Let's add the following to the data:

1) Set the root user password:

mysql_secure_installation

By default, the password is empty, and when "Enter current password for root" is prompted, press Enter. Enter a new password, enter it again to confirm, and press Enter all the way


2) Log in to mysql, create a database, the library name is owncloud, and create a user to manage the owncloud library

[root@localhost html]# mysql -u root -p

mysql> create database owncloud;

mysql> grant all on owncloud.* to owncloud@'localhost' identified by '123456';

mysql> flush privileges; 

mysql> show grants for owncloud@'localhost';

mysql> select user,host from mysql.user;


Then log in to the owncloud program, the user name is owncloud, and the password is 123456


image.png


See the above picture, it means that the login is normal. At this point, the owncloud private cloud disk has been successfully built, and you can play happily.












    











Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324866947&siteId=291194637