How to sort du -h output by size
du -hs * | sort -h
Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts
Monday, January 7, 2019
Monday, December 10, 2018
Running file .js on server linux using pm2
Using "pm2":
https://github.com/Unitech/pm2
Install Application :
- install pm2 "npm install pm2 -g"
- cd folder/app/server.js
- Runing " pm2 start server.js"
* gunakan command "pm2 list" untuk melihat seluruh process yang ada
* "pm2 <stop | start | delete | restart> <app_name | id> " untuk mengontrol process
* "pm2 logs <app_name | id>" untuk mendapatkan log file
https://github.com/Unitech/pm2
Install Application :
- install pm2 "npm install pm2 -g"
- cd folder/app/server.js
- Runing " pm2 start server.js"
* gunakan command "pm2 list" untuk melihat seluruh process yang ada
* "pm2 <stop | start | delete | restart> <app_name | id> " untuk mengontrol process
* "pm2 logs <app_name | id>" untuk mendapatkan log file
Monday, March 5, 2018
SSL Library Error: -8181 Certificate has expired on centos server
SSL Library Error: -8181 Certificate has expired
Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved
# vim /etc/httpd/conf/httpd.conf
add text "NSSEnforceValidCerts off"
and then save.
For reference How to know certification expiration date
Please execute command below.
# certutil -L -d /etc/httpd/alias -n Server-Cert
Restart service nss
# service nscd restart
Restart Service apache
# service httpd restart
Reff : https://ecl.ntt.com/en/news/2016122801/
Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved
# vim /etc/httpd/conf/httpd.conf
add text "NSSEnforceValidCerts off"
and then save.
For reference How to know certification expiration date
Please execute command below.
# certutil -L -d /etc/httpd/alias -n Server-Cert
Restart service nss
# service nscd restart
Restart Service apache
# service httpd restart
Reff : https://ecl.ntt.com/en/news/2016122801/
Friday, November 24, 2017
how to auto mounting samba from fstab
How to auto mounting samba from fstab
#vim /etc/fstab
put this script :
//192.168.18.6/backup1 /mnt/backup1 cifs username=xxxxx,password=xxxxx 0 0
and then
# mount -a
check result :
# df -h
Sunday, June 4, 2017
How to synchronize file server without password root with SSH keygen on Centos 6
# ssh-keygen
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
NB: Please dont put password (Only Enter)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
41:71:f3:9b:14:tc:6f:de:fa:m1:05:c5:0d:65:b6:b7 root@svr7.server.co.id
The key's randomart image is:
+--[ RSA 2048]----+
| o.oo. .+*|
| . ..o.. ++|
| . .o ...|
| . .oo .o|
| x oo. w.|
| .... |
| .o |
| . . |
| .. |
+-----------------+
Copy id_rsa to server destination
# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.9.18.25
Synchronize Script
# rsync -avz --delete /mnt/test/ root@192.9.18.25:/mnt/test/
Wednesday, February 1, 2017
Tuesday, December 27, 2016
How to Mouting NFS Synology on Centos 6.5
#vim /etc/fstab
Put :
//192.9.18.11/Onlinebackup1/ /mnt/backup1 cifs user=backup,password=xxx,rw,iocharset=utf8 0 0
Put :
//192.9.18.11/Onlinebackup1/ /mnt/backup1 cifs user=backup,password=xxx,rw,iocharset=utf8 0 0
Esc : wq for Safe.
Wednesday, September 7, 2016
How To Fix PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" on centos 6.5
How to fix error PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" centos 6.5
Answer : Open terminal
# yum clean all
Answer : Open terminal
# yum clean all
Enter.
Friday, March 18, 2016
Find and remove all file from termilal Linux
# find . -name "*Locky*" -exec rm -rf {} \;
or
# find . -type f -name "*.Locky*" -exec rm -i {} \;
remarks :
-name "FILE-TO-FIND" : File pattern.
-exec rm -rf {} \; : Delete all files matched by file pattern.
-type f : Only match files and do not include directory name
Wednesday, November 11, 2015
How to fix yum error "Metadata file does not match checksum"
how to fix yum error "Metadata file does not match checksum"
$sudo yum clean metadata v
$sudo yum clean metadata v
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, 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
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
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
Subscribe to:
Posts (Atom)
About Me
|
