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

How to Verify a CentOS Linux Server is 32 Bit or 64 Bit

To verify if a system is 32 bit versus 64 bit you can use the uname command. Below are examples of using the uname command from the CLI on a 32 bit system followed by using the uname command on a 64 bit system.

32 Bit CentOS Linux Server

BASH

[root@server ~]# uname -a

Linux server1.example.com 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 19:33:52 EDT 2008 i686 i686 i386 GNU/Linux

64 Bit CentOS Linux Server

BASH
[root@server ~]# uname -a
Linux server.example.com 2.6.18-53.1.21.el5 #1 SMP Tue May 20 09:35:07 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

As you can see above the 64 bit server will show x86_64 numerous times after the install date and time. The 32 bit system will show i686 and i386 after the install date and time. So it is very easy to verify if a system is 32 bit versus 64 bit using the “uname -a” command from a shell.

ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

The following steps are to reset the password for a user in case you forgot, this would also solve your mentioned error.

First, stop your MySQL:

sudo /etc/init.d/mysql stop

or

sudo service mysqld stop

Now start up MySQL in safe mode and skip the privileges table:

sudo mysqld_safe --skip-grant-tables &

and then Login with root:

mysql -uroot

And assign the DB that needs to be used:

use mysql;

Now all you have to do is reset your root password of the MySQL user and restart the MySQL service:

update user set password=PASSWORD("YOURPASSWORDHERE") where User='root';

flush privileges;

quit and restart MySQL:

quit

sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql start Now your root password should be working with the one you just set, check it with:

mysql -u root -p


and....

walaaaaa...

it works!!!