Showing entries 111 to 120 of 131
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: centos (reset)
Linux: How do you rename a user account in linux?

In Linux, there is no command which will rename a user account. If you make a mistake creating a user account, user changes their name or if user does not like his user name, there is no real easy way of going and making the change. Only thing I know you can do is to go through some files and rename user manually. Let us say that we have a user who is named joe and we want to rename him to john.

Note: you must be logged in as root to do following.

vi /etc/passwd
find joe and change it to john, save/exit

vi /etc/group
find joe and change it to john, save/exit

vi /etc/shadow
find joe and change it to john. This file is read only and you have to force overwrite it. In vi it is :w! once saved, quit.

cd /home
mv joe john

And that should do the trick.

[Edited] Right after I posted this post, I was contacted and was told to look at utility called usermod. Read …

[Read more]
MySQL: How do you use symlinks with MySQL tables?

Creating table symlinks in MySQL is very easy and it is probably one of the features a lot of MySQL users overlook or never think about. You may ask, why would I want to use symlinks? Some of the reasons you would want symlinks is if you are running low on disk space on the partition where your data generally is and/or you want to move one (or more) table(s) on to a different disk/partition for performance reasons.

One of the things worth mentioning is that MySQL documentation states: “Symlinks are fully supported only for MyISAM tables. For files used by tables for other storage engines, you may get strange problems if you try to use symbolic links.” Keeping that in mind, if you have a innodb table and would like to create symlinks for, you should change the engine type to myisam before symlinking. Although, I have heard and personally used symlinks for innodb databases with no side affects.

First let us find out if your MySQL …

[Read more]
Linux: How do you display specific information at login prompt in Linux on the console?

Buddy of mine asked me a question over chat today: “how do I show my machines’ IP at login prompt with out logging in?” He is referring to his Virtual Machine in this case. He does not want to have to log in to the server to see what ip it has (since its on dhcp) for him to ssh in or hit it from the browser. I could have answered him with a simple how to but what is the fun in that? So I decided to give some background on how login prompts are done and show what can be done.

When Linux server boots up, it calls a program called mingetty. This program creates that infamous login prompt as show in a screenshot:

You can see how server calls the mingetty program by looking at /etc/inittab. You will see a block like below:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3

[Read more]
pre-compiled binaries in your PATH

I prefer to install mySQL using the pre-compiled binaries. Depending on the environment, these usually go in either /opt or /usr/local. When you choose this type of install, chances are you are going to need to ensure that you somehow configure your system so that the mysql binaries end up in your PATH. If you are [...]

MySQL: Solution for ERROR 1442 (HY000): Can’t update table ‘t1′ in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

Here is a sample table you can create to test following problem/solution on: CREATE TABLE `t1` ( `a` char(1) default NULL, `b` smallint(6) default NULL ); insert into t1 values ('y','1'); I have a table t1 which has column a and b, I want column a to be updated to ‘n’ when column b = 0. Here is the first version [...]

Virtual Hosting Howto With Virtualmin On CentOS 5.1

Virtual Hosting Howto With Virtualmin On CentOS 5.1

This tutorial shows how to set up a CentOS 5.x server to offer all services needed by virtual web hosters. These include web hosting, smtp server with (SMTP-AUTH and TLS, SPF, DKIM, Domainkeys), DNS, FTP, MySQL, POP3/IMAP, Firewall, Webalizer for stats.

Virtual Hosting Howto With Virtualmin On CentOS 5.1

Virtual Hosting Howto With Virtualmin On CentOS 5.1

This tutorial shows how to set up a CentOS 5.x server to offer all services needed by virtual web hosters. These include web hosting, smtp server with (SMTP-AUTH and TLS, SPF, DKIM, Domainkeys), DNS, FTP, MySQL, POP3/IMAP, Firewall, Webalizer for stats.

MySQL: How do you set up master-master replication in MySQL? (CentOS, RHEL, Fedora)

Setting up master-master replication in MySQL is very similar to how we set up master/slave replication. You can read up about how to setup master/slave replication in my previous post: How to set up master/slave replication in MySQL. There is obviously pros and cons about using master/master replication. But this is not [...]

[Read more]
Fosdem 2008

This February I`ll be heading to my 8th Fosdem in row.

I went to every single Fosdem so far, some years only one day because of other obligations but I was a round most of the time
During the first couple of years I was pretty active in the FIT team, helping out people to find the right rooms , keeping the fosdem contributions safe with Sven, funding different social events and devroom dinners ,
Later I was in charge of the HPC and Cluster devroom in which we also held the openMosix summits.
And back in 2004 I replaced Moshe at the openMosix Summit standing in front of a great audience at the Janson room.

As Wim just pointed out the Drupal Devroom schedule is out
and it seems like 2008 will …

[Read more]
MySQL: How do you set up master-slave replication in MySQL? (CentOS, RHEL, Fedora)

Before we go into how to set up master-slave replication in MySQL, let us talk about some of the reasons I have set up master-slave replication using MySQL. 1) Offload some of the queries from one server to another and spread the load: One of the biggest advantages to have master-slave set [...]

[Read more]
Showing entries 111 to 120 of 131
« 10 Newer Entries | 10 Older Entries »