How to explicity say rediska to use a specified rediska instance
Read article...
Tuesday 27 December 2011
teknik
teknik
Tuesday 20 December 2011
teknik
teknik
How to change console resolution on Centos 5.7
Read article...
Read article...
Tuesday 20 December 2011
teknik
teknik
How to enable Vi editor color support on Centos 5.
Read article...
Read article...
Monday 19 December 2011
teknik
teknik
Installing nginx is straightforward, so I will not go into details, just check the nginx documentation for more.
First create a repo file.
and add following content to repo file:
Install using added repos.
First create a repo file.
vi /etc/yum.repos.d/nginx.repo
and add following content to repo file:
CentOS [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1To install php 5.3.8 we need extra repos (source article).
## Remi Dependency on CentOS 5 and Red Hat (RHEL) 5 ## rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
## CentOS 5 and Red Hat (RHEL) 5 ## rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Install using added repos.
yum --enablerepo=remi install nginx php php-fpm php-commonInstall necessary php modules for you.
yum --enablerepo=remi install php-pearStart Nginx
/etc/init.d/nginx start ## use restart after update ## OR ## service nginx start ## use restart after updateStart PHP-FPM
/etc/init.d/php-fpm start ## use restart after update ## OR ## service php-fpm start ## use restart after updateAutostart Nginx on boot
chkconfig --add nginx chkconfig --levels 235 nginx on #Autostart PHP-FPM on boot chkconfig --add php-fpm chkconfig --levels 235 php-fpm onNow it is time to configure nginx to work with php.
vi /etc/nginx/conf.d/test.confput these lines into file.
server {
server_name example.net;
access_log /var/logs/nginx/example.access.log;
error_log /var/logs/nginx/example.error.log;
root /var/www/example;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/example$fastcgi_script_name;
}
}
restart nginx
service nginx restartcreate an index file to test.
vi /var/www/example/index.php
<?php phpinfo(); ?>
Friday 16 December 2011
teknik
teknik
Mercurial may not be present in default repo that comes with a fresh Centos 5 install. Adding RPMForge repo should solve the problem. I will copy paste necessary section from Centos wiki:
Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i
for i386 :
Install DAG's GPG key
Install the package
Then try to install something like this
Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i
for i386 :
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpmfor x86_64:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpmThe preferred rpmforge-release package to retrieve and to install in order to enable that repository is one of the two listed above.
Install DAG's GPG key
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txtVerify the package you have downloaded
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpmSecurity warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends.
Install the package
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpmThis will add a yum repository config file and import the appropriate GPG keys.
Then try to install something like this
yum install mercurialit is done.