VNC Server on KDE and Lubuntu

Posted by root on Wednesday May 22, 2013 Under Bash, Debian, Linux, Remote Access, Ubuntu

To run a fast desktop manager over slow internet connection use LXDE Desktop Manager or Lubuntu.

The file “~//.vnc/xstartup” must be changed such way:

xrdb $HOME/.Xresources
xsetroot -solid black
lxterminal &
/usr/bin/lxsession -s LXDE &

For Lubuntu:

[ -r HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

/usr/bin/lxsession -s Lubuntu -e LXDE &
Tags : | add comments

Mounting a Linux Raid Partition

Posted by root on Wednesday May 22, 2013 Under Bash


mount: unknown filesystem type 'linux_raid_member'
# fdisk -l /dev/sdb 

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


You should not mount it directly using mount. You need first to run mdadm to assemble the raid array. A command like this should do it:

$ mdadm --assemble --run /dev/md0 /dev/sdc1

If it refuses to run the array because it will be degraded, then you can use –force option. This is assuming you don’t have /dev/md0 device. Otherwise, you need to change this name.

When this command is executed successfully, you can mount the created device normally using:

$ mount /dev/md0 /mnt/test
Tags : | add comments

Install HTOP on CentOS 6 64-bits x86_64

Posted by root on Sunday May 19, 2013 Under Bash, Centos, Linux

Installation process::

For CentOS 6 x86_64 – 64 bits

# wget
# rpm -ihv rpmforge-release*.rf.x86_64.rpm


Once RPMforge repository is installed on server then start installation with yum command.

# yum install htop

Now run following command on the terminal for server monitoring.

# htop
Tags : | add comments

Install php-mcrypt in a Centos 6

Posted by root on Sunday May 19, 2013 Under Bash, Centos, Linux, MySql, PHP

The default installation of virutalmin doesn’t come with additional PHP extensions which some php scripts may need, you have to manually install each php extension compare with easyapache from cPanel which you can install all at once.

Add centOS repo

For CentOS 5

rpm -Uvh

For CentOS 6

rpm -Uvh
yum install php-mcrypt

Check php.ini location ( /etc/php.ini is the default virtualmin php.ini location )

php -i | grep php.ini
nano /etc/php.ini

add extension to php.ini


Restart Apache Server

/etc/init.d/httpd restart

After adding centOS Repositories, you could install php extension from virtualmin GUI

Webmin > System Software Packages > Choose Package from YUM >

Click Browse YUM, type the php extension name in the search box and click find packing matching button, and then click the package name install.

Add php extension to php.ini from virtualmin GUI

Webmin > Others > PHP Configuration > Edit Manually
Don’t forget to restart apache server.

Most popular PHP extension you may need:
Format: extension = [extension name].so

•pdo_mysql (requires pdo)
•pdo_odbc (requires pdo)
•pdo_pgsql (requires pdo)
•pdo_sqlite (requires pdo)

Tags : | add comments

Upgrade Teamspeak Server in Linux OS

Posted by root on Tuesday May 7, 2013 Under Bash, Centos, Linux, Ubuntu

You won’t loose any channel or user or permission during your update.

Make a copy of your database file called ts3server.sqlitedb (needed for a downgrade and it’s alays better to have a backup)

Now download the server and extract it to the old server folder. Overwrite all files.

Start the server and its done

Tags : | add comments

Change hostname in CentOS

Posted by root on Tuesday May 7, 2013 Under Bash, Centos

This article will cover a simple server hostname change in CentOS. By default your server will be kicked with the server’s given name as the hostname. Some software such as CPanel require a valid Fully Qualified Domain Name or FQDN for the hostname to be used during their Licensing verification system.

1 Hostname Change
1.1 Sysconfig/Network
1.2 Hosts File
1.3 Run Hostname
1.4 Restart Networking

Hostname Change
There are 4 steps in a hostname change, luckily all the steps are easy.


Open the /etc/sysconfig/network file with your favorite text editor. Modify the HOSTNAME= value to match your FQDN host name.

# sudo nano /etc/sysconfig/network

Hosts File

Change the host that is associated to your main IPaddress for your server, this is for internal networking (found at /etc/hosts): hostname

Run Hostname

The ‘hostname’ command will let you change the hostname on the server that the commandline remembers, but it will not actively update all programs that are running under the old hostname.


Restart Networking

At this point all the necessary changes that needed to be made have been made, you will want to restart networking on your server to make sure that changes will be persistent on reboot:

# /etc/init.d/network restart


Tags : | add comments

Disable or Enable All WordPress Plugins via the Database

Posted by root on Friday May 3, 2013 Under MySql, Wordpress

Before beginning, make a backup copy of your database. Then, login to your database using phpMyAdmin (or whatever), and navigate to the “active_plugins” column of the “wp_options” table using the following SQL query (edit the default WordPress table prefix “wp_” if needed):

SELECT * FROM wp_options WHERE option_name = 'active_plugins';

Once the active_plugins column appears, click to edit it. You will see something similar to the following, depending on the number and type of plugins you have installed:


That entire array of code represents every active plugin on your site. Thus, to quickly disable all plugins without using the WP Admin area, highlight the entire block of code, cut it out, and paste it into a safe, offline text file. After removing the code, click the button to save your changes and that’s it. All WordPress plugins are now deactivated (yet still installed, and with all plugin options intact). This obviously is a huge time-saver that really comes in handy during those mission-critical, time-sensitive situations where every second counts. Once you are ready to re-activate your entire set of plugins, simply cut/copy & paste the preserved code back into the “active_plugins” field. Click save and done.

Alternately, here is a one-second query to disable all plugins:

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

Upon execution, this query will clear the active_plugins field of all active plugins (duh), effectively disabling (without uninstalling or modifying) the entire set. This method is great if you plan on re-enabling each plugin individually, say, after resolving some heinous server error. Whereas the previous technique makes it easy to re-enable all plugins en masse, this query is perfect for simply “nuking” all active plugins with no remorse. 😉

Updated Method

Apparently, this method works only for WordPress versions less than 2.9. For 2.9 and better, use this instead:

UPDATE wp_options SET option_value = ‘a:0:{}’ WHERE option_name = ‘active_plugins’;

Tags : | add comments