how to fix yum error "Metadata file does not match checksum"
$sudo yum clean metadata v
Wednesday, November 11, 2015
How to fix error yum "network is unreachable" or "couldn't connect to host" errors while running yum command
Fix error yum "network is unreachable" or "couldn't connect to host" errors while running yum command.
$ sudo vi /etc/yum.conf
[main]
proxy=http://proxy.com:8000
$ sudo vi /etc/yum.conf
[main]
proxy=http://proxy.com:8000
How to fix yum error '404 errors' on CentOS 6
How to fix yum error '404 errors' on CentOS 6
$ sudo yum clean metadata
$ sudo yum clean all
$ sudo yum clean metadata
$ sudo yum clean all
Tuesday, November 3, 2015
Error Connection status: unknown The dependency service or group failed to start on windows vista
go to start menu and type cmd in the search bar and open cmd with
administrator rights
1. Type "netsh winsock reset" and hit enter....if you get an error, ignore it
2. Type "netsh int ip reset" and hit enter....
3. Restart you computer
administrator rights
1. Type "netsh winsock reset" and hit enter....if you get an error, ignore it
2. Type "netsh int ip reset" and hit enter....
3. Restart you computer
Tuesday, September 22, 2015
Searching Column Name From Table in Database
select table_name from information_schema.columns group by table_name
select table_name,column_name from information_schema.columns
where column_name like '%MGS_Groupcode%'
Thursday, September 10, 2015
how to convert pdf file to word or excel
open this web https://online2pdf.com/
and then upload file pdf and convert file and finish.
nb: maximum file 50 Mb.
and then upload file pdf and convert file and finish.
nb: maximum file 50 Mb.
Saturday, May 23, 2015
How to get all user accounts SQL Server
Get the list of all SQL User Accounts SQL Server:
SELECT name AS Login_Name, type_desc AS Account_Type
FROM sys.server_principals
WHERE TYPE IN ('U', 'S', 'G')
and name not like '%##%'
ORDER BY name, type_desc
Get the list of all SQL User Accounts Database only
SELECT name
FROM sys.server_principals
WHERE TYPE = 'S'
and name not like '%##%'
Get the list of all Windows User Accounts only
SELECT name
FROM sys.server_principals
WHERE TYPE = 'U'
Get the list of all Windows Group User Accounts only
SELECT name
FROM sys.server_principals
WHERE TYPE = 'G'
SELECT name AS Login_Name, type_desc AS Account_Type
FROM sys.server_principals
WHERE TYPE IN ('U', 'S', 'G')
and name not like '%##%'
ORDER BY name, type_desc
Get the list of all SQL User Accounts Database only
SELECT name
FROM sys.server_principals
WHERE TYPE = 'S'
and name not like '%##%'
Get the list of all Windows User Accounts only
SELECT name
FROM sys.server_principals
WHERE TYPE = 'U'
Get the list of all Windows Group User Accounts only
SELECT name
FROM sys.server_principals
WHERE TYPE = 'G'
Wednesday, April 22, 2015
VLC is unable to open the MRL smb://
When I tried to open remote video files with VLC via a Samba share , but I got this error message:
Your input can't be opened:
VLC is unable to open the MRL 'smb://...'
It seems that this problem is related to credentials and can be fixed by entering the credentials for the Samba share in the VLC preferences
Tools > Preferences > Input / Codecs > Access Modules > SMB Input
insert user and password
user :
password :
domain :
good luck
Your input can't be opened:
VLC is unable to open the MRL 'smb://...'
It seems that this problem is related to credentials and can be fixed by entering the credentials for the Samba share in the VLC preferences
Tools > Preferences > Input / Codecs > Access Modules > SMB Input
insert user and password
user :
password :
domain :
good luck
Tuesday, March 31, 2015
Kernel panic - not syncing Attempted to kill init
Kernel panic while installing Centos 6.2 / 6.3 / 6.5 x64 bit LiveCD / DVD.
The error like this :
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-279.5.1.el6.x86_64 #1
Call Trace:
[<ffffffff814fd24a>] ? panic+0xa0/0x168
[<ffffffff81070bd2>] ? do_exit+0x862/0x870
[<ffffffff8117cba5>] ? fput+0x25/0x30
[<ffffffff81070c38>] ? do_group_exit+0x58/0xd0
[<ffffffff81070cc7>] ? sys_exit_group+0x17/0x20
[<ffffffff8100b0f2>] ? system_call_fastpath+0x16/0x1b
for solution :
please download iso Centos 6.5 full version here and then burning to DVD.
good luck.
The error like this :
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-279.5.1.el6.x86_64 #1
Call Trace:
[<ffffffff814fd24a>] ? panic+0xa0/0x168
[<ffffffff81070bd2>] ? do_exit+0x862/0x870
[<ffffffff8117cba5>] ? fput+0x25/0x30
[<ffffffff81070c38>] ? do_group_exit+0x58/0xd0
[<ffffffff81070cc7>] ? sys_exit_group+0x17/0x20
[<ffffffff8100b0f2>] ? system_call_fastpath+0x16/0x1b
for solution :
please download iso Centos 6.5 full version here and then burning to DVD.
good luck.
Wednesday, March 18, 2015
How to Install VLC Player On Centos 6
Add Repository
- First login with user “root”
- Next run the following commands
# cd /etc/yum.repos.d/
# wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo
Check VLC version in Repo
# yum list *vlc*
Install VLC Player
- Run the command below to install vlc
# yum -y install vlc
Friday, March 13, 2015
membuat bilangan acak pada php
function yang digunakan rand()
contoh ;
contoh ;
<?php
$bilangan = rand(2,18);
echo $bilangan;
?>
$bilangan = rand(2,18);
echo $bilangan;
?>
Thursday, March 5, 2015
How to open winmail.dat file on centos
How to open winmail.dat file on centos
#yum install tnef
#tnef winmail.dat
#yum install tnef
#tnef winmail.dat
How to open winmail.dat files on Ubuntu / Debian
install tnef
#sudo apt-get install tnef
extract file winmail.dat
#tnef winmail.dat
#sudo apt-get install tnef
extract file winmail.dat
#tnef winmail.dat
Wednesday, March 4, 2015
Install GCC Compiler on centos
Install gcc
[root@localhost /]# yum install gcc gcc-c++
check gcc version
[root@localhost /]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Test gcc C compiler with a sample foo.c program
Create a file called test.c :
#vim test.c
add text like this :
#include<stdio.h>
int main(void){
printf("Hello World!\n");
return 0;
}
To compile test.c into foo executable file, type:
# cc test.c -o test
To execute foo program, type:
# ./test
Hello World!
[root@localhost /]# yum install gcc gcc-c++
check gcc version
[root@localhost /]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Test gcc C compiler with a sample foo.c program
Create a file called test.c :
#vim test.c
add text like this :
#include<stdio.h>
int main(void){
printf("Hello World!\n");
return 0;
}
To compile test.c into foo executable file, type:
# cc test.c -o test
To execute foo program, type:
# ./test
Hello World!
instlal compiler on centos
Setup a basic development environment on CentOS Enterprise Linux :
#yum install wxGTK-devel wxGTK autoconf automake binutils bison flex gcc gcc-c++ gettext libtool make patch pkgconfig redhat-rpm-config rpm-build rpm-sign libstdc++-devel libstdc++ c++
- autoconf
- automake
- binutils
- bison
- flex
- gcc
- gcc-c++
- gettext
- libtool
- make
- patch
- pkgconfig
- redhat-rpm-config
- rpm-build
- rpm-sign
- libstdc++-devel
- libstdc++
- c++
- wxGTK-devel
- wxGTK
#yum install wxGTK-devel wxGTK autoconf automake binutils bison flex gcc gcc-c++ gettext libtool make patch pkgconfig redhat-rpm-config rpm-build rpm-sign libstdc++-devel libstdc++ c++
Sunday, March 1, 2015
Remote Desktop (rdesktop) in Redhat/Fedora/CentOS
About Rdesktop
Rdesktop application is use to connect RDP (Remote Desktop Protocol) of any Operating System like Windows XP, Window NT, Windows 2003/2008, Windows Vista and Windows 7 from Linux machine. It’s a client utility for Remote Desktop Protocol (RDP). In this article we are going to view how we can take remote desktop of Windows Terminal using Hostname and IP Address.
Please make sure following points before connecting to remote host.
Install rdesktop (Remote Desktop)
#rpm -qa rdesktop
#yum -y install rdesktop
How to use rdesktop with hostname
To connect Windows host from Linux desktop type following command using -u parameter as username (narad) and (ft2) as hostname of my Windows host. To resolve host name make entry at /etc/hosts file if you don’t have DNS Server in your environm
rdesktop -u user_login IP_Host
example :
#rdesktop -u administrator 192.168.1.7
Rdesktop application is use to connect RDP (Remote Desktop Protocol) of any Operating System like Windows XP, Window NT, Windows 2003/2008, Windows Vista and Windows 7 from Linux machine. It’s a client utility for Remote Desktop Protocol (RDP). In this article we are going to view how we can take remote desktop of Windows Terminal using Hostname and IP Address.
Please make sure following points before connecting to remote host.
- Enable RDP port no. 3389 in Firewall.
- Enable remote desktop under Windows Operating System.
- Require at least one user with password.
- Under MS-Windows desktop >> Right Click on My Computer >> Select properties >> Select Remote tab >> Enable Remote desktop >> Save the changes.
Install rdesktop (Remote Desktop)
#rpm -qa rdesktop
#yum -y install rdesktop
How to use rdesktop with hostname
To connect Windows host from Linux desktop type following command using -u parameter as username (narad) and (ft2) as hostname of my Windows host. To resolve host name make entry at /etc/hosts file if you don’t have DNS Server in your environm
rdesktop -u user_login IP_Host
example :
#rdesktop -u administrator 192.168.1.7
Wednesday, February 25, 2015
mssql_connect() not working on centos 6.2 / 6.5
server: centos 6.2
PHP Version 5.3.3
had install: freetds; ODBC; php_mssql
selinux was disable
mssql.so was enable in php.ini
for install freetds on centos click here
if finish restart your server
PHP Version 5.3.3
had install: freetds; ODBC; php_mssql
selinux was disable
mssql.so was enable in php.ini
for install freetds on centos click here
if finish restart your server
How to Install Configure FreeTDS on centos 6.5
FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.
Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by these databases for their own clients. It supports many different flavors of the protocol and three APIs to access it.
Additionally FreeTDS works with other software such as Perl and PHP, providing access from those languages as well.
Well i will use this to connect my Perl Scripts to SQL Server Databases in CentOS.
Currently in 6.5 using yum, version installed is not working correct with Perl DBD Module. By this reason i need to do this task manually from scratch.
Requirement
RHE EPEL Repository
You must have make and gcc commands installed on your system
1.Install UnixODBC Package
[root@localhost ~]# yum install unixODBC unixODBC-devel
2. Install freeTDS Package
[root@localhost tmp]# wget ftp://ftp.astron.com/pub/freetds/stable/freetds-stable.tgz
[root@localhost tmp]# tar xfvz freetds-stable.tgz
[root@localhost freetds-stable]# cd [your freetds folder]
[root@localhost freetds-stable]# ./configure --prefix=/usr/local/freetds
[root@localhost freetds-stable]# make
[root@localhost freetds-stable]# make install
[root@localhost freetds-stable]# ln -s /usr/local/freetds/etc/freetds.conf /etc/freetds.conf
Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by these databases for their own clients. It supports many different flavors of the protocol and three APIs to access it.
Additionally FreeTDS works with other software such as Perl and PHP, providing access from those languages as well.
Well i will use this to connect my Perl Scripts to SQL Server Databases in CentOS.
Currently in 6.5 using yum, version installed is not working correct with Perl DBD Module. By this reason i need to do this task manually from scratch.
Requirement
RHE EPEL Repository
You must have make and gcc commands installed on your system
1.Install UnixODBC Package
[root@localhost ~]# yum install unixODBC unixODBC-devel
2. Install freeTDS Package
[root@localhost tmp]# wget ftp://ftp.astron.com/pub/freetds/stable/freetds-stable.tgz
[root@localhost tmp]# tar xfvz freetds-stable.tgz
[root@localhost freetds-stable]# cd [your freetds folder]
[root@localhost freetds-stable]# ./configure --prefix=/usr/local/freetds
[root@localhost freetds-stable]# make
[root@localhost freetds-stable]# make install
[root@localhost freetds-stable]# ln -s /usr/local/freetds/etc/freetds.conf /etc/freetds.conf
Friday, February 20, 2015
jquery loading animation
you can add loading animation on even submit.
before add loading animation, you can make a loading animation here
download and then make id default value on ready function $('#wait').hide();
and then show loading animation like here,
before add loading animation, you can make a loading animation here
download and then make id default value on ready function $('#wait').hide();
and then show loading animation like here,
$('#form').submit(function() {
$.ajax({
url: '/whatever.php',
beforeSend: function() { $('#wait').show(); },
complete: function() { $('#wait').hide(); }
});
return false;
});
$.ajax({
url: '/whatever.php',
beforeSend: function() { $('#wait').show(); },
complete: function() { $('#wait').hide(); }
});
return false;
});
Tuesday, February 10, 2015
how to install virtualBox 4.3 on Fedora/CentOS/RHEL
Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.
VirtualBox supports a large number of guest operating systems:
Windows 3.x
Windows NT 4.0
Windows 2000
Windows XP
Windows Server 2003
Windows Vista
Windows 7
Windows 8
Windows 8.1
DOS
Linux (2.4, 2.6, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11)
Solaris
OpenSolaris
OpenBSD
This guide shows howto install VirtualBox 4.3 (currently 4.3.20) on Fedora 21/20/19/18/17, CentOS 7/6.6/5.11, Red Hat (RHEL) 7/6.6/5.11. This guide uses Virtual Box own yum repositories.
Note: Fedora 16 users can install VirtualBox 4.2, Fedora 15/14 users can install VirtualBox 4.1, Fedora 13 users can install VirtualBox 4.0 and Fedora 12 users can install VirtualBox 3.2.
1. Change to root User
#su -
2. Install Fedora or RHEL Repo Files
#cd /etc/yum.repos.d/
Fedora 21/20/19/18/17/16/15/14/13/12 users
#wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 users
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
How to install google chrome on centos 6
Download application from
# wget http://chrome.richardlloyd.org.uk/install_chrome.sh
Change user access
# chmod +x install_chrome.sh
and then Install application
# sh install_chrome.sh
# wget http://chrome.richardlloyd.org.uk/install_chrome.sh
Change user access
# chmod +x install_chrome.sh
and then Install application
# sh install_chrome.sh
Thursday, January 29, 2015
Samba Error Multiple connections to a server or shared resource by same user, ..
How to fix samba error on windows client :
"Multiple connections to a server or shared resource by same user, using more than one username, are not allowed. Disconnect all previous connections to the server or shared resource and try again"
Solution
Windows by default stores a cache of all the network drives accessed so that next time when you try to access the same path it will take the credentials from the cache without prompting for username/password again.
In such cases you need to clear the cache.
How do we do that?
Go to your windows machine and open the cmd prompt
C:\Users\Deepak>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK \\192.9.18.6\common Microsoft Windows Network
The command completed successfully.
As you see above a single cache entry is there in my windows machine for //192.9.18.6, so next time if I try to access this share with some other username/password, I would get the same error.
So we will have to clear this cache
C:\Users\Deepak>net use /delete \\192.168.0.100\IPC$
\\192.168.0.100\IPC$ was deleted successfully.
C:\Users\Deepak>net use
New connections will be remembered.
There are no entries in the list.
or
If you are using active directory, you can add script ".bat" on your server for automatically mapping.
add netlogon samba : /var/lib/samba/netlogon/name_logon.bat
with value of file .bat like this :
net time \\192.9.18.6 /set /yes
net use m: /delete /y
net use m: \\192.9.18.6\common
"Multiple connections to a server or shared resource by same user, using more than one username, are not allowed. Disconnect all previous connections to the server or shared resource and try again"
Solution
Windows by default stores a cache of all the network drives accessed so that next time when you try to access the same path it will take the credentials from the cache without prompting for username/password again.
In such cases you need to clear the cache.
How do we do that?
Go to your windows machine and open the cmd prompt
C:\Users\Deepak>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK \\192.9.18.6\common Microsoft Windows Network
The command completed successfully.
As you see above a single cache entry is there in my windows machine for //192.9.18.6, so next time if I try to access this share with some other username/password, I would get the same error.
So we will have to clear this cache
C:\Users\Deepak>net use /delete \\192.168.0.100\IPC$
\\192.168.0.100\IPC$ was deleted successfully.
C:\Users\Deepak>net use
New connections will be remembered.
There are no entries in the list.
or
If you are using active directory, you can add script ".bat" on your server for automatically mapping.
add netlogon samba : /var/lib/samba/netlogon/name_logon.bat
with value of file .bat like this :
net time \\192.9.18.6 /set /yes
net use m: /delete /y
net use m: \\192.9.18.6\common
Wednesday, January 28, 2015
How to remove all file of same extension files in directory linux
Insert into folder
and then delete all file of same extention file *.txt
# find . -name "*.txt" -type f -delete
and then delete all file of same extention file *.txt
# find . -name "*.txt" -type f -delete
Sunday, January 25, 2015
How to install RapidSVN on Centos 6
Download rapidsvn the latest epel-release rpm from
http://dl.fedoraproject.org/pub/epel/6/x86_64/
Install epel-release rpm:
# rpm -Uvh file_name_rapidsvn.rpm
if you are found error: Failed dependencies:
please install library dependencies using yum search or download from http://pkgs.org/centos-6/epel-x86_64/rapidsvn-0.12.0-3.el6.x86_64.rpm.html
Install rapidsvn rpm package:
# yum install rapidsvn
reff :
http://pkgs.org/centos-6/epel-x86_64/rapidsvn-0.12.0-3.el6.x86_64.rpm.html
Tuesday, January 20, 2015
find file in linux with command terminal
example : Find file with extention .pdf
# find /home -type f -name "*.pdf"
# find /home -type f -name "*.pdf"
Monday, January 19, 2015
Extract Files tar on linux
How to extract or uncompress a file from tar ball downloaded from the Internet under Linux using bash command prompt?
Extract or Unpack a TarBall File
To unpack or extract a tar file, type:
tar -xvf file.tar
To save disk space and bandwidth over the network all files are saved using compression program such as gzip or bzip2. To extract / unpack a .tar.gz (gzip) file, enter (note -z option):
tar -xzvf file.tar.gz
To extract / unpack a .tar.bz2 (bzip2) file, enter (note -j option):
tar -xjvf file.tar.bz2
Where,
-x : Extract a tar ball.
-v : Verbose output or show progress while extracting files.
-f : Specify an archive or a tarball filename.
-j : Decompress and extract the contents of the compressed archive created by bzip2 program (tar.bz2 extension).
-z : Decompress and extract the contents of the compressed archive created by gzip program (tar.gz extension).
Monday, January 12, 2015
Setting Autentification Postfix Mail dan Dovecot with user LDAP on Centos 6
Edit Postfix config :
vim /etc/postfix/ldap-aliases.cf
bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
special_result_filter = %s@%d
vim /etc/postfix/ldap-users.cf
bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
vim /etc/postfix/ldap-aliases.cf
bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
special_result_filter = %s@%d
vim /etc/postfix/ldap-users.cf
bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
Subscribe to:
Posts (Atom)
About Me
|