install owncloud di centos 6.5 – apache

Requirment :

– OS centos 6

tahapan isntalasi nya :

1. install web server

yum install httpd -y
service httpd start

2. install ntpd

yum install ntp -y
service ntpd start
chkconfig ntpd on

3. install mysql server

yum install mysql mysql-server -y
service mysqld start

4.install php

yum install php php-server -y

5. install php-fpm
yum install php-fpm -y
service php-fpm start
chkconfig php-fpm on

6. install modul php
yum install php-gd -y
yum install php-mbsrting -y
yum install php-pdo -y

7. cek versi + modul php
php -v
php -m

8. install Database owncloud
ketik mysql >> enter

# CREATE DATABASE owncloud;
# GRANT ALL ON owncloud.* TO ‘user’@’localhost’ IDENTIFIED BY ‘Penyamun007?;
# FLUSH PRIVILEGES;
# exit;

9. install owncloud

cd /var/www/html

# wget http://download.owncloud.org/community/owncloud-4.5.10.tar.bz2
# tar xjf owncloud-4.5.10.tar.bz2
# mkdir -p /var/www/html/owncloud/data
# chmod 770 /var/www/html/owncloud/data
# chmod 770 -R/var/www/html/owncloud
# chown -R root:apache /var/www/html/owncloud

10. set php.ini

vi /etc/php.ini

edit file berikut :

post_max_size = 6000M
cgi.fix_pathinfo = 0
upload_max_filesize = 6000M
date.timezone = “Asia/Jakarta”

service httpd restart

11. test owncloud

login https://IP-SERVER/owncloud
user = administrator pass = database

dan settingan untuk Mysql
user = user , pass = Penyamun007, namedb= owncloud ( sesuai yang kita buat dan setting di mysql )
Finis

Membuat Cloud Storage dengan Owncloud Di Centos 5

persiapan server,
Centos 5 bit, Nginx, PHP, MySQL dan OpenSSL

Tahapan Install :

1. update server

yum update

2. Install Repo

#EPEL
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-1-1.ius.el5.noarch.rpm
#IUS Community
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-6.ius.el5.noarch.rpm
#Install repos
rpm -Uvh epel-release-1-1.ius.el5.noarch.rpm ius-release-1.0-6.ius.el5.noarch.rpm

atau

wget wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-13.ius.el5.noarch.rpm
rpm -Uvh ius-release-1.0-13.ius.el5.noarch.rpm

edit :

vi /etc/yum.repos.d/ius.repo
#Comment out this line:
mirrorlist=http://dmirr.iuscommunity.org/mirrorlist?repo=ius-el5&arch=$basearch
#Add this line:
baseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/5.5/$basearch

3. install ntp

yum install ntp -y
service ntpd start
chkconfig ntpd on

4. isntall php

# yum install php-fpm php-gd php-ldap php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mbstring php-mcrypt php-shout php-snmp php-soap php-tidy php-mysql

or

yum install php53u-fpm php53u-pecl-apc

5. edit php.ini dan ubah menjadi

# nano /etc/php.ini

post_max_size = 100M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
date.timezone = “Asia/Jakarta”

edit php-fm agar listen di unix socket

# nano /etc/php-fpm.d/www.conf

listen = 127.0.0.1:9000

6. # service php-fpm start
chkconfig php-fpm on

7.buat database owncloud di mysql server

# CREATE DATABASE owncloud;
# GRANT ALL ON owncloud.* TO ‘user’@’localhost’ IDENTIFIED BY ‘Penyamun007’;
# FLUSH PRIVILEGES;
# exit;

database yang kita buat “owncloud” user = user dan passowrd nya = Penyamun007

8. install nginx webserver

# yum install nginx -y && service nginx start && chkconfig nginx on

# cd /etc/nginx/conf.d/
# nano virtual.conf

masukan script di bawah ini :

#
# A virtual host using mix of IP-, name-, and port-based configuration
#

#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}

# redirect http to https.

server {
listen 80;
server_name owncloud.penymun.com;
return 301 https://$server_name$request_uri; # enforce https
}

server {
listen 443 ssl;
server_name cloud.example.com;

ssl_certificate /etc/nginx/certs/momot-cloud.crt;
ssl_certificate_key /etc/nginx/certs/momot-cloud.key;

# Path to the root of your installation
root /var/www/owncloud;

client_max_body_size 10G; # set max upload size
fastcgi_buffers 64 4K;

rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

index index.php;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}

location / {
# The following 2 rules are only needed with webfinger
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;

rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;

try_files $uri $uri/ index.php;
}

