How setup my server

1. Check OS version

Check OS version    – centos : rpm –query centos-release

2. Install apache/http

– masuk super user : su – (input username & password)

– jalankan : sudo yum install httpd

– start apache/http : sudo service httpd start

– ubah port jika diperlukan, jalankan : vi /etc/httpd/conf/httpd.conf

– info : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
3. Install mysql

– masuk super user : su – (input username & password)

– jalankan : sudo yum install mysql-server

– start mysql : sudo service mysqld start

– set config mysql : sudo /usr/bin/mysql_secure_installation

– info : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
4. Install php

– masuk super user : su – (input username & password)

– jalankan : sudo yum install php php-mysql

– restart apache/http : sudo service httpd restart

– info : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
5. Install git

– masuk super user : su

– (input username & password)

– update repo : yum update

– install : yum install git

– cek versi git : git –version

– regis : git config –global user.name “mbwn”   git config –global user.email “git@mbwn.co.id”

– info : https://www.liquidweb.com/kb/how-to-install-git-on-centos-6
6. Install Phalcon

a. Check Versi Php : php -v

. Upgrade Php jika dibawah 5.6 harus upgrade Php

*. jika belum terinstall wget : yum install wget

*. jalankan : wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm

*. jalankan : wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm

*. set config : vi /etc/yum.repos.d/remi.repo

*. [remi] = enable=1   [remi-php56] = enable=1 :wq

*. upgrade : yum -y upgrade php*

*. cek kembali versi php : php -v

*. info : https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/

b. Install

*. tambahkan repository : curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.rpm.sh | sudo bash

*. Php 5.6 : sudo yum install php56u-phalcon

*. Php 7   : sudo yum install php70u-phalcon

*. package : sudo yum install php-devel pcre-devel gcc make

*. package : yum –enablerepo=remi,epel install php php-mysql gcc libtool

*. tambahkan extension : echo “extension=phalcon.so” > /etc/php.d/phalcon.ini

*. chmod 777 /var/www/html/ : lakukan untuk permision folder

*. cek extension dan installasi, buat file info.php : <?php echo phpinfo(); ?> dan hit   c. Phalcon

*. dalam akses root pindah ke : cd /opt/

*. package : git clone https://github.com/phalcon/cphalcon.git     #SAMPE SINIH

*. cd cphalcon/build

*. sudo ./install

*. tambahkan extension : echo “extension=phalcon.so” > /etc/php.d/phalcon.ini

*. restart apache/http : service httpd reload dan service httpd restart

*. info : https://tecadmin.net/install-phalcon-php-framework-on-centos-redhat/#

d. masalah Mod-Rewrite is not enabled

*. ubah : AllowOverride None to AllowOverride All pada : /etc/httpd/conf/httpd.conf

*. pastikan .htaccess dan .htrouter.php pada main folder

*. masalah -> Volt directory can’t be written : chmod -R a+w cache (biasanya ada difolder cache)   e. Gagal open Dr 2

*. delete dalam folder filesystem (engine) dan ubah permision filesystem menjadi 777 : chmod 777 /var/www/html/smsengine/filesystem/

7. Installasi CMS

a. copy semua file cms

b. ubah config db

c. ubah config base url

. Installasi Engine

a. copy semua file engine

b. ubah config db

c. ubah permision chache : chmod -R a+w /var/www/html/smsengine/cache

info : https://forum.phalconphp.com/discussion/153/volt-directory-can-t-be-written

d. ubah permision filesystem : chmod 777 /var/www/html/smsengine/filesystem

e. pada check engine, crontab ditambahkan sh pada awal untuk eksekusi file .sh

———————-Configurasi crontab -e

*/10 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_10minutes.sh >> /var/www/html/smsengine/log/engine_10minutes.log#*/30 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_30minutes.sh >> /var/www/html/smsengine/log/engine_30minutes.log
#30 12 * * * sh /var/www/html/smsengine/enginecheck/check_engine_12oclock.sh >> /var/www/html/smsengine/log/engine_12oclock.log00 01 * * * sh /var/www/html/smsengine/enginecheck/check_engine_day.sh >> /var/www/html/smsengine/log/engine_day.log*/1 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_1minute.sh >> /var/www/html/smsengine/log/engine_1minute.log*/1 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_telco.sh >> /var/www/html/smsengine/log/engine_telco.log*/1 * * * * sh /var/www/html/smsengine/enginecheck/check_engine_app.sh >> /var/www/html/smsengine/log/engine_app.log#00 07 * * * sh /var/www/html/smsengine/enginecheck/check_engine_morning.sh >> /var/www/html/smsengine/log/engine_morning.log
00 */1 * * * sh /var/www/html/smsengine/enginecheck/check_engine_1hour.sh >> /var/www/html/smsengine/log/engine_1hour.log

SymptomsHow to set max_allowed_packet size to 16 MB for MySQL?
ResolutionFollow the steps below to achieve the same:
Connect to the server using SSH/RDP.Set the max_allowed_packet value in [mysqld] and [mysqldump] sections of my.cnf file:
[mysqld] max_allowed_packet=16M …. [mysqldump] max_allowed_packet=16M
Restart MySQL service:
# service mysqld restart mysql start/running, process 2496

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s