RUN_FIRSTBOOT On Linux

June 15, 2008

Firstboot is an initial configuration utility script called by Fedora/Linux on the very first time a system boots up after an installation process. Once firstboot daemon has been run by the system, a new file /etc/sysconfig/firstboot is created. This firsboot file is then being checked by firstboot daemon every boot up process. If firstboot daemon finds the file, firstboot daemon script will not be run once again unless modified. Otherwise, if the file does not exists, the setup application would then be launched for an initial system configuration by firstboot.

The file firstboot created from /etc/sysconfig when disabled contains the following content :
~~~~~~~~~~~~~~~~~~~
RUN_FIRSTBOOT=no
~~~~~~~~~~~~~~~~~~~

Here’s how to disable firstboot in several ways
————————————————

From CLI, as root simply
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# echo “RUN_FIRSTBOOT=no” > /etc/sysconfig/firstboot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Or simply edit /etc/sysconfig/firstboot and modify

~~~~~~~~~~~~~~~~~~~
RUN_FIRSTBOOT=yes
~~~~~~~~~~~~~~~~~~~

to

~~~~~~~~~~~~~~~~~~~
RUN_FIRSTBOOT=no
~~~~~~~~~~~~~~~~~~~

If you wish to go back to anaconda firstboot option when things goes wrong, you can go back to this firstboot document entry.

Have a nice day.


Character set for a Single database

June 11, 2008

Sometimes, there will be request to change the character set of a single database in MYSQL. We can do it as follows.

 ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_persian_ci ;

utf8 and utf8_persian_ci  - represents the character set to be assigned.

Now try
show variables like 'colla%';
show variables like 'char%';

Runlevels in Linux

June 10, 2008

Init Level    Comments

0  – Runlevel 0 is reserved for the “shutdown” phase. Entering init 0 from the shell prompt will shutdown the         system and usually power off the machine.

1 – Runlevel 1 is usually for very basic commands. This is the equivalent to “safe mode” used by Windows. This level is usually only used to asses repairs or maintenance to the system. This is a single-user mode and does not allow other users to login to the machine.

2 – Runlevel 2 is used to start most of the machines services. However, it does not start the network file sharing service (SMB, NFS). This will allows multiple users to login to the machine.

3 – Runlevel 3 is commonly used by servers. This loads all services except the X windows system. This means the system will boot to the equivalent of DOS. No GUIs (KDE, Gnome) will start. This level allows multiple users to login to the machine.

4 – Runlevel 4 is usually a “custom” level. By default it will start a few more services than level 3. This level is usually only used under special circumstances.

5 – Runlevel 5 is everything! This will start any GUIs, extra services for printing, and 3rd party services. Full multi-users support also. This runlevel is generally used on by workstations.

6 – Runlevel 6 is reserved for “reboot” only. Be carefully when running this command. Once you have entered init 6, there is no stopping it!


DNS named Configurations……

June 10, 2008

@: It means from the origin to the lastname object that is bigleap.com.

In: This stands for Internet servers

SOA: This stands for `Start Of Authority’. It marks the beginning of a zone’s data and defines the parameter that affects the entire zone. Followed by the current machine name where the DNS server is maintained. And, the administrator login, which can be used while DNS is not working.

20000011301;serial: This is the serial number–a numeric value that tells or notifies the slave server, that the database has been updated. So slave server should also update it.

3600;refresh: This is the refresh cycle in seconds. In every refresh cycle the slave server comes to master server and checks for the updated database.

1800;retry: This particular line refers to the retry cycle which in turn means that the slave server should wait before asking the master server again in case master server doesn’t respond.

1209600;expire: This is the time for slave server to respond to queries of client for the expiration time if master server fails and has to be up and not getting up. After this period slave server also fails to solve the queries of clients and sits idle.

432100;default_ttl: This refers to the default time to leave, for this domain to work for, when named is once started. Remember the user doesn’t have to play with this unless he wants that the query time from the slave server should be somewhat less or more. In case we want to change, we should change only the refresh time in both master and slave. The best way is to make it 2, which means after each 2 seconds slave server will query to master server.


MySQL Persistent Connection Error

June 5, 2008

You can find this error if your scripts open persistent connections, which aren’t closed even if the script terminates. In particular, check this setting in third-party scripts (such as osCommerce).

Use mysql_connect() instead of mysql_pconnect() unless you have a good reason.

Server administrators can disable persistent connections for PHP scripts in php.ini file:

Allow or prevent persistent links. mysql.allow_persistent=Off

Scripts won’t fail, they’ll just use non-persistent connections silently.


Bug with MailMan ImportError: No module named korean

June 4, 2008

Sometimes, you may get the following error on cpanel error log while creating mailing list.

File “/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl”, line 104, in ?
import paths

ImportError: No module named korean

FIX:

uname -i

then do accordingly

yum install python-devel.i386

yum install python-devel.x86_64

/scripts/reinstallmailman