location ~ ^(.+?\.php)(/.*)?$ {
try_files $1 = 404;

include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2;
fastcgi_param HTTPS on;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
# Or use unix-socket with ‘fastcgi_pass unix:/var/run/php5-fpm.sock;’

}

# Optional: set long EXPIRES header on static assets
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
# Optional: Don’t log access to assets
access_log off;
}

}

9. setting SSL untuk HHTPS (pastikan openssl sudah ter install)

# cd /etc/nginx/
# mkdir certs
# touch momot-cloud.crt && touch momot-cloud.key
# openssl req -newkey rsa:2048 -x509 -days 365 -nodes -keyout /etc/nginx/certs/momot-cloud.key -out /etc/nginx/certs/momot-cloud.crt

dan isikan untuk info sertivicate ssl dan next2

# service nginx restart

10. step terakhir install owncloud

install owncloud
# wget http://download.owncloud.org/community/owncloud-4.5.10.tar.bz2
# tar xjf owncloud-4.5.10.tar.bz2

# mv owncloud /var/www/
# mkdir -p /var/www/owncloud/data
# chmod 770 /var/www/owncloud/data
# chown -R root:apache /var/www/owncloud

11. test akses

login https://IP-SERVER
user = administrator pass = database

dan dy settingan untuk Mysql
user = user , pass = Penyamun007, namedb= owncloud ( sesuai yang kita buat dan setting di mysql )
Finis

12 jika problem di modul php

yum install php53u-pdo php53u-gd php53u-mbstring

Membuat Cloud Storage dengan Owncloud Di Centos 6.5

Requirement :

1. centos 5.6
2. Nginx, PHP, MySQL dan OpenSSL

Tahap instalasi :

petama kita tambahkan repo EPEL di centos server kita, dan install ntp server

# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# yum install ntp -y && service ntpd start && chkconfig ntpd on

install PHP
# yum –enablerepo=epel install php-fpm php-gd php-ldap php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mbstring php-mcrypt php-shout php-snmp php-soap php-tidy php-mysql

edit php.ini dan ubah menjadi

# nano /etc/php.ini

post_max_size = 100M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
date.timezone = “Asia/Jakarta”

edit php-fm agar listen di unix socket

# nano /etc/php-fpm.d/www.conf

;listen = 127.0.0.1:9000
listen = /var/run/php-fpm/php-fpm.sock

# service php-fpm start && chkconfig php-fpm on

buat database owncloud di mysql server

# CREATE DATABASE owncloud;
# GRANT ALL ON owncloud.* TO ‘user’@’localhost’ IDENTIFIED BY ‘Penyamun007’;
# FLUSH PRIVILEGES;
# exit;

database yang kita buat “owncloud” user = user dan passowrd nya = Penyamun007

install nginx webserver
# yum install nginx -y && service nginx start && chkconfig nginx on
# cd /etc/nginx/conf.d/
# nano virtual.conf

masukaan script di bawah :

#################################################

# redirect http to https.
server {
listen 80;
server_name owncloud.penyamun.com;
rewrite ^ https://$server_name$request_uri? permanent; # enforce https
}
# owncloud (ssl/tls)
server {
listen 443 ssl;
ssl_certificate /etc/nginx/certs/momot-cloud.crt;
ssl_certificate_key /etc/nginx/certs/momot-cloud.key;
server_name owncloud.penyamun.com;
root /var/www/owncloud;
index index.php;
client_max_body_size 64M; # set maximum upload size
# deny direct access
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
# default try order
location / {
try_files $uri $uri/ @webdav;
}
# owncloud WebDAV
location @webdav {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
# enable php
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
}

setting SSL untuk HHTPS (pastikan openssl sudah ter install)

# cd /etc/nginx/
# mkdir certs
# touch momot-cloud.crt && touch momot-cloud.key
# openssl req -newkey rsa:2048 -x509 -days 365 -nodes -keyout /etc/nginx/certs/momot-cloud.key -out /etc/nginx/certs/momot-cloud.crt

dan isikan untuk info sertivicate ssl dan next2

reload service nginx

# service nginx restart

dan step terakhir install owncloud

install owncloud
# wget http://download.owncloud.org/community/owncloud-4.5.10.tar.bz2
# tar xjf owncloud-4.5.10.tar.bz2

# mv owncloud /var/www/
# mkdir -p /var/www/owncloud/data
# chmod 770 /var/www/owncloud/data
# chown -R root:apache /var/www/owncloud

login https://IP-SERVER
user = administrator pass = database

dan dy settingan untuk Mysql
user = user , pass = Penyamun007, namedb= owncloud ( sesuai yang kita buat dan setting di mysql )
Finis