Install Phalcon framework in Debain 6/7

This repo can be used additionally to the squeeze-php54 repo of dotdeb.org.

Add the following into /etc/apt/sources.list

deb http://debrepo.frbit.com/ frbit-squeeze main

Add the key, update apt and install packages

wget -O – http://debrepo.frbit.com/frbit.gpg | sudo apt-key add –
aptitude update
aptitude install php5-igbinary php5-mongo php5-oauth php5-phalcon php5-runkit php5-stats php5-stomp php5-yaf php5-yaml

Share

Reset root password in Centos/Redhat/SL linux

1. Boot the system and when you see the following message “Press any key to enter the menu”, press any key. (You will see the list of available kernel versions.)

2. Press e in order to edit commands before booting.

3. Highlight the list item with vmlinuz in it by using the arrow keys and press e.

4. Now type single or init 1 at the end of the line.

Read more

Share

Importing Big mysqldump with Progress Bar PV

I am using CentOS 6.4 box, so it requires me to install EPEL repo at the first place:

$ rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Install pv using yum:

$ yum install -y pv

Installation done. Let the importing begin!

$ pv /home/user/my_big_dump.sql | mysql -uroot -p

For Ubuntu/Debian distribution intall PV using-

apt-get install pv

 

Share

PHP enable error reporting

You can set PHP error reporting on in php.ini file (in case you have access to this file). Set the following lines:

error_reporting = E_ALL
display_errors = On

If you have no access to php.ini file but you can modify .htaccess file on your server (in root of your public_hml folder – your Joomla! site), try to add the following code there (on some servers this option is disabled, so you need to ask your webhosting operator):

# Displaying PHP errors
php_flag display_errors on
php_value error_reporting 6143

Share

Installing Apache2, PHP5, MySQL and PHPMyadmin On Debian

First we install MySQL 5 like this:

apt-get install mysql-server mysql-client

You will be asked to provide a password for the MySQL root user – this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on:

New password for the MySQL "root" user: <– yourrootsqlpassword
Repeat password for the MySQL "root" user: <– yourrootsqlpassword

3 Installing Apache2
Apache2 is available as a Debian package, therefore we can install it like this:

apt-get install apache2

Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page (It works!):

Read more

Share

Install VNCServer on Centos 5

Install VNC Server to operate CentOS with GUI remotely from Windows client. VNC is already installed if you already build Desktop Environment. If it's not installed, Install by a command 'yum -y install vnc-server'.

[root@ns ~]# yum -y install vnc-server

[root@ns ~]# vi /etc/sysconfig/vncservers

# line 20: make valid and set as '(diplay number):(user name)' like follwing example
VNCSERVERS="1:cent"

# line 21: uncomment and remove '-localhost' like below
# And set any screen resolution you like
VNCSERVERARGS[1]="-geometry 1024×768 -nolisten tcp -nohttpd"

[root@ns ~]# su – cent
[cent@ns ~]$ vncpasswd# set VNC password
Password:# input
Verify:# verify
[cent@ns ~]$ su –
Password:
[root@ns ~]# /etc/rc.d/init.d/vncserver start
Starting VNC server: 1:cent
New 'ns.server-linux.info:1 (cent)' desktop is ns.server-linux.info:1

Creating default startup script /home/cent/.vnc/xstartup
Starting applications specified in /home/cent/.vnc/xstartup
Log file is /home/cent/.vnc/ns.server-linux.info:1.log
[ OK ]
[root@ns ~]# vi /home/cent/.vnc/xstartup

# at the bottom: make it comment
#twm &

# run Ghome
exec gnome-session &

[root@ns ~]# /etc/rc.d/init.d/vncserver restart
Shutting down VNC server: 1:cent[ OK ]
Starting VNC server: 1:cent
New 'ns.server-linux.info:1 (cent)' desktop is ns.server-linux.info:1

Starting applications specified in /home/cent/.vnc/xstartup
Log file is /home/cent/.vnc/ns.server-linux.info:1.log

Read more

Share

.htaccess URL redirect

# This allows you to redirect your entire website to any other domain
Redirect 301 / http://mt-example.com/

# This allows you to redirect your entire website to any other domain
Redirect 302 / http://mt-example.com/

# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://example.com/newdirectory/

# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html

# Provide Specific Index Page (Set the default handler)
DirectoryIndex index.html

Share

OpenFiler Installation On Headless NAS

So, you have a Dell 715N nas or similar and wish to install OpenFiler onto it? This nas is headless, it has no USB ports, no CDROM, no floppy. It’s only connection to the outside world is it’s serial port and it’s network interfaces (2).

You may or may not have installed Linux via PXE boot before. You also may or may not have used a serial console. Today we will do both in order to install OpenFiler.

OpenFiler is built using rBuilder, which is rPath’s distro creation tool. This system spits out .iso files (among other formats) that are very similar to (read: based upon) RedHat installation CDs. They use Anaconda as their installer. Thus documentation pertaining to kickstart servers applies here. Follow the steps below to perform the installation.

Read more

Share