In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First of all, after installing the CentOS system, the installation of the system will not be introduced here.
Configure the IP address first after installation
# vi / etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO= "static"
IPADDR=192.168.18.19
NETMASK=255.255.255.0
DNS1=202.96.134.133
DNS2=8.8.8.8
GATEWAY=192.168.18.11
ONBOOT= "yes"
3. Install PHP
Yum install PHP (the default yum for CentOS 7 is to install 5.4.If you need to download and install another version)
4. Install MySQL
1.MySQL depends on libaio, so install libaio first
# yum search libaio # retrieve related information
# yum install libaio # install dependency packages
two。 Check if MySQL is installed
# yum list installed | grep mysql
If so, uninstall all yum-y remove mysql* (corresponding installation package name)
3. Download MySQL Yum Repository
The address is http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Execute (if prompted-bash: wget: command not found, please execute yum install wget to install wget first)
Wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
4. Install MySQL through yum (yum automatically handles MySQL dependencies on other components)
Yum install mysql-community-server
Check the installation directory of mysql after installing the executable where mysql
[root@BCentOS html] # whereis mysql
Mysql: / usr/bin/mysql / usr/lib64/mysql / usr/share/mysql / usr/share/man/man1/mysql.1.gz
Start the mysql service systemctl start mysqld after installation
5. Configuration database
Launch the MySQL Security configuration Wizard
Execute the command mysql_secure_installation
The main settings are as follows
A) set the password for root users
B) Delete anonymous accounts
C) cancel remote login for root users
D) remove the test library and access to the test library
E) refresh the authorization table to make the changes effective
Create a database named 'ownclouddb' and database user' ownclouduser' with password 'password'' for owncloud to hold login users
Mysql-uroot-p
Mysql > create database ownclouddb
Mysql > grant all on ownclouddb.* to ownclouduser@localhost identifiedby 'password'
5. Download and install the latest version of owncloud
Wget https://download.owncloud.org/community/owncloud-9.1.3.tar.bz2
Extract and set permissions tar-xvf owncloud-9.1.3.tar.bz2 (if you cannot extract it with tar, you can install the bzip2 package yum install bzip2)
Move files to mv owncloud / var/www/html under the http root directory
Make http user proprietary hown-R apache:apache / var/www/html/owncloud
Make web have write access to chmod 777 / var/www/html/owncloud/config/
Configure http config
Vi / etc/httpd/conf/httpd.conf
Find the following location to change the root directory, and do not perform a secondary operation if you do not need it.
DocumentRoot "/ var/www/html/owncloud/"
You can also change the data saving directory of owncloud
For example, change / var/www/html/owncloud/data to / media/disk/data. To ensure that the data file directory is consistent, copy / var/www/html/data to the / media/disk directory.
Modify the datadirector in the / var/www/html/owncloud/config/config.php file to change to / media/disk/data.
For example:
Change 'datadirectory' = >' / var/www/owncloud/data' to 'datadirectory' = >' / media/disk/data'.
Set file access permissions and enter commands at the terminal
Chown-R apsche:apache / media/disk/data
Chmod 777 / media/disk/data
Change the SELinux mode, this step is the key!
First check the SELinux status on the terminal. There are the following methods.
(1) getenforce
(2) / usr/sbin/sestatus-v
Second, in order for owncloud to change the storage directory properly, you need to set the SELinux mode to permissive or disabled. There are the following methods.
(1) setenforce 0 # this is equivalent to setting SELinux to permissive mode and no need to restart
(2) Edit / etc/selinux/config file, SELINUX=disabled, and need to restart
END
Matters needing attention
Make sure that when you change the storage directory, make sure that the new storage directory is the same as the previous one.
The SELinux mode needs to be changed, which could be owncloud's bug. Because SELinux is a security mechanism, it is recommended that the mode be changed to permissive.
Before changing the storage directory, make sure that the owncloud is working properly.
After the change, enter the IP address to configure the database, and enter the database name, user name and password set before.
Problems encountered
Forbidden
You don't have permission to access / on this server.
After coming out to find some information, I tried to turn off selinux. After closing the page, I opened the page normally. The above are two ways to close it.
Temporarily shut down selinux:
Setenforce 0 / / set SELinux to permissive mode
Completely disable selinux:
Use the root user, vim / etc/sysconfig/selinux, to modify SELINUX=enforcing to SELINUX=disabled. It will not take effect until it is rebooted.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.