Home Operation and Maintenance CentOS How to build a personal network disk under CentOS 7

How to build a personal network disk under CentOS 7

Jan 29, 2022 am 05:00 AM
centos 7

This article is provided by the CentOS tutorial column to introduce how to build your own personal network disk. I hope it will be helpful to you if you need it!

We can build our own personal network disk (private cloud disk). Commonly used open source frameworks include ownCloud , Seafile, Nextcloud, this article introduces how to build a private cloud based on Nextcloud under CentOS 7.

Install MySQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

安装mysql源信息

\[root@xxx ~\]# yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

 

安装mysql

\[root@xxx ~\]# yum install mysql-community-server

 

启动mysql

\[root@xxx ~\]# systemctl start mysqld

 

查看密码

\[root@xxx ~\]# grep 'temporary password' /var/log/mysqld.log

 

修改密码

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Cby123..'

 

设置开机自启

\[root@xxx ~\]# systemctl enable mysqld

Copy after login

Install PHP and configure

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

安装epel

\[root@xxx ~\]# yum install epel\*

 

安装remi

\[root@xxx ~\]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm  

 

安装php以及php-fpm

\[root@xxx ~\]# yum install -y php74-php-fpm php74-php-cli php74-php-bcmath php74-php-gd php74-php-json php74-php-mbstring php74-php-mcrypt php74-php-mysqlnd php74-php-opcache php74-php-pdo php74-php-pecl-crypto php74-php-pecl-mcrypt php74-php-pecl-geoip php74-php-recode php74-php-snmp php74-php-soap php74-php-xmll

 

# 编辑配置文件

\[root@xxx ~\]# vim /etc/php.ini

 

# 找到

;cgi.fix\_pathinfo=1

# 去掉注释,并将1改成0

cgi.fix\_pathinfo=0

 

添加开机自启

\[root@xxx ~\]# systemctl enable php74-php-fpm

 

\[root@xxx ~\]# systemctl restart php74-php-fpm

Copy after login

Install Nginx and set it to start

1

2

3

4

5

6

7

8

安装Nginx

\[root@xxx ~\]# yum install nginx

 

启动Nginx

\[root@xxx ~\]# systemctl start nginx

 

设置开机自启

\[root@xxx ~\]# systemctl enable nginx

Copy after login

Install nextcloud

1

2

3

4

5

6

7

8

9

10

11

12

13

14

下载软件包

\[root@xxx ~\]# wget https://download.nextcloud.com/server/releases/nextcloud-18.0.2.tar.bz2

 

安装解压依赖

\[root@xxx ~\]# yum install lbzip2

 

进行解压

\[root@xxx ~\]# tar xvf nextcloud-18.0.2.tar.bz2 

 

挪动文件夹

\[root@xxx ~\]# mv nextcloud /var/www/

 

给文件权限

\[root@xxx ~\]# chmod 777 /var/www/nextcloud -Rf

Copy after login

Create database

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

\# 进入MySQL

mysql -u root -p

 

# 创建一个名为nextclud\_db的数据库

CREATE DATABASE nextcloud\_db;

 

# 创建一个名为nextcloud、密码也为nextcloud的用户

CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'Cby123..';

 

# 赋予用户nextcloud对数据库nextcloud\_db的所有操作权限

GRANT ALL PRIVILEGES ON nextcloud\_db.\* TO 'nextcloud'@'localhost';

 

# 刷新数据库权限

FLUSH PRIVILEGES;

 

# 退出

exit

Copy after login

How to build a personal network disk under CentOS 7

The above is the detailed content of How to build a personal network disk under CentOS 7. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to restart the server via command line in CentOS system How to restart the server via command line in CentOS system Mar 05, 2025 pm 03:30 PM

This article explains how to restart a CentOS server using the command-line reboot command. It emphasizes the importance of saving data and gracefully shutting down applications before using sudo reboot to avoid data loss. Potential risks, includin

How to restart the network service in centos8 How to restart the network service in centos8 Mar 05, 2025 pm 03:29 PM

This guide details methods for restarting network services in CentOS 8. It compares using systemctl (recommended for reliability) with ifdown/ifup (faster, less robust). Troubleshooting steps for network outages are also provided, covering connecti

What are the centos restart commands What are the centos restart commands Mar 05, 2025 pm 03:28 PM

This article explains CentOS server reboot commands. It focuses on reboot for immediate restarts and shutdown -r for scheduled reboots, highlighting the differences and best practices for each. The main issue is providing clear instructions and con

How to shut down and restart centos7 shutdown and restart command How to shut down and restart centos7 shutdown and restart command Mar 05, 2025 pm 03:24 PM

This guide details safe shutdown and reboot methods for CentOS 7 servers. It emphasizes using the shutdown command for its flexibility and ability to schedule restarts, contrasting it with the less-flexible reboot and halt commands. Safe practices

Centos official website entrance Centos official website entrance Mar 05, 2025 pm 03:32 PM

This article discusses the discontinuation of CentOS and its replacement by CentOS Stream. It details how to find information, downloads, and verify the integrity of CentOS Stream ISOs, now primarily hosted on the Red Hat website. Community support

How do I install and configure MySQL/MariaDB on CentOS? How do I install and configure MySQL/MariaDB on CentOS? Mar 17, 2025 pm 04:35 PM

Article discusses installation, configuration, and troubleshooting of MySQL/MariaDB on CentOS, including system requirements and security measures.(159 characters)

How do I configure log rotation in CentOS? How do I configure log rotation in CentOS? Mar 17, 2025 pm 04:43 PM

The article explains how to configure log rotation in CentOS using logrotate, detailing installation, configuration, and benefits like disk space management and security.

How do I use Logical Volume Management (LVM) in CentOS to manage storage? How do I use Logical Volume Management (LVM) in CentOS to manage storage? Mar 17, 2025 pm 04:51 PM

The article discusses using Logical Volume Management (LVM) in CentOS for efficient storage management, detailing steps for setup, extension, and backup/restore processes, and highlighting LVM's advantages over traditional partitioning.

See all articles