The original article is located at http://stanton-finley.net/fedora_core_3_installation_notes.html
Notice: If you are looking for the new Fedora Core 4 Installation Notes they are here.
It is no longer necessary to be an expert practitioner of the arcane dark arts of the Unix command line in order to get a complete Linux distribution working on your PC including all of the productivity, multimedia, and entertainment applications you will need on your desktop and a fully functional web server as well.
This web page began as some notes to myself as I installed Fedora Core and has evolved into a popular guide for the new Linux user. Enjoy.
~ Stan Finley ~
These instructions assume an i386 to i686 (32 bit) system with, an "always on" LAN or broadband connection configured "DHCP" and at least 10 GB of free disk space for the Fedora partition. Instructions for dual booting Windows and Fedora are included as well as as a section on setting up an nVidia GeForce graphics card. For the most part the steps should be followed in the order that they were written as certain programs should be installed and certain configurations made in order to facilitate later steps. However after the base installation is complete additional user selected program installations are, of course, optional. For reasons that will become obvious as the reader follows this guide the author highly recommends the installation of Yum, Apt, and Synaptic for the purpose of obtaining updates and applications in RPM form. Instructions for doing so are included.
For x86_64 processors (64-bit AMD64, EM64T) you should probably get FC3-x86_64-disc1.iso, FC3-x86_64-disc2.iso, FC3-x86_64-disc3.iso, and FC3-x86_64-disc4.iso. These instructions will not strictly apply for 64 bit computers using the 64 bit isos. 64 bit capable processors like Athlon 64, Opteron and Xeon are supposed to be backwardly compatible with 32 bit instruction sets and are known to run 32 bit editions of Linux. Therefore the i386 isos may work with these. I understand that Fedora Core for 64 bit processors still has some unresolved issues. Your mileage may vary.
gedit /boot/grub/grub.conf
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,1) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/hda default=0 timeout=5 splashimage=(hd0,1)/grub/splash.xpm.gz #hiddenmenu title Fedora Core (2.6.9-1.667) root (hd0,1) kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol00 vga=788 selinux=0 initrd /initrd-2.6.9-1.667.img title Windows rootnoverify (hd0,0) chainloader +1Disabling the "hiddenmenu" with the "#" comment and removing "rhgb quiet" from the kernel line will cause the menu to select Windows or Fedora to display immediately upon boot and will also disable the graphical boot screens so that you will see the boot sequence scroll by in text. You may also choose to disable SELinux by including "selinux=0" on the kernel line. Leave out the "selinux=0" if you wish to keep SELinux enabled. If you choose to use SELinux (Security Enhanced Linux) there are two good articles about it at http://fedora.redhat.com/docs/selinux-faq-fc3/ and http://fedora.redhat.com/docs/selinux-apache-fc3/. Click on the "save" icon in gedit and close it. Close the terminal.
gedit /etc/hostsHit enter and gedit will open. Place your cursor after "localhost" and hit tab. Then type in the characters that appear on your root terminal screen after "root@" up to but not including the space and tilde (~). When you are finished, your hosts file should look something like this:
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost x1-6-00-04-5a-5e-ac-83Click on the "save" icon in gedit and close it. This will eliminate the Gnome error message that appears on boot-up on some systems.
gedit /etc/modprobe.confHit enter and gedit will open. Add these lines to the bottom of the file:
alias net-pf-10 off alias ipv6 offAdd a carriage return if required. (There should be a blank line at the bottom of these files.) Click on the "save" icon in gedit and close it. This will speed up browsing and file transfers in some cases by decreasing DNS lookup time.
gedit /etc/X11/xorg.confHit enter and gedit will open. Scroll down to the "Monitor" section. Find the "HorizSync" line and enter your monitor's supported horizontal frequency range. The line should look something like "HorizSync 30.0 - 70.0". Enter your monitor's supported vertical frequency range opposite "VertRefresh". The line should look something like "VertRefresh 50.0 - 160.0". Scroll down to the "Screen" section and opposite each instance of "modes" enter you monitor's supported pixel resolution, starting with the highest. The line should look something like "Modes "1024x768" "800x600" "640x480"". You should be able to get these values from your monitor's manual or from a search for your monitor by manufacturer and model number on the Internet. Hit the "save" button in gedit and exit gedit. Reboot your machine.
gedit /boot/grub/grub.confHit enter and gedit will open. If you have not already done so, remove "rhgb quiet" from the kernel line in grub.conf. Click the "save" button and then exit gedit. This will disable the "Red Hat Graphical Boot" at boot time which would otherwise interfere with the nVidia installation described below.
gedit /etc/X11/xorg.confHit enter and gedit will open. In the "module" section comment out (put a "#" in front of) load "dri" so that it reads # load "dri". In the "device" section change "nv" to "nvidia".
Section "Module" Load "dbe" Load "extmod" Load "fbdevhw" Load "glx" Load "record" Load "freetype" Load "type1" # Load "dri" EndSection Section "Device" Identifier "Videocard0" Driver "nvidia" VendorName "Videocard vendor" BoardName "NVIDIA GeForce 4 MX (generic)" EndSectionClick the "save" icon and exit gedit.
gedit /etc/rc.localHit enter and gedit will open. At the end of the file add the line:
/sbin/modprobe nvidiaAdd a carriage return as well if necessary to insure that there is a blank line at the bottom of the file. Click on the "save" icon and exit gedit. Close the terminal.
sh *.runHit enter. You will be presented with a text mode nVidia screen. Left arrow to "accept" and hit enter. Answer "yes" to "download...". Answer "ok" to "no matching kernel...". nVidia will build and install a kernel module for the nVidia driver. When the "...complete" screen appears hit enter on "ok". Type "/usr/sbin/setenforce 1" and hit enter if you had SELinux enabled when you began the nVidia installer to reenable SELinux. Type "reboot" and hit enter. You should see the nVidia splash screen when Fedora reboots indicating that the installation was successful.
su -Hit enter, type your root password and hit enter. Type:
cp -a /dev/nvidia* /etc/udev/devicesType "y" and hit enter twice. Type:
chown root.root /etc/udev/devices/nvidia*Hit enter. Type:
gedit /etc/rc.localHit enter and gedit will open. Remove the "/sbin/modprobe nvidia" line from rc.local, click on the "save" icon, and exit gedit. Type:
gedit /boot/grub/grub.confHit enter and gedit will open. Add "rhgb quiet" back into the kernel line in grub.conf, click on the "save" icon, and exit gedit. Reboot. (If you upgrade your kernel be sure to remove "rhgb quiet" from grub.conf before you reboot into the new kernel. Then you can re-install the nVidia driver per these instructions again for the new kernel.)
suHit enter, type your root password and hit enter. (This gives you root privileges in the terminal even though you are still in the default user's home directory.) Type:
rpm -ivh *.rpmHit enter. Wait for the installation to complete. Type:
rm *.rpmHit enter. Type "y" and hit enter. (This deletes the downloaded RPM file in your home directory, however the program is already installed into your system.) Close the terminal. Reboot your machine.
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> </match> </fontconfig>
suHit enter. Type your root password. Hit enter. Type:
sh *.binHold the enter key down until the yes/no line appears to allow you to agree to the license agreement. Type "yes" and hit enter. Type:
rpm -ivh *.rpmHit enter. Wait for the installation to complete. (If you get a message that "package jre-1.5.0_04-fcs is already installed" just move on to the next step.) Type:
rm *.rpmHit enter. Type "y" and hit enter. Type:
rm *.binHit enter. Type "y" and hit enter. Type:
su -Hit enter. This gives you root privileges and also puts you in the /root directory. Type:
ln -s /usr/java/jre1.5.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.soHit enter. Close the terminal. Close and restart Firefox to enable the java plugin. You could go to http://www.dslreports.com/stest?loc=97 and click the start button to test your java plugin installation.
su -Hit enter. Type your root password. Hit enter. Type:
gedit /etc/profile.d/java.shHit enter. In gedit type these lines:
export J2RE_HOME=/usr/java/jre1.5.0_04 export PATH=$J2RE_HOME/bin:$PATHBe sure to enter a carriage return after these lines. Click on the "save" icon in gedit and exit gedit. In the terminal (which should still be open) type:
source /etc/profile.d/java.shHit enter. Type:
which javaHit enter. You should see:
/usr/java/jre1.5.0_04/bin/javaType:
alternatives --install /usr/bin/java java /usr/java/jre1.5.0_04/bin/java 3Hit enter. Type:
alternatives --config javaHit enter. You should see:
There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/share/java/libgcj-java-placeholder.sh *+ 2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java 3 /usr/java/jre1.5.0_04/bin/java Enter to keep the current selection[+], or type selection number:Type:
3Hit enter. Type:
/usr/sbin/alternatives --display javaHit enter. You should see:
jjava - status is manual. link currently points to /usr/java/jre1.5.0_04/bin/java ...You should now be able to install and run Java applications.
suHit enter. Type your root password. Hit enter. Type:
rpm -ivh *.rpmHit enter. Click "accept" in the license agreement windows that appears. Wait for the installation to complete. Type:
rm *.rpmHit enter. Type "y" and hit enter. Close the terminal. Close and restart Firefox to enable the flash plugin, go to http://www.studiocleo.com/ to test your flash plugin installation.
suHit enter. Type your root password. Hit enter. Type:
yum install libstdc++.so.5Hit enter. Type "y". Hit enter. Wait while the appropriate C++ compatibility library is installed. (If you get the message "Nothing to do" this means the library is already installed. In this case just move on to the next step.) Type:
rpm -ivh *.rpmHit enter. Wait for the installation to complete. Type:
rm *.rpmHit enter. Type "y" and hit enter. Close the terminal. Close and restart Firefox to enable the RealPlayer plugin, go to http://www.npr.org/, click on "NPR Program Stream", select "Listen to NPR audio with the Real player" to test your RealPlayer plugin installation.
su -Hit enter. Type your root password. Hit enter. Type:
gedit /etc/yum.repos.d/dag.repoHit enter and gedit will open. Type the following in gedit:
[dag] name=Dag RPM Repository for Fedora Core baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag/ enabled=1 gpgcheck=1Be sure there is a carriage return (blank line) at the bottom of the file. Click the "save" icon in gedit and then close gedit. Type the following in the root terminal:
gedit /etc/yum.repos.d/freshrpms.repoHit enter and gedit will open. Type the following in gedit:
[core] name=FreshRPMS-Core baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/core enabled=1 gpgcheck=1 #[extras] #name=Fedora Linux $releasever - $basearch - extras #baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/extras #enabled=0 gpgcheck=1 #[alternatives] #name=Fedora Linux $releasever - $basearch - alternatives #baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/alternatives #enabled=0 gpgcheck=1 [updates] name=FreshRPMS-Updates baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/updates enabled=1 gpgcheck=1 [freshrpms] name=FreshRPMS-Fresh baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms enabled=1 gpgcheck=1Be sure there is a carriage return (blank line) at the bottom of the file. Click the "save" icon in gedit and then close gedit.
rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txtHit enter. Type:
rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txtHit enter. Type:
rpm --import /usr/share/doc/fedora-release-*/*GPG-KEY*Hit enter. You have just imported the GPG keys for your yum repositories. Type:
yum updateHit enter. Your system will be updated. Answer "y" for "yes" in the appropriate places. Reboot.
[dag] name=Dag RPM Repository for Fedora Core baseurl=http://rh-mirror.linux.iastate.edu/pub/dag/fedora/$releasever/en/$basearch/dag/ enabled=1 gpgcheck=1 [core] name=FreshRPMS-Core baseurl=http://ayo.us5.freshrpms.net/fedora/linux/$releasever/$basearch/core enabled=1 gpgcheck=1 #[extras] #name=Fedora Linux $releasever - $basearch - extras #baseurl=http://ayo.us5.freshrpms.net/fedora/linux/$releasever/$basearch/extras #enabled=0 gpgcheck=1 #[alternatives] #name=Fedora Linux $releasever - $basearch - alternatives #baseurl=http://ayo.us5.freshrpms.net/fedora/linux/$releasever/$basearch/alternatives #enabled=0 gpgcheck=1 [updates] name=FreshRPMS-Updates baseurl=http://ayo.us5.freshrpms.net/fedora/linux/$releasever/$basearch/updates enabled=1 gpgcheck=1 [freshrpms] name=FreshRPMS-Fresh baseurl=http://ayo.us5.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms enabled=1 gpgcheck=1
su -Hit enter. Type your root password. Hit enter. Type:
yum install aptHit enter. Wait for the installation to complete. Type:
yum install synapticHit enter. Wait for the installation to complete. Type:
gedit /etc/apt/sources.list.d/dag.listHit enter and gedit will open. If there is nothing in this file (blank page), type the following in gedit:
# Name: Dag RPM Repository # URL: http://dag.wieers.com/apt/ ### Dag RPM Repository for Fedora Core rpm http://apt.sw.be fedora/3/en/i386 dagBe sure there is a carriage return (blank line) at the bottom of the file. Click the "save" icon in gedit and then close gedit. While still in the root terminal, type:
gedit /etc/apt/sources.list.d/freshrpms.listHit enter and gedit will open. If there is nothing in this file (blank page), type the following in gedit:
# Name: FreshRPMS # URL: http://ayo.freshrpms.net/ ### Fedora Core rpm http://ayo.freshrpms.net fedora/linux/3/i386 freshrpmsBe sure there is a carriage return (blank line) at the bottom of the file. Click the "save" icon in gedit and then close gedit. While still in the root terminal, type:
gedit /etc/apt/sources.list.d/newrpms.listHit enter and gedit will open. If there is nothing in this file (blank page), type the following in gedit:
# Name: NewRPMS # URL: http://newrpms.sunsite.dk/ ### Fedora Core rpm http://newrpms.sunsite.dk/apt/ redhat/en/i386/fc3 newrpmsBe sure there is a carriage return (blank line) at the bottom of the file. Click the "save" icon in gedit and then close gedit. While still in the root terminal, type:
gedit /etc/apt/sources.list.d/dries.listHit enter and gedit will open. If there is nothing in this file (blank page), type the following in gedit:
# Name: Dries RPM Repository # URL: http://dries.studentenweb.org/apt/ ### Fedora Core rpm http://apt.sw.be dries/fedora/fc3/i386 driesBe sure there is a carriage return (blank line) at the bottom of the file. Click the "save" icon in gedit and then close gedit. While still in the root terminal, type:
rpm --import http://dries.studentenweb.org/ayo/RPM-GPG-KEY.dries.txtHit enter. Type:
rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txtHit enter. Type:
rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txtHit enter. Type:
rpm --import http://newrpms.sunsite.dk/gpg-pubkey-newrpms.txtHit enter. You have just imported the GPG keys for your apt repositories. Type:
apt-get updateYour apt repository package list will be updated. Close the terminal. Reboot.
suHit enter. Type your root password. Hit enter. Type:
mkdir tempHit enter. Type:
mv *.bz2 tempHit enter. Type:
cd tempHit enter. Type:
tar xvfj *.tar.bz2Hit enter. Type:
cd all-20050412Hit enter. Type:
mkdir /usr/local/lib/codecs/Hit enter. Type:
cp *.* /usr/local/lib/codecs/Hit enter. Type:
cd /usr/local/lib/codecs/Hit enter. Type:
chmod 755 /usr/local/lib/codecs/*Hit enter. Type:
ln -s /usr/local/lib/codecs /usr/lib/win32Hit enter. Type:
cp /usr/local/lib/codecs/* /usr/lib/win32The codecs for MPlayer, Xine and Kaffeine are now installed.
suHit enter. Type your root password. Hit enter. Type:
rpm -Uvh *.rpmHit enter.
rm *.rpmHit enter. Type "y" and hit enter. Close the terminal. Close and restart Firefox to enable the Kaffeine plugin. Reboot.
suHit enter. Type your root password. Hit enter. Type:
uname -r -pThis will output your kernel version and processor type.
rpm -ivh *.rpmHit enter. Wait for the installation to complete. Type:
rm *.rpmHit enter. Type "y" and hit enter. Type:
su -Hit enter. Type:
mkdir /mnt/windowsHit enter. Type:
/sbin/fdisk -lHit enter. This will output your HPFS/NTFS partition identifier. Type:
gedit /etc/fstabHit enter and gedit will open. Type the following in gedit:
/dev/hda1 /mnt/windows ntfs ro,defaults,umask=0222 0 0If your partition identifier is not "/dev/hda1" substitute the correct characters. (For example it might be "/dev/sda1" if you have a SATA drive.) Click the "save" icon in gedit and exit gedit. Close the terminal. Reboot. Your Windows partition should now be available in the file browser under "/mnt/windows".
su -Hit enter. Type your root password. Hit enter. Type:
yum install bittorrentHit enter. Type "y" and hit enter when you see "Is this ok [y/N]:". Wait for the installation to complete. Type:
yum install bittorrent-guiHit enter. Type "y" and hit enter when you see "Is this ok [y/N]:". Wait for the installation to complete. Type:
/sbin/iptables -I INPUT -p tcp --destination-port 6881:6999 -j ACCEPTHit enter. This adds a rule to open TCP ports 6881 through 6999 in your firewall. These ports are required by Bittorent. Type:
/sbin/iptables-save > /etc/sysconfig/iptablesHit enter. This saves the rule. Type:
iptables -LHit enter. This will output your iptables file so you can see if the rule was saved. Type:
gedit /etc/mailcapHit enter and gedit will open. Add these lines (and a carriage return) to /etc/mailcap:
# bittorrent application/x-bittorrent; /usr/bin/btdownloadgui.py %s; test=test -n "$DISPLAY"Reboot your machine to implement the new firewall rule. Now you can download ".torrent" files with Firefox.
su -Hit enter. Type your root password. Hit enter. Type:
/sbin/iptables -I INPUT -p tcp --destination-port 6881:6999 -j ACCEPTHit enter. This adds a rule to open TCP ports 6881 through 6999 in your firewall. These ports are required by bittorent and/or Azureus. Type:
/sbin/iptables-save > /etc/sysconfig/iptablesHit enter. This saves the rule. Type:
/sbin/iptables -I INPUT -p udp --destination-port 6881:6881 -j ACCEPTHit enter. This adds a rule to open UDP port 6881 in your firewall. This port is required by Azureus. Type:
/sbin/iptables-save > /etc/sysconfig/iptablesHit enter. This saves the rule. Type:
iptables -LHit enter. This will output your iptables file so you can see if the rules were saved. Type:
cd /home/your_user_nameHit enter. Type:
tar xvfj *.tar.bz2Hit enter. Type:
rm *.bz2Hit enter. Type "y" and hit enter. Close the terminal. Reboot your machine to implement the new firewall rules. Open the terminal so that you are logged in as user rather than root. Type:
cd azureusHit enter. Type:
./azureusHit enter. Azureus will open. Configure your preferences in the dialog box presented and update the plugin if asked. (If you get an error when auto-updating you may have to log in as root (su -), change to your home directory, and run azureus as root temporarily to successfully update.) When you click on a ".torrent" file in Firefox you will be presented with a dialog box. Click the radio button "open with" and click the checkbox "Do this automatically for files like this form now on", then click the "browse" button in the dialog box and browse to "home" > "azureus" and click on "azureus". Click "open". Click "OK". This will allow you to download ".torrent" files from within Firefox. Note: If you choose to download your files into a hidden directory such as the /home/your_user_name/.Azureus/shares folder you will have to click on "View" > "Show hidden files" in "Applications" > "File Browser" to get to them in the file browser.
su -Hit enter. Type your root password. Hit enter. Type:
gedit /etc/httpd/conf/httpd.confHit enter. In gedit scroll down to the "ServerAdmin" section and enter your email address instead of "root@localhost". Scroll down to the "#ServerName" section and uncomment it (take out the "#"). Then enter the registered DNS name of your web site ("whatever.com") or your server's IP address instead of "new.host.name". (If you don't know your IP address type "ifconfig" at the root prompt.) Scroll down and change "UseCanonicalName Off" to "UseCanonicalName On". Scroll down to the "Options" line and change "Options Indexes FollowSymLinks" to "Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews". Change "AllowOverride None" to "AllowOverride Options FileInfo AuthConfig Limit" in case you want to use .htaccess files in any of your web subdirectories. Change "DirectoryIndex index.html index.html.var" to "DirectoryIndex index.html index.html.var index.shtml index.cgi index.php index.phtml index.php3 index.htm home.html welcome.html". Under the "AddType application/x-compress .Z" and "AddType application/x-gzip .gz .tgz" lines add the line: "AddType application/x-httpd-php .php .phps .php3 .phtml .html .htm .shtml .fds". Uncomment the line "#AddHandler cgi-script .cgi" and add ".pl" so that it reads "AddHandler cgi-script .cgi .pl". Click on the "save" icon in gedit and exit gedit.
su -Hit enter. Type your root password. Hit enter. Type:
gedit /var/www/html/phpinfo.phpHit enter and gedit will open. In gedit type:
<?php phpinfo();?>Click the "save" icon in gedit and close gedit. While still in the root terminal type:
gedit /var/www/html/printenv.plHit enter and gedit will open. In gedit type:
#!/usr/bin/perl ## ## printenv -- demo CGI program which just prints its environment ## print "Content-type: text/plain\n\n"; foreach $var (sort(keys(%ENV))) { $val = $ENV{$var}; $val =~ s|\n|\\n|g; $val =~ s|"|\\"|g; print "${var}=\"${val}\"\n"; }Click the "save" icon in gedit and close gedit. Type:
chmod 755 /var/www/html/printenv.plHit enter. Then type:
chmod 755 /var/www/html/phpinfo.phpHit enter. Now when you open these files from your web server (http://whatever.com/phpinfo.php and http://whatever.com/printenv.pl) you will be able to prove the functionality of your PHP and Perl installations. (In order to allow cgi scripts to execute outside of the cgi-bin directory configure your httpd.conf as described in the web server section above.)
su -Hit enter. Type your root password. Hit enter. Type:
gedit /etc/my.cnfHit enter. In the mysqld section of my.cnf add the line:
skip-innodbYour my.cnf should now look something like this:
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-innodb [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pidClick the "save" icon in gedit and close gedit. While still in the root terminal type:
mysql -u rootHit enter. You will see the mysql> query prompt. Type:
select user, host, password, select_priv, update_priv, delete_priv, insert_priv from mysql.user;Hit enter. You will see something like this:
+------+------------------------+----------+-------------+-------------+-------------+-------------+ | user | host | password | select_priv | update_priv | delete_priv | insert_priv | +------+------------------------+----------+-------------+-------------+-------------+-------------+ | root | localhost | | Y | Y | Y | Y | | root | x1-6-00-04-5a-5e-ac-83 | | Y | Y | Y | Y | | | localhost | | N | N | N | N | | | x1-6-00-04-5a-5e-ac-83 | | N | N | N | N | +------+------------------------+----------+-------------+-------------+-------------+-------------+ 4 rows in set (0.17 sec) mysql>Type:
set password for 'root'@'localhost' = password ('newpassword');where "newpassword" is the password that you want to use for the root MySQL super user. Hit enter. Type:
set password for 'root'@'host' = password ('newpassword');where "host" is the name of your host as reported in the "host" column above and "newpassword" is the password that you want to use for the root MySQL super user. Hit enter. Type:
select user, host, password, select_priv, update_priv, delete_priv, insert_priv from mysql.user;Hit enter. You will see something like this with your password hash-encrypted in the "password" column:
+------+------------------------+------------------+-------------+-------------+-------------+-------------+ | user | host | password | select_priv | update_priv | delete_priv | insert_priv | +------+------------------------+------------------+-------------+-------------+-------------+-------------+ | root | localhost | 1e36745e3c0f99b0 | Y | Y | Y | Y | | root | x1-6-00-04-5a-5e-ac-83 | 1e36745e3c0f99b0 | Y | Y | Y | Y | | | localhost | | N | N | N | N | | | x1-6-00-04-5a-5e-ac-83 | | N | N | N | N | +------+------------------------+------------------+-------------+-------------+-------------+-------------+ 4 rows in set (0.00 sec) mysql>Type:
exitClose the terminal. Reboot your machine. Open a terminal. Type:
su -Hit enter. Type your root password. Hit enter. Type:
mysql -u root -pHit enter. MySQL should ask for your MySQL super user password. Type it in. Hit enter. Type:
exitYou have successfully set up MySQL.
suHit enter. Type your root password. Hit enter. Type:
mv *.tar.bz2 /var/www/htmlHit enter. Type:
cd /var/www/htmlHit enter. Type:
bzip2 -dc *.tar.bz2 | tar -xvf -Hit enter. Type:
mv phpMyAdmin-2.6.3-pl1 phpmyadminHit enter. Type:
su -Hit enter. Type:
gedit /var/www/html/phpmyadmin/config.inc.phpHit enter and gedit will open. In /var/www/html/phpmyadmin/config.inc.php change "$cfg['PmaAbsoluteUri'] = '';" to "$cfg['PmaAbsoluteUri'] = ' http://whatever.com/phpmyadmin/';", change "$cfg['blowfish_secret'] = ''; to "$cfg['blowfish_secret'] = 'passphrase';" where "passphrase" is some arbitrary string of characters that the blowfish algorithm will use to encrypt your password when using cookie type authentication. Under "Server(s) configuration" change "$cfg['Servers'][$i]['auth_type'] = 'config';" to "$cfg['Servers'][$i]['auth_type'] = 'cookie';". Click on the "save" icon in gedit and close gedit. Open http://whatever.com/phpmyadmin/ in Firefox (where "whatever.com" is your web site). Type "root" in the "Username:" box and your MySQL super user password in the "Password:" box. Click the "Login" button. You should see the " Welcome to phpMyAdmin" web page. Open a terminal. Type:
su -Hit enter. Type your root password. Hit enter. Type:
mysql -u root -pType in your MySQL super user password. Hit enter. For MySQL version 3.23.58 type:
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapassword'; GRANT SELECT ( Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv ) ON mysql.user TO 'pma'@'localhost'; GRANT SELECT ON mysql.db TO 'pma'@'localhost'; GRANT SELECT ON mysql.host TO 'pma'@'localhost'; GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'pma'@'localhost'; GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost';where "pmapassword" is the password for the pma user that you select for the special "controluser" that has only the SELECT privilege on the mysql.user (all columns except "Password"), mysql.db (all columns), mysql.host (all columns) and mysql.tables_priv (all columns except "Grantor" & "Timestamp") tables. Hit enter. Hit enter. Open Firefox, go to http://whatever.org/phpmyadmin/scripts/create_tables.sql. (Substitute "whatever.org" for your web site registered DNS name or IP address.) Click "edit" > "select all", click "edit" > "copy", go back to the terminal and click "edit" > "paste". Hit enter. The entire query should be executed at the "mysql>" prompt. When the query finishes type "exit" at the mysql> prompt. Type:
gedit /var/www/html/phpmyadmin/config.inc.phpHit enter and gedit will open. In /var/www/html/phpmyadmin/config.inc.php change "$cfg['Servers'][$i]['controluser'] = '';" to "$cfg['Servers'][$i]['controluser'] = 'pma';", change "$cfg['Servers'][$i]['controlpass'] = '';" to "$cfg['Servers'][$i]['controlpass'] = 'pmapassword';" where "pmapassword" is the password for the pma user that you selected earlier, change "$cfg['Servers'][$i]['pmadb'] = '';" to "$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';", change "$cfg['Servers'][$i]['bookmarktable'] = '';" to "$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';", change "$cfg['Servers'][$i]['relation'] = '';" to "$cfg['Servers'][$i]['relation'] = 'pma_relation';", change "$cfg['Servers'][$i]['table_info'] = '';" to "$cfg['Servers'][$i]['table_info'] = 'pma_table_info';", change "$cfg['Servers'][$i]['table_coords'] = '';" to "$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';", change "$cfg['Servers'][$i]['pdf_pages'] = '';" to "$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';", change "$cfg['Servers'][$i]['column_info'] = '';" to "$cfg['Servers'][$i]['column_info'] = 'pma_column_info';", change "$cfg['Servers'][$i]['history'] = '';" to "$cfg['Servers'][$i]['history'] = 'pma_history';". Click on the "save" icon in gedit and close gedit. Close the terminal. Open Firefox and go to http://whatever.com/phpmyadmin/ where "whatever.com" is your web site registered DNS name or IP address. Log into phpMyAdmin as root. Click on the down arrow in the "Database:" selection dialog box in the left column. You should see the "mysql", "phpmyadmin", and "test" databases listed. You may delete ("drop") the "test" database if you wish. You have now successfully configured phpMyAdmin.