[root@server ~]# cd /[root@server /]# ls /
afs dev lib media opt run sys var
bin etc lib64 mnt proc sbin tmp
boot home lost+found nextcloud-25.0.1.zip root srv usr
[root@server /]# unzip /nextcloud-25.0.1.zip
设置nextcloud安装命令权限
[root@server /]# chmod -Rf 777 /nextcloud
设置数据库
[root@server ~]# systemctl start mariadb # 启动数据库[root@server ~]# mysql
MariaDB [(none)]> create database nextcloud;# 创建数据库
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> create user 'nextcloud'@'localhost' identified by '123456';# 创建用户及密码
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> grant all on nextcloud.* to 'nextcloud'@'localhost';# 设置权限
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]>exit
Bye
重启数据库
[root@server ~]# systemctl restart mariadb
配置nginx
[root@server /]# vim /etc/nginx/nginx.conf
server {
listen 80;
listen [::]:80;
server_name _;
root /nextcloud;}
关于圆周率
大约20年前的2005年,我在上大学的时候,网上流传这样一段程序,被称之为“外星人计算圆周率程序”。程序如下:
long a 10000, b, c 2800, d, e, f[2801], g;
main() {for (; b - c;) f[b] a / 5;
for (; d 0, g …