Blog Hosting, Server, Linux, Jaringan Komputer dan Internet 

Install, Upgrade dan Downgrade PHP

Published on November 23, 2014, by in Tutorial.

Installing/ Upgrading/ Downgrading PhP version
Installing PhP

1) Installing PhP via yum RPM Packages

First time installing php on your server = refer to “Installing PhP together with mysql”

2) Installing PhP via Source (w/o yum )

Download the “tar.gz” file from :-

http://us1.php.net/get/php-5.3.17.tar.gz/from/a/mirror

Extract to a folder (in your linux host)

# ./configure

# make

# make install

– the problem with installing via source – is that our VM is not installed with the gcc compiler and other stuffs – that are needed for installation from source to be successful.
– you will have to find out how to install those other stuffs before you can install php via source.

Therefore, we suggest installing via yum instead.

——————————————————————————

Upgrading PhP

Check your php version

# yum info php

Look at the installed packages= eg. Version: 5.3.16-9

Upgrade PhP ver 5.3 to the latest version

Download and install the atomic.repo file located in = /etc/yum.repos.d.

# cd /etc/yum.repos.d

# wget -q -O – http://www.atomicorp.com/installers/atomic |sh

Check the available latest php version from atomic repo server :

# yum check-update php

-> you will see eg. :-

Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www2.atomicorp.com
* rpmforge: repoforge.spinellicreations.com

php.i386 5.4.22-28.el5.art atomic

-> which means that the latest version is = 5.4.22-28

# yum update php
# yum update php php-* mysql-*
=> yum upgrade all available installed php and mysql packages to the latest version – getting them from the atomic repo server.

If you want to install additional packages :-
# yum install php-mcrypt php-mhash php-mssql php-tidy
=> this is installing php packages = “php-mcrypt”, “php-mhash”, “php-mssql”, “php-tidy” – of the latest version – getting them from the atomic repo server

# /etc/init.d/httpd restart

Check that all your php packages are of the latest version = # rpm -qa | grep php

———————————————————————————————

Downgrading PhP

# yum downgrade php*

– repeat the process again if you want to downgrade further.

If you are unable to downgrade further using the above method :

Example -> by doing the above method, the oldest PhP version that you get is = 5.3.16-9

Let say you want to install PhP ver 5.2.5-7 , but currently you have PhP version 5.3.16-9

Firstly, you want yum to stop updating php with the latest version :-

————————————————–
-> vi /etc/yum.repos.d/atomic.repo
add this line (after the last line)= exclude=php*

exclude php and kernel packages during yum update

vi /etc/yum.conf

Append the following line under [main] section, enter:
exclude=php* kernel*

————————————————–

> Check/List existing (installed) php packages :-

# rpm -qa | grep php

eg. you get :-

php-5.3.16-9.el5.art
php-common-5.3.16-9.el5.art
php-cli-5.3.16-9.el5.art
php-gd-5.3.16-9.el5.art
php-mcrypt-5.3.16-9.el5.art
php-tidy-5.3.16-9.el5.art
php-mssql-5.3.16-9.el5.art
php-mbstring-5.3.16-9.el5.art
php-ldap-5.3.16-9.el5.art
php-pdo-5.3.16-9.el5.art
php-xml-5.3.16-9.el5.art
php-mysql-5.3.16-9.el5.art

> Remove all of the existing php 5.3 packages :-

# yum remove php-5.3.16-9.el5.art
# yum remove php-gd-5.3.16-9.el5.art
# yum remove php-common-5.3.16-9.el5.art ( this will automatically remove several other pkgs too )

and so on .. remove everything

# service httpd restart

# yum info php ( you should get nothing – no php )

– or check via your web browser = /phpinfo.php

> Download php packages

http://www6.atomicorp.com/channels/atomic/centos/5/i386/RPMS/ ( this link may not get you to much older RPMs )
http://rpmfind.net/linux/rpm2html/search.php (this link might get you much older RPMs)
http://rpm.pbone.net/ (you can also try searching here eg. search for = php-cli-5.2.5-7.i386.rpm )

