Archive for August, 2007 Page 3 of 6



Fedora Core remote installation howto

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

Sometimes it happens that it’s necessary to install Fedora Core onto server you have not physical access to and there is to luck to find any person who can do it for you there. Some other distributions like Debian provides remote ssh installation while Fedora (as well as Red Hat and CentOS) allows to install it over telnet from different computer over the network.

To get it done it’s enough to ask somebody who has physical access to server to boot up with Fedora Core installation compact disk and type one command. All the rest you can do by yourselves from any PC located at the same network.

When Fedora CD is booted above mentioned person will see at the following screen:

Fedora Core Installation menu

Ask him (or her) to type command at "boot:" prompt (in one line):

text telnet ip=[ip.address] netmask=[netmask] gateway=[gateway.address] ksdevice=[ethernet.device]

For example:

text telnet ip=192.168.0.123 netmask=255.255.255.0 gateway=192.168.0.1 ksdevice=/dev/eth1

Where IP address 192.168.0.123/24 will be assigned to eth1 NIC of server you're going to install. ksdevice refers to your Ethernet network card (NIC) designation (if there only one NIC just omit ksdevice).

After it’s done you can connect to server via telnet command, for example:

telnet 192.168.0.123

and proceed installation. Please note that it would take some time before you can login as Fedora’s anaconda installer will be loading telnet server. During remote installation it’s impossible to switch consoles. Make sure you've set proper settings for your NIC(s) as after reboot previous IP settings will be lost. After installation is finished and server is rebooted you can login to fresh Fedora via ssh (with root login).

You may also be interested in:
Fully automated Fedora Linux installation manual (create custom installation cd)

Share This

Debug web application by showing web server headers

If it’s necessary for you to debug HTTP server (to find a reason of some problem) and would like to watch HTTP headers, please use Firefox addon:

https://addons.mozilla.org/en-US/firefox/addon/575

Share This

CGI Perl scripts debugging (solve 500 Internal Server Error)

When you run your perl scripts in browser you would get "500 Internal Server Error" when something goes wrong. There would be several reasons of this but one thing to be done is to check if your perl script contains errors. To do it login to server you're running perl script (I hope you use Linux ;] ) and execute command:

/usr/bin/perl -w /path/to/script.cgi

It will show debug information and it would be much easier to find and solve the problem.

Good luck!

You may also be interested in:
Access to sqlite3 database through perl (script example)

Share This

Automatic "zombie" processes killing (shell script)

Here is a shell script example that can be run by cron for automatic killing of "zombie" processes in Linux system:

zombies.sh

Share This

Quick shell change for user in Unix or Linux

In order to change shell for a particular user of Unix/Linux system without editing /etc/passwd file manually just use command:

chsh -s /path/to/shell username

for example, to change shell to ’sh' from 'bash' for user 'viper', use command:

chsh -s /bin/sh viper

Share This

Encryption files with GPG without user intervention (batch)

I usually encrypt files with GPG with symmetric algorithms when I have to transmit files over insecure channel: for example I encrypt backup files stored at my USB stick and I'm sure that if it’s stolen or lost my files are in safety.

Encryption without user intervention can be used when you wish to perform automatic (runs with cron) backup procedure and protect backup files.

To encrypt file /tmp/file.tgz by symmetric AES algorithm (256 is a key lenght) with one command please use the following command:

echo password | gpg --batch -q --passphrase-fd 0 --cipher-algo AES256 -c /tmp/file.tgz

Previous command will create file.tgz.gpg that can be extracted automatically by next one:

echo password | gpg --batch -q -o /tmp/file.tgz --passphrase-fd 0 --decrypt /tmp/file.tgz.gpg

Share This

FAQ: Change forgotten or lost MySQL root password

Question: I forgot root password for MySQL DBE. How to reset or recover it? PLEASE HELP!

Answer: Below is simple algorithm to reset MySQL root password in Linux, FreeBSD, OpenBSD and other Unix like operating systems:

1. Stop MySQL server process by one of the following commands:
# /etc/init.d/mysqld stop
# killall -9 mysqld
# kill `cat /mysql-data-directory/host_name.pid`
# mysqladmin shutdown

To check if mysqld is killed run "ps ax | grep mysqld" that should show no mysqld instances.

2. Start MySQL server without password protection:
$ mysqld --skip-grant-tables --user=root &
or
$ mysqld --skip-grant-tables &

3. Login to MySQL console by "mysql -u root" and set up new password with the following mysql commands:
mysql> UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root';
mysql> FLUSH PRIVILEGES;

4. Now you should be able to connect MySQL with new password.

P.S. There is alternative 2 and 3 steps:

2. Create text file /tmp/init.mysql with the following contents:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword');

3. Start MySQL with command:
# mysqld_safe --init-file=~/mysql-init &

Hope it helps!!!

Share This



Information Improvisation: Operating system is the backbone for every organization. Having professionals with CISSP certification in organization ensures the life running through its networks. Organizations manage tremendous amounts of traffic due to the use of pc phone and people with 646-058 certifications are ideal for this job. They can also manage online networks which can be hosted on lunarpages, which also provides free email hosting. With the company's logo design every page and a well crafted web template the site can be given a graceful look.

 

Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | LinuxHaxor.net | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
CyberCapital.Org | G-LOADED! | The Linux Alternative Project
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››