以下步骤vmware 下redhat8 已通过实验!!!! 2020-7-13
前提:挂载本地源
内容:
1.安装basic LAMP server on RHEL 8
install secure MariaDB database.
dnf install php-mysqlnd php-fpm mariadb-server httpd
open HTTP and HTTPS firewall ports.
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
Start both Apache webserver and MariaDB services:
systemctl start mariadb
systemctl start httpd
Enable MariaDB and httpd to start after system reboot:
systemctl enable mariadb
systemctl enable httpd
Secure your MariaDB installation and set root password:
mysql_secure_installation
Confirm the LAMP server installation. Create a file called info.php within the /var/www/html/ directory with the following content:
vi /var/www/html/info.php
<?php phpinfo(); ?>
:wq
change permissions and change file SELinux security context:
chown -R apache:apache /var/www/html/*
chcon -t httpd_sys_rw_content_t /var/www/html/ -R
Navigate your browser to the http://localhost/info.php URL and confirm the LAMP installation.
To install an additional package execute:
# dnf install PACKAGENAME
Once the package is installed reload the httpd service:
# systemctl reload httpd
2.安装owncloud
Install all required OwnCloud prerequisites.
dnf install php-mbstring php-gd php-pecl-zip php-xml php-json php-intl unzip
download owncould
wget https://download.owncloud.org/community/owncloud-10.0.10.zip
unzip file
unzip owncloud-10.0.10.zip -d /var/www/html
mkdir /var/www/html/owncloud/data
permission chown
chown -R apache:apache /var/www/html/owncloud/*
chcon -t httpd_sys_rw_content_t /var/www/html/owncloud/ -R
Create MariaDB database to be used with OwnCloud
mysql -u root -p
mysql> CREATE DATABASE owncloud;
mysql> CREATE USER `admin`@`localhost` IDENTIFIED BY 'pass';
mysql> GRANT ALL ON owncloud.* TO `admin`@`localhost`;
mysql> FLUSH PRIVILEGES;
mysql> exit
http://虚拟机IP/owncloud/index.php 进入owncloud界面