-> You are looking for php packages of version = 5.2.5-7
-> look for i386 (32bit) , CentOs 5.10 ( -check your CentOS version)

eg. version 5.2.5-7

php-5.2.5-7.i386.rpm
php-cli-5.2.5-7.i386.rpm
php-common-5.2.5-7.i386.rpm
php-dba-5.2.5-7.i386.rpm
php-devel-5.2.5-7.i386.rpm
php-gd-5.2.5-7.i386.rpm
php-imap-5.2.5-7.i386.rpm
php-ldap-5.2.5-7.i386.rpm
php-mbstring-5.2.5-7.i386.rpm
php-mcrypt-5.2.5-7.i386.rpm
php-mssql-5.2.5-7.i386.rpm
php-mysql-5.2.5-7.i386.rpm
php-pdo-5.2.5-7.i386.rpm
php-tidy-5.2.5-7.i386.rpm
php-xml-5.2.5-7.i386.rpm

or version = 5.2.17-1

php-5.2.17-1.el5.art.i386.rpm
php-cli-5.2.17-1.el5.art.i386.rpm
php-common-5.2.17-1.el5.art.i386.rpm
php-dba-5.2.17-1.el5.art.i386.rpm
php-devel-5.2.17-1.el5.art.i386.rpm
php-gd-5.2.17-1.el5.art.i386.rpm
php-imap-5.2.17-1.el5.art.i386.rpm
php-ldap-5.2.17-1.el5.art.i386.rpm
php-mbstring-5.2.17-1.el5.art.i386.rpm
php-mcrypt-5.2.17-1.el5.art.i386.rpm
php-mssql-5.2.17-1.el5.art.i386.rpm
php-mysql-5.2.17-1.el5.art.i386.rpm
php-pdo-5.2.17-1.el5.art.i386.rpm
php-tidy-5.2.17-1.el5.art.i386.rpm
php-xml-5.2.17-1.el5.art.i386.rpm

> Upload to /etc/yum.repos.d/

> Start installing the older PhP

# cd /etc/yum.repos.d/

— example with version 5.2.5-7 :-

# yum install php-common-5.2.5-7.i386.rpm
# yum install php-cli-5.2.5-7.i386.rpm
# yum install php-5.2.5-7.i386.rpm

.. and so on with lastly :-

# php-mssql-5.2.5-7.i386.rpm
# php-mysql-5.2.5-7.i386.rpm

> If there is problem installing any one of the package
eg. — missing dependancy (it will show which rpm is needed) = install the needed package first, and try installing the problem package again.
eg. — if there are other errors -> try # yum clean all, # service httpd restart, and install that package again
eg. — It reports rpm not signed -> you will need to disable the “sign” checks at = /etc/yum.conf
# vi /etc/yum.conf
gpgcheck=0
# service httpd restart
-> try installing again
( just for your info = there is also a gpgcheck=1 at /etc/yum.repos.d/atomic.repo )

— example with version 5.2.17-1 :-

# yum install php-5.2.17-1.el5.art

– this will automatically install = php-cli-5.2.17-1.el5.art , php-common-5.2.17-1.el5.art

– continue installing the rest ( the same as mentioned above )

.. and lastly (these two must be installed last) :-

# yum install php-mssql-5.2.17-1.el5.art.i386.rpm
# yum install php-mysql-5.2.17-1.el5.art.i386.rpm

———————————–

Restart apache = # service httpd restart

# yum info php

You should see installed php Version: 5.2.5-7 ( or 5.2.17-1 )

# service mysqld restart

Go to web browser, check = /phpinfo.php

==================================

More commands:-

List missing dependant rpm files ( once you know them, you can then install them using yum )

# yum install yum-utils ( to get the utility package-cleanup )

# package-cleanup –problems

 

dikutip dari : https://docs.comp.nus.edu.sg/node/4119

