Database
How to Install Oracle 11g Express on redhat
by sahab on Oct.20, 2011, under Oracle, RHEL5
This post will cover basic installation and configuration of Oracle 11g Express Edition (XE) on RHEL 5.7
I have installed the RHEL 5.7 (64 bit)using all the development tools and libraries. Partition is default partition.
Basic installation is straight forward.
Click here for download the Oracle 11g Express Edition. Now oracle releasing the 64 bit version only.
After the download Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip.
#unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
This will create the directory Disk1. Change to the Disk1 directory:
# cd Disk1
#ls
oracle-xe-11.2.0-1.0.x86_64.rpm  response  upgrade
Install the rpm using rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
#rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm Preparing…                ########################################### [100%]    1:oracle-xe              ########################################### [100%]
Executing post-install steps…
You must run ’/etc/init.d/oracle-xe configure’ as the root user to configure the database.
Configure 11g XE Database and Option
# /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
————————————————-
This will configure on-boot properties of Oracle Database 11g Express Edition.  The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts.  Press <enter> to accept the defaults.
Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]: Specify a port that will be used for the database listener [1521]: Specify a password to be used for database accounts.  Note that the same password will be used for SYS and SYSTEM.  Oracle recommends the use of different passwords for each database account.  This can be done after
initial configuration:
Confirm the password:
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y
Starting Oracle Net Listener…Done
Configuring database…Done
Starting Oracle Database 11g Express Edition instance…Done
Installation completed successfully.</enter>
The installation created the directory /u01 under which Oracle XE is installed.
To set the required Oracle environment variables, use the oracle_env.sh the script included under cd /u01/app/oracle/product/11.2.0/xe/bin
# cd /u01/app/oracle/product/11.2.0/xe/bin
To set the environment for your current session run
#./oracle_env.sh
To set the environment permanently for users, add the following to the .bashrc or .bash_profile of the users you want to access the environment:
#su 0racle
$vim .bash_profile
add the following entries
. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
You should now be able to access SQL*Plus
How to Reset the mysql root password in LInux
by sahab on May.31, 2010, under Mysql, RHEL5, Ubuntu, ubuntu 10.04, ubuntu 7.10, ubuntu 8.04, ubuntu 8.10, ubuntu 9.04, Ubuntu 9.10
Mysql installation time, If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD
However, if you want to change (or update) a root password, then you need to use following command
$ mysqladmin -u root -p'oldpassword' password newpass
For example, If old password is dbase, and set new password to dbase123, enter:
$ mysqladmin -u root -p'dbase' password 'dbase123'
sudo /etc/init.d/mysql stop
2)Start the mysqld demon process using the –skip-grant-tables option with this command
sudo /usr/sbin/mysqld –skip-grant-tables –skip-networking &
3)start the mysql client process using this command
mysql -u root
from the mysql prompt execute this command to reset/update your password
SET PASSWORD FOR root@’localhost’ = PASSWORD(‘password’);
If you have a mysql root account that can connect from everywhere, you should also do:
UPDATE mysql.user SET Password=PASSWORD(‘newpwd’) WHERE User=’root’;
Alternate Method:
USE mysql
UPDATE user SET Password = PASSWORD(‘newpwd’)
WHERE Host = ‘localhost’ AND User = ‘root’;
And if you have a root account that can access from everywhere:
USE mysql
UPDATE user SET Password = PASSWORD(‘newpwd’)
WHERE Host = ‘%’ AND User = ‘root’;
For either method, once have received a message indicating a successful query (one or more rows affected), flush privileges:
FLUSH PRIVILEGES;
exit
Then stop the mysqld process
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start