Install IonCube Loader

Get the latest version of the ionCube Loader from

http://ioncube.com

1. Download Ioncube Loader

[root@esjeruk ~]# cd /tmp
[root@esjeruk ~]# wget http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
[root@esjeruk ~]# cd ioncube/
[root@esjeruk -]# mkdir /usr/local/lib/ioncube
[root@esjeruk ~]# mv ioncube_loader_lin_5.0.so /usr/local/lib/ioncube/

2. Now edit /etc/php.ini/

add this line and right at the beginning
[root@esjeruk ~]# nano /etc/php.ini
[PHP]
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.0.so
[root@esjeruk ~]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
with the ionCube PHP Loader v4.0.9, Copyright (c) 2002-2011, by ionCube Ltd.

Post to Twitter

Posted in centos, ioncube, php | 1 Comment

Upgrade PHP 5.1 to 5.2 in Centos

Step 1: Go to yum folder

[root@esjeruk server]# cd /etc/yum.repos.d/

Step 2: Add new repo

[root@esjeruk yum.repos.d]# vi C5.repo
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*

Step 3 : Upgrade 

[root@esjeruk server]# yum install httpd php php-mysql php-gd php-mbstring php-mcrypt mysql mysql-server

Step 4 : Check Version

[root@esjeruk server]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Post to Twitter

Posted in apache, centos, php, upgrade | Leave a comment

Install and set password mysql-server on Centos

Install mysql-server via yum

yum install mysql-server
/etc/init.d/mysqld restart

Then set root password

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -p -h code.dms.local password 'new-password'

 

Post to Twitter

Posted in mysql, password | Leave a comment

How to convert RHEL 5 to Centos 5

Step 1 : 

rpm -e --nodeps redhat-release

Step 2 : 

rpm -e --nodeps yum-rhn-plugin

Step 3 :

wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

Step 4 :

rpm --import RPM-GPG-KEY-CentOS-5

Step 5 :

rpm -Uvh http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.3-3.x86_64.rpm

Step 6 :

rpm -Uvh http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-5-3.el5.centos.1.x86_64.rpm

Step 7 :

wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm

Step 8 :

yum clean all
yum update

Post to Twitter

Posted in centos, RHEL | Leave a comment

How to create a Self-Signed SSL Certificate

Step 1: Generate a Private Key

[root@esjeruk:/home/server] openssl genrsa -des3 -out server.key 1024
Generating RSA private key, 1024 bit long modulus
..++++++
.......................++++++
e is 65537 (0x10001)

Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:

 

Step 2: Generate a CSR (Certificate Signing Request)

[root@esjeruk:/home/server] openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key:

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:ID
State or Province Name (full name) [Berkshire]:Jakarta
Locality Name (eg, city) [Newbury]:Jakarta
Organization Name (eg, company) [My Company Ltd]:Esjeruk
Organizational Unit Name (eg, section) []:Esjeruk
Common Name (eg, your name or your server's hostname) []:esjeruk
Email Address []:support@esjeruk.org
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:esjeruk
An optional company name []:

 

Step 3: Remove Passphrase from Key

[root@esjeruk:/home/server] cp server.key server.key.org
[root@esjeruk:/home/server] openssl rsa -in server.key.org -out server.key
Enter pass phrase for server.key.org:
writing RSA key

 

Step 4: Generating a Self-Signed Certificate

[root@esjeruk:/home/server] openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=ID/ST=Jakarta/L=Jakarta/O=Esjeruk/OU=Esjeruk/CN=esjeruk/emailAddress=support@esjeruk.org
Getting Private key

 

Step 5: Installing the Private Key and Certificate

[root@esjeruk:/home/server] cp server.crt /usr/local/apache/conf/ssl.crt
[root@esjeruk:/home/server] cp server.key /usr/local/apache/conf/ssl.key

 

Step 6: Configuring SSL Enabled Virtual Hosts

SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key

 

Step 7: Restart Apache and Test

[root@esjeruk:/home/server] /etc/init.d/httpd restart

Post to Twitter

Posted in apache, https, ssl | Leave a comment