Tags: ,

Pointing domain menggunakan ns record di zpanel

Published on August 7, 2014, by in Tutorial.

Cara pointing menggunakan name server ns1 dan ns2 pada server zpanel cukup mudah.

Pada penyedia domain

Tambahkan ns1 dan ns2, seperti gambar berikut

xnsus

 

Pada Server Zpanel

Addon Domain xns.us tersebut

Pilih DNS Management –> Manage domain kemudian pilih domain dan Edit

Pada A record

xns-arecord

Pada NS Record ganti ns1 dengan ns1.drnet.biz

xns-nsrecord

Zantastico X pengganti Fantastico

Published on July 4, 2014, by in Tutorial.

Berhubung control panel yang kita install di server centos adalah zpanel alias control panel opensource yang fiturnya masih terbatas tidak selengkap cpanel yang berbayar dan harganya yang luar biasa, maka untuk memudahkan install cms misalkan wordpress saya install zantastico x dengan langkah sebagai berikut :

Masuk ke terminal dengan root akses, masukan repo dengan perintah berikut

# zppy repo add zppy-repo.mach-hosting.com
# zppy update

Setelah selai kita langsung install Zantastico X

# zppy install zantasticox

Selesai install Zantasticox

zantasticox-selesai

 

Untuk mengaktifkan ZantastocoX yang telah diinstall tadi, masuk ke zadmin pilih menu

Server Admin –> Module Admin

Pada List Configure Module Centang Semua Andministrator, Reseller dan User

zadmin-module

Kemudian Simpan perubahan dengan menekan button Save Changes

zadmin-save

Sekarang Zantastico ada dalam Sub Menu Advance

zantastico-advance

Untuk install cms misalnya wordpress pada Zantastico X caranya tinggal klik menu Zantastico dan pilih Install pada WordPress

zantastico-install

 

Untuk upgrade Zantastico, eksekusi perintah berikut :

# zppy update
# zppy upgrade zantasticox

Kalo mau remove zantastico gini caranya (tanpa huruf’x’)

#zppy remove zantastico

Selamat Bereskperiment.

Cara mengetahui port yang terbuka di centos

Published on July 1, 2014, by in Tutorial.

Untuk mengetahui port yang terbuka di centos menggunakan perintah netstat -ntulp di terminal server kita

Login sebagai root, masukan perintah :

# netstat -ntulp

akan muncul tampilan seperti ini

melihat-port-aktif

artinya port yang muncul adalah port yang terbuka.

Untuk menjalakannya menggunakan perintah

# service nama-service start

contoh untuk httpd :

# service httpd start

Cara Membuat Sub-Domain di ZPanel

Published on June 28, 2014, by in Tutorial.

Misalkan kita akan membuat subdomain dengan nama subdomain.domain.com

  1. Pada Domain Management, Klik Sub Domains
  2. Ketik Sub domain
  3. Pilih Directory, Kemudian klik Create
  4. Pada menu atas, Klik Domain, DNS Manager
  5. Pilih domain, kemudian klik Edit
  6. Pada tab CNAME, klik Add New Record
  7. Tuliskan subdomain subdomain.domain.com
  8. Add new record: subdomain 3600 in CNAME @
  9. Klik Save Changes. (Tunggu sekitar 5 menit)

Membuat name server ns1 dan ns2 di ZPanel

Published on June 23, 2014, by in Tutorial.

Untuk membuat Name server yang biasanya berupa ns1 dan ns2 di zpanel cukup mudah.

Awalnya tentu kita masuk dulu ke zpanel control panel kita kemudian masuk menu :

Domain management –> Domains

Isi kolom domain dengan nama domain anda

z1

Centang pada Create a new directory home, kemudian klik menu Create

z2

tunggu lebih kuran 2 – 5 menit samapai domain tersebut live

setelah itu cek kembali sampai muncul domain  live seperti berikut

z3

Setelah aktif silakan klik menu

Domain Management –> DNS Management –> Domain dan klik menu Edit

