Installing
boot loader only using grub:in
rescue installed system centos 6/Rhel/Fedora
Friday, 24 July 2015
Installing Grub using grub-install: in rescue installed system centos 6/Rhel/Fedora
#df -h
check the filesystem name of /boot
#cd /sbin
#grub-install /dev/sda5 /* where /dev/sda5 is /boot filesystem name*/
output:
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
# this device map was generated by anaconda
(hd0) /dev/sda
#reboot
How to upgrade centos 6.2 to centos 6.5
Upgrade an
existing system:
- Insert centos 6.5 DVD
- Press F10
- Select Install or upgrade an existing system
- skip
- Next
- English Next
- U.S English Next
- Select Basic storage devices Next
- Select upgrade an existing system Next
- Select Create a new bootloader Next
- Select centos 6.5 Install
Hence problem solved
After this if you
didn't get GUI then
#vi
/etc/inittab
Replace 3 with 5 in the
last line id:5
#reboot
now you will get the
gui
If you feel the desktop
is different from the desktop before you used then follow below steps
#vim
/etc/sysconfig/desktop
DESKTOP=GNOME
DISPLAYMANAGER=GNOME
#reboot
Description about display manager
There is a
configuration file called /etc/sysconfig/desktop.
This file defines default display manager and desktop name.
Display manager can be any one of the
following:
[a] gnome (gdm)
[b] kde (kdm)
[c] xdm (xdm)
[a] gnome (gdm)
[b] kde (kdm)
[c] xdm (xdm)
Desktop can be any one of the following
[a] KDE
[b] GNOME
[c] XFCE
[a] KDE
[b] GNOME
[c] XFCE
Specifying GNOME as a
display manager will invoke GDM.
Upon boot, the system
will run /etc/init/prefdm.conf which will in
turn call the "Preferred Display Manager" (prefdm) script
/etc/X11/prefdm which will utilize the
settings in /etc/sysconfig/desktop if
available.
Errors And Fixes While booting
When I start the centos
6.2 system centos6 logo stucked it didn't give the login prompt
So, I restart the
system by CTRL+ALT+DELETE and i pressed the ESC key when circle had
come
to see the errors.
The errors are:
- unexpectedly disconnected from boot status daemon
- init: prefdm respawning too fast,stopped
In my system may be
These errors are because httpd remove/update.
Before this I did
following:
I removed httpd by #yum
remove httpd*
after that I installed
httpd-2.4.10 source file by following some steps.
After i reboot the
system i got the above errors.
There are two ways to
fix these errors:
- by rescue installed system from centos 6.2 dvd
- by upgrade an existing system from centos 6.5 dvd
Rescue installed
system:
- Insert centos 6.2 dvd
- press F10 key
- select cd/dvd sta
- select rescue installed system
- Language English OK
- US OK
- Drive Local cd/dvd OK
- Enable network interface OK
- Configure network IPv4 settings manually by giving IP address,Gateway and Nameserver
- after that press OK until you get command line prompt like bash4.1$
- $chroot /mnt/sysimage
- #yum remove httpd*
- you have to install httpd-2.2.15-29.el6.centos.x86_64
- Download following rpm packages in another linux system
- In that goto downloads copy the above three files to one folder and copy that folder to Desktop
- compress the folder to .zip(httpd.zip)
- now open terminal
- #cd /root/Desktop
- ftp 192.168.1.22 /*your system ip address*/
- ftp>cd /root
- ftp>bin
- ftp>hash
- ftp>prompt
- ftp>mput httpd.zip
- ftp>bye
- now from your system #cd /root
- #unzip httpd.zip
- #rpm -ivh httpd-2.2.15-29.el6.centos.x86_64.rpm
- #rpm -ivh httpd-devel-2.2.15-29.el6.centos.x86_64.rpm
- #rpm -ivh httpd-tools-2.2.15-29.el6.centos.x86_64.rpm
- #sync
- #exit
- #reboot
hence problem solved
PostgreSQL+OpenLDAP+CentOS
$ yum install postgresql-* openldap-servers-sql openldap-clients
$ su - postgres
$ initdb -D /var/lib/pgsql/data
$ postmaster -D /var/lib/pgsql/data &
$ exit
$ cat /etc/odbc.ini
[ODBC Data Sources]
PgSQL=PostgreSQL
[PgSQL]
Driver=/usr/lib/psqlodbc.so
Description=Connection to LDAP/Postgresql
Servername=localhost
Port=5432
Protocol=6.4
FetchBufferSiza=99
Username=test
Password=test
Database=pg_ldap
ReadOnly=no
Debug=1
CommLog=1
[ODBC]
InstallDir=/usr/lib/
$ cat /etc/odbcinst.ini
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
FileUsage = 1
$ cd /usr/share/doc/openldap-servers-sql-2.3.43/rdbms_depend/pgsql
$ cp * /var/lib/pgsql/data
$ cat /etc/openldap/slapd.conf
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/samba.schema
access to *
by self write
by * read
access to * by dn="cn=root,dc=example,dc=com" write
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
modulepath /usr/lib/openldap
moduleload back_sql.la
database sql
suffix "dc=example,dc=com"
rootdn "cn=root,dc=example,dc=com"
rootpw secret
dbname PgSQL
dbuser test
dbpasswd test
insentry_query "insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values ((select max(id)+1 from ldap_entries),?,?,?,?)"
upper_func "upper"
strcast_func "text"
concat_pattern "?||?"
has_ldapinfo_dn_ru no
lastmod off
$ su - postgres
$ cd /var/lib/pgsql/data
$ createdb pg_ldap
$ createuser --no-createdb --no-createrole --no-adduser --password test
$ psql -d pg_ldap < backsql_create.sql
$ psql -d pg_ldap < testdb_create.sql
$ psql -d pg_ldap < testdb_metadata.sql
$ psql -d pg_ldap < testdb_data.sql
$psql -d pg_ldap -c "GRANT ALL ON ldap_attr_mappings,ldap_entries,ldap_entry_objclasses,ldap_oc_mappings,referrals,certs TO test1;"
$psql -d pg_ldap -c "GRANT ALL ON ldap_attr_mappings_id_seq,ldap_entries_id_seq,ldap_oc_mappings_id_seq,referrals_id_seq TO test1;"
$psql -d pg_ldap -c "GRANT ALL ON authors_docs,documents,institutes,persons,phones TO test1;"
$ psql -d pg_ldap -c "GRANT ALL ON documents_id_seq,institutes_id_seq,persons_id_seq,phones_id_seq TO test1;"
$ exit
$ /etc/init.d/ldap start
$ ldapsearch -x -h localhost -b "dc=example,dc=com" "(objectClass=*)"
$ echo ‘dn: cn=Test Entry,dc=example,dc=com
objectClass: inetOrgPerson
cn: Test Entry
sn: Entry
givenName: Test’>1.ldif
$ ldapadd -x -h localhost -D “cn=root,dc=example,dc=com” -w secret -f 1.ldif
Thursday, 23 July 2015
How to Install uPortal 4+Postgresql+Centos6/Rhel/Fedora
How to Install uPortal 4+Postgresql+Centos6/Rhel/Fedora
Uportal
Installation and Configuration
Download
uPortal 4.2 from the below link:
uPortal
Dependencies:
- apache-ant-1.8.2
- Centos 6.5
- apache-maven-3.0.5
- apache-tomcat-7.0.59
- Java 7
- Postgresql
Download
links:
ant:
maven:
tomcat:
#cp
/root/Downloads/apache-ant-1.8.2-bin.tar.gz /opt/uportal_dep
#cp
/root/Downloads/apache-maven-3.0.5-bin.tar.gz /opt/uportal_dep
#cp
/root/Downloads/apache-tomcat-7.0.59.tar.gz /usr/local
#cd
/usr/local
#mv
apache-tomcat-7.0.59 uPortal_tomcat
#vim
~/.bashrc
add
below lines:
export
ANT_HOME=/opt/uportal_dep/apache-ant-1.8.2
export
M2_HOME=/opt/uportal_dep/apache-maven-3.0.5
export
M2=$M2_HOME/bin
export
PATH=$M2:$PATH
export
JAVA_HOME=/usr
export
TOMCAT_HOME=/usr/local/uPortal_tomcat
and
save it by :wq
#source
~/.bashrc
#vim
/usr/local/uPortal_tomcat/conf/catalina.properties
add
shared.loader=${catalina.base}/shared/lib/*.jar
and
save it by :wq
#vim
/usr/local/uPortal_tomcat/bin/setenv.sh
export
JAVA_OPTS="$JAVA_OPTS -XX:+PrintCommandLineFlags
-XX:MaxPermSize=384m -Xms1024m -Xmx1024m
-Djsse.enableSNIExtension=false"
and
save it by :wq
#vim
/usr/local/uPortal_tomcat/bin/startup.sh
export
CATALINA_OPTS=”-Xms512M -Xmx1024M”
and
save it by :wq
#su
– postgres
$psql
=#create
database uportal;
=#create
user uportal with password 'uportal';
=#grant
all privileges on database uportal to uportal;
=#\q
$exit
#cd
/opt
#cp
/root/Downloads/uPortal-4.2.0-M1.tar.gz /opt
#tar
-zxvf uPortal-4.2.0-M1.tar.gz
#cd
uPortal-4.2.0-M1
#cd
uportal-db
#vim
pom.xml
uncomment
postgresql dependency
if
your postgresql is below 9.2 version then it should be
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.2-507.jdbc3</version>
<scope>compile</scope>
</dependency>
if
your postgresql is 9.2 later then it should be
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.2-1003-jdbc3</version>
<scope>compile</scope>
</dependency>
#cd
/opt/uPortal-4.2.0-M1/filters
#vim
local.properties
comment
hsql lines
add
postgresql below lines
##
Database Connection Settings (Uncomment the Maven Filters section in
rdbm.properties)
environment.build.hibernate.connection.driver_class=org.postgresql.Driver
environment.build.hibernate.connection.url=jdbc:postgresql://localhost:5432/uportal
environment.build.hibernate.connection.username=uportal
environment.build.hibernate.connection.password=uportal
environment.build.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
environment.build.hibernate.connection.validationQuery=select
1
and
save it by :wq
#cd
/opt/ uPortal-4.2.0-M1
#cp
build.properties.sample build.properties
add
server.home=/usr/local/uPortal_tomcat
and
save it by :wq
#cd
/opt/uPortal-4.2.0-M1
#ant
dbtest > antdbtest.log &
#tail
-f antdbtest.log
After
getting build successful
#ant
clean initportal > antinit.log &
After
getting build successful
Restart
Tomcat as below
#cd
/usr/local/uPortal_tomcat
#cd
bin
#./shutdown.sh
check
whether tomcat process is running or not by
#ps
-efa | grep tomcat
check
whether any process is running at port 8080 by
#netstat
-tlnp | grep '8080'
#./startup.sh
open
the web browser and check
localhost:8080/uPortal
references:
Subscribe to:
Posts (Atom)