Crmgo Blog

Instalacija Owncloud 9 + Nginx + MariaDB na Centos 7

Instalacija Owncloud 9 + Nginx + MariaDB na Centos 7

Ako rep nije povezan: sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm Instalirajte pakete: yum -y install nginx mariadb mariadb-server php-fpm php-cli php-gd php-mcrypt php-mysql php-pear php-xml bzip2 wget Pokrenite Mariju: systemctl start mariadb systemctl enable mariadb.service mysql_secure_installation php-fpm: vim /etc/php-fpm.d/www.conf mkdir -p /var/lib/php/session…

Instalacija Owncloud 9 + Nginx + MariaDB na Centos 7

Ako rep nije povezan:

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

Instaliramo pakete:

yum -y install nginx mariadb mariadb-server php-fpm php-cli php-gd php-mcrypt php-mysql php-pear php-xml bzip2 wget

Pokrećemo Mariadb:

systemctl start mariadb

systemctl enable mariadb.service
mysql_secure_installation

 

php-fpm:

vim /etc/php-fpm.d/www.conf

listen.owner = nginx
listen.group = nginx
listen.mode = 0666
user = nginx
group = nginx

mkdir -p /var/lib/php/session
chown nginx:nginx -R /var/lib/php/session/

systemctl start php-fpm

systemctl start nginx

systemctl enable php-fpm

systemctl enable nginx

Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.

mysql -u root -p

MariaDB [(none)]> create database owncloud;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create user owncloud@localhost identified by 'OwncloudPass';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant all privileges on owncloud.* to owncloud@localhost identified by 'OwncloudPass';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;

mkdir -p /etc/nginx/cert/
cd /etc/nginx/cert/
openssl req -new -x509 -days 365 -nodes -out /etc/nginx/cert/owncloud.crt -keyout /etc/nginx/cert/owncloud.key

Instaliramo Owncloud:

wget https://download.owncloud.org/community/owncloud-9.1.2.zip

unzip owncloud-9.1.2.zip

 

cp -R owncloud /owncloud

mkdir -p /owncloud/data/

chown nginx:nginx -R owncloud/

vim /etc/hosts

x.x.x.x owncloud.lomix.pp.ua

 

U /etc/nginx/nginx.conf zakomentirajte server {.....} !

service php-fpm restart

service nginx restart

 

 

 

Napomena: tekst može biti uz pomoć AI uz ljudsku proveru. Odgovoran: Dmytro Lomaka, Kaltenkirchen.