@@@@@@@@@@@@@@@@@@@@@@@@@@
Install phpMyAdmin
@@@@@@@@@@@@@@@@@@@@@@@@@@
# yum -y update
# yum -y install epel*
# yum -y install phpMyAdmin*
# yum -y install phpMyAdmin*
# vi /etc/httpd/conf.d/phpMyAdmin.conf
(add
Require ip 192.168.1.19
Require ip 192.168.1.36)
# systemctl restart httpd
# systemctl restart MariaDB
Require ip 192.168.1.19
Require ip 192.168.1.36)
# systemctl restart httpd
# systemctl restart MariaDB
http://192.168.1.133/phpMyAdmin
執行以下指令安裝 MariaDB:
啟動及設定開機自動執行 MariaDB:
@@@@@@@@@@@@@@@@@@@@@@@@@@
安裝 MariaDB
@@@@@@@@@@@@@@@@@@@@@@@@@@
執行以下指令安裝 MariaDB:
# yum install mariadb-server mariadb
啟動及設定開機自動執行 MariaDB:
# systemctl start mariadb
# systemctl enable mariadb
# systemctl enable mariadb
@@@@@@@@@@@@@@@@@@@@@@@@@@
setup owncloud MariaDB database
@@@@@@@@@@@@@@@@@@@@@@@@@@
setup owncloud MariaDB database
@@@@@@@@@@@@@@@@@@@@@@@@@@
Database : 'ownclouddb'
Database User : 'ownclouduser'
Password : 'centos'
================================================================
# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 66
Server version: 5.5.34-MariaDB MariaDB Server
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.04 sec)
MariaDB [(none)]> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'centos';
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> exit
Bye
================================================================
# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 66
Server version: 5.5.34-MariaDB MariaDB Server
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.04 sec)
MariaDB [(none)]> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'centos';
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> exit
Bye
@@@@@@@@@@@@@@@@@@@@@@@@@
view MariaDB log
@@@@@@@@@@@@@@@@@@@@@@@@@
view MariaDB log
@@@@@@@@@@@@@@@@@@@@@@@@@
# cat /var/log/mariadb/mariadb.log
@@@@@@@@@@@@@@@@@@@@@@@@@
view ownCloud log
@@@@@@@@@@@@@@@@@@@@@@@@@
view ownCloud log
@@@@@@@@@@@@@@@@@@@@@@@@@
# cat /var/www/html/owncloud/data/owncloud.log
# cat /mnt/win/owncloud.log
@@@@@@@@@@@@@@@@@@@@@@@@@
show ip address
@@@@@@@@@@@@@@@@@@@@@@@@@
# systemctl status NetworkManager.service
# nmcli dev status
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
# systemctl restart network.service
# ip addr show
# nmcli dev status
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
# systemctl restart network.service
# ip addr show
@@@@@@@@@@@@@@@@@@@@@@@@@
Yum update and upgrade
@@@@@@@@@@@@@@@@@@@@@@@@@
# yum update && yum upgrade
现在添加 Apache 服务到系统层使其随系统自动启动
@@@@@@@@@@@@@@@@@@@@@@@@@
添加 Apache 服务到系统层使其随系统自动启动
@@@@@@@@@@@@@@@@@@@@@@@@@
现在添加 Apache 服务到系统层使其随系统自动启动
# systemctl start httpd.service
# systemctl enable httpd.service
@@@@@@@@@@@@@@@@@@@@@@@@@
Mount Windows share folder with cifs
Mount Windows share folder with cifs
@@@@@@@@@@@@@@@@@@@@@@@@@
( for CentOS7)
# yum install samba-client samba-common cifs-utils
# vi /etc/fstab
\\\192.168.1.19\owncloud-Data /mnt/win cifs user=win-share,pass=-Pwd-,uid=48,gid=48 0 0
# rpm --import https://download.owncloud.org/download/repositories/9.1.1/CentOS_7/repodata/repomd.xml.key
# wget http://download.owncloud.org/download/repositories/9.1.1/CentOS_7/ce:9.1.repo
# vi /etc/fstab
\\\192.168.1.19\owncloud-Data /mnt/win cifs user=win-share,pass=-Pwd-,uid=48,gid=48 0 0
@@@@@@@@@@@@@@@@@@@@@@@@@
Install owncloud by yum
Install owncloud by yum
@@@@@@@@@@@@@@@@@@@@@@@@@
# wget http://download.owncloud.org/download/repositories/9.1.1/CentOS_7/ce:9.1.repo
# yum clean expire-cache
|
# yum install owncloud-files
#
|
vi /tmp/dirperm.sh
|
-----------------------------------------------------------------------------------
#!/bin/bash
ocpath='/var/www/html/owncloud'
htuser='apache'
htgroup='apache'
rootuser='root'
printf "Creating possible missing Directories\n"
mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater
printf "chmod Files and Directories\n"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/
chmod +x ${ocpath}/occ
printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi
-------------------------------------------------------
#
|
chmod 755 /tmp/dirperm.sh
|
沒有留言:
張貼留言