[root@node ~]# cat install_owncloud.sh
#!/bin/bash
mv /etc/yum.repos.d/* /home
cat>>/etc/yum.repos.d/local.repo<<EOF
[owncloud]
name=owncloud
baseurl=file:///root/lamp-repo
gpgcheck=0
enabled=1
EOF
yum install httpd mariadb mariadb-server php php-fpm php-mysqlnd php-gd php-xml php-intl php-zip php-dom php-mbstring unzip -y
systemctl start httpd mariadb php-fpm
mysqladmin -uroot password 123456
mysql -uroot -p123456<<EOF
create database owncloud;
create user owncloud@localhost identified by '123456';
grant all privileges on owncloud.* to owncloud@localhost identified by '123456';
flush privileges;
EOF
unzip owncloud-complete.zip
mv owncloud /var/www/html/
chown -R apache:apache /var/www/html/owncloud
Owncloud网盘一键部署
最新推荐文章于 2024-03-20 00:23:20 发布
该脚本用于在Linux系统中移动yum仓库文件,创建owncloud的本地存储库,安装httpd、mariadb、php相关组件,设置数据库,创建数据库用户并赋予权限,解压owncloud文件并调整所有权。
摘要由CSDN通过智能技术生成