z4

Klik pada kolom ns, seharusnya standar nsa dan ns2 sudah dibuat seperti berikut

z5

Tunggu hingga maksimal 24 jam agar ns1 dan ns2 bisa digunakan sebagai name server. Semoga bermanfaat

Install Zpanel di Centos 6.5

Published on June 23, 2014, by in Tutorial.

Langkah awal update server centos kita

# yum update

kemudian reboot

# reboot

Jalankan script

# bash <(curl -LSs https://raw.github.com/zpanel/installers/master/install/CentOS-6_4/10_1_1.sh)

Script tersebut berjalan untuk 32bit dan 64 bit

Download Installer ZPanel

# wget https://raw.github.com/zpanel/installers/master/install/CentOS-6_4/10_1_1.sh

Buat file zpanel agar bisa dieksekusi

# chmod +x 10_1_1.sh

Eksekusi installer zpanel

# ./10_1_1.sh

Ikuti perintah pada saat instalasi

Tekan Y untuk melanjutkan

zpanel1

Pengaturan Time Zone, pilih 5 untuk Asia

zpanel2

Pilih 15 untuk negara indonesia

zpanel3

Pi;ih 1 untuk jawa barat

zpanel4

Jika sudah benar pilih 1 dan enter

zpanel5

Masukan subdomain “ingat.. harus subdomain ..  bukan domain utama !!!”

zpanel6

Masukan ip public # maaf ane sensor .. heheh

zpanel7

Tunggu sampai proses install selesai

zpanel8

Untuk login ke zpanel, file login dan password root tersimpan di :

#  /root/passwords.txt

Silakan buka dengan editor kesayangan anda, kalo saya pake editor nano.

Buka browser dan masukan ip server anda, login ke zpanel dengan username : zpanel dan password yang diberikan di password.txt tersebut

zpanel9

 

Tampilan awal setelah login

zpanel10

Semoga bermanfaat.

# Catatan penting !!

Jangan lupa untuk men-setup subdomain zpanel di nameserver DNS Anda, dengan panel registrar domain atau dengan modul manajemen ZPanel DNS sesuai dengan nameserver Anda terpilih. JANGAN menambahkan sub domain zpanel Anda di dalam ZPanel!

Cara Disable SELinux

Published on June 23, 2014, by in Tutorial.

Kali ini catatan kecil tapi cukup bermanfaat, yaitu cara disable SELinux di server centos 6.5 yang kita pakai.

Edit file /etc/selinux/config dan set SELINUX=disabled seperti berikut :

# nano /etc/selinux/config

Cari script SELINUX

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# mls – Multi Level Security protection.
SELINUXTYPE=targeted

Simpan setingan dan reboot server anda.

 

Sharing Network Centos 6.5

Published on June 23, 2014, by in Tutorial.

Langkah awal kita disable selinux

# system-config-firewall-tui

Kemudian konfigurasi network

# system-config-network

Sekarang enable ONBOOT untuk kedu network eth0 dan eth1 agar network otomatis aktif setelah booting

# /etc/sysconfig/network-scripts/ifcfg-eth0

# /etc/sysconfig/network-scripts/ifcfg-eth1

cari scrip ONBOOT dan ganti dengan yes

[…]
ONBOOT=yes
[…]

Langkah terakhir reboot server

# reboot

Cek setingan ip dengan ifconfig

# ifconfig

Keep ngoprek, semoga berhasil

 

Cara install virtualmin di Centos 6.5

Published on June 23, 2014, by in Tutorial.

Kali ini akan kita install virtualmin untuk manajemen server centos 6.5 kita.

Langkah awal kita update server centos kita

yum update -y

virtualmin1

wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
./install.sh

Proses install virtualmin

virtualmin2

Tunggu sampai proses selesai

virtualmin3

Silakan buka browser untuk masuk ke admin panel https://ipserver:10000

virtualmin4

Ok proses selesai, semoga bermanfaat.