Heim  >  Artikel  >  Betrieb und Instandhaltung  >  So erstellen Sie eine persönliche Netzwerkfestplatte unter CentOS 7

So erstellen Sie eine persönliche Netzwerkfestplatte unter CentOS 7

藏色散人
藏色散人nach vorne
2022-01-29 05:00:304603Durchsuche

Dieser Artikel wird in der Tutorial-Kolumne von CentOS bereitgestellt, um Ihnen vorzustellen, wie Sie Ihre eigene persönliche Netzwerkfestplatte erstellen können, wenn Sie sie benötigen!

MySQL installieren
安装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

PHP installieren und konfigurieren

安装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

Nginx installieren und Start einrichten

安装Nginx
\[root@xxx ~\]# yum install nginx

启动Nginx
\[root@xxx ~\]# systemctl start nginx

设置开机自启
\[root@xxx ~\]# systemctl enable nginx

nextcloud installieren

下载软件包
\[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

Datenbank erstellen

\# 进入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

Das obige ist der detaillierte Inhalt vonSo erstellen Sie eine persönliche Netzwerkfestplatte unter CentOS 7. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Dieser Artikel ist reproduziert unter:segmentfault.com. Bei Verstößen wenden Sie sich bitte an admin@php.cn löschen
Vorheriger Artikel:Warum Centos leckerer FehlerNächster Artikel:Warum Centos leckerer Fehler