[Linux]mount nfs 에러

Linux 2017.11.15 09:11 Posted by 애플자라

mount -t nfs 실패

--> mount: wrong fs type, bad option, bad superblock on 

--> yum search nfs

--> yum install nfs-utils

 

mount -t nfs 실패

--> mount.nfs: rpc.statd is not running but is required for remote locking.
      mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
      mount.nfs: an incorrect mount option was specified

--> yum search portmap

--> centos 6.3 에서는 portmap 을 안 쓰는건지 rpcbind 가 검색 됨

--> rpm -qa | grep rpcbind

--> service rpcbind restart

 

mount -t nfs 성공

[출처] mount nfs 에러|작성자 무상지도

'Linux' 카테고리의 다른 글

[Linux]yum CentOS 지난 버전 사용하기  (0) 2017.12.20
[Linux]mount nfs 에러  (0) 2017.11.15
[FTP]SecureCrt X/Y/Zmodem  (0) 2017.09.18
[Linux]batch shell(tar,ftp,sftp)  (0) 2017.08.08
[SSH]접속툴(telnet/SSH/SFTP)  (0) 2017.08.03
[Linux]Samba 업데이트  (0) 2017.06.13

[FTP]SecureCrt X/Y/Zmodem

Linux 2017.09.18 14:23 Posted by 애플자라

 

 

[root@server ~]# sz /disk/data/temp/D43D7E0F1DC6-20170918140715.zip --> 파일다운로드시

 

# rz - 내 PC에 있는 자료를 서버로 업로드
# sz 파일명 - 지정된 폴더로 다운

------------------------------------------------

 

[root@server ~]# yum install lrzsz

'Linux' 카테고리의 다른 글

[Linux]yum CentOS 지난 버전 사용하기  (0) 2017.12.20
[Linux]mount nfs 에러  (0) 2017.11.15
[FTP]SecureCrt X/Y/Zmodem  (0) 2017.09.18
[Linux]batch shell(tar,ftp,sftp)  (0) 2017.08.08
[SSH]접속툴(telnet/SSH/SFTP)  (0) 2017.08.03
[Linux]Samba 업데이트  (0) 2017.06.13

[Linux]batch shell(tar,ftp,sftp)

Linux 2017.08.08 14:07 Posted by 애플자라

----------------------------------------
* FTP
----------------------------------------
#!/bin/sh

HOST=IP명
USER=계정
PASSWORD=패스워드

#folder=$(date +'%Y%m%d')
folder_tar=$(date +'%Y%m%d')".tar"

cd /var/backup/web/
#tar cvf $folder_tar $folder

#backup=$(date +'%Y%m%d')".*"

ftp -i -n <<HERE
     open $HOST
     user $USER $PASSWORD
     bin
     prompt
  cd IT/06_DbBackup/DLP/DEFCON5/WEB/
     put $folder_tar
     close
     bye
HERE
exit 0


----------------------------------------
* SFTP
----------------------------------------
#! /bin/sh

HOST=IP명
USER=계정
PASSWORD=패스워드

#folder=$(date +'%Y%m%d')
folder_tar=$(date +'%Y%m%d')".tar"

cd /var/backup/web/
#tar cvf $folder_tar $folder

#backup=$(date +'%Y%m%d')".*"

sftp 계정@HOST=IP명 << EOF
cd /c/IT/06_DbBackup/DLP/DEFCON5/WEB/
put $folder_tar
quit
EOF

 

'Linux' 카테고리의 다른 글

[Linux]mount nfs 에러  (0) 2017.11.15
[FTP]SecureCrt X/Y/Zmodem  (0) 2017.09.18
[Linux]batch shell(tar,ftp,sftp)  (0) 2017.08.08
[SSH]접속툴(telnet/SSH/SFTP)  (0) 2017.08.03
[Linux]Samba 업데이트  (0) 2017.06.13
리눅스 이더넷 맥 주소 확인  (0) 2017.02.24

리눅스 이더넷 맥 주소 확인

Linux 2017.02.24 16:31 Posted by 애플자라

 

 

 

1. ifconfig
[root@server ~]# ifconfig -a | grep ^eth

 

2. IP확인
[root@server ~]# ip link show eth0

 

3. Mac Address만 확인
[root@server ~]# ifconfig -a | grep ^eth | awk '{print $5}'

 

출처 - 리눅스 이더넷 맥 주소 확인

 

'Linux' 카테고리의 다른 글

[SSH]접속툴(telnet/SSH/SFTP)  (0) 2017.08.03
[Linux]Samba 업데이트  (0) 2017.06.13
리눅스 이더넷 맥 주소 확인  (0) 2017.02.24
[shell] Time format  (0) 2017.02.01
LISTEN Port확인  (0) 2016.11.11
[Linux]시스템 시간관리하기(hwclock)  (0) 2016.11.11

[shell] Time format

Linux 2017.02.01 11:39 Posted by 애플자라

# 작업날짜폴더 생성
WORKDAY=`date +%Y%m%d`

 

# 한달전 년월 가져오기(YYYYMM)
MONTH=`date +%Y%m -d -1months`

 

# 한달전 년 가져오기(YYYYMM)
YEAR_YYYY=`date +%Y -d -1months`

 

# 한달전 월 가져오기(YYYYMM)
MONTH_MM=`date +%m -d -1months`

 

# 한달전 년월 가져오기(YYYYMM)
MONTH_YYYYMM=`date +%Y-%m -d -1months`

 

# 전월 년월 가져오기(YYMM) -- 매월1일 실행
YYMM=` date +%g%m -d -1day`

 

 

참고 - http://netssam.tistory.com/11

 

'Linux' 카테고리의 다른 글

[Linux]Samba 업데이트  (0) 2017.06.13
리눅스 이더넷 맥 주소 확인  (0) 2017.02.24
[shell] Time format  (0) 2017.02.01
LISTEN Port확인  (0) 2016.11.11
[Linux]시스템 시간관리하기(hwclock)  (0) 2016.11.11
[Linux]rsync 복사  (0) 2016.11.01

[MYSQL]DB 튜닝(innodb / my.cnf)

Programing 2016.11.14 16:33 Posted by 애플자라

### DB셋팅 / 2016.11.14


# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

 

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=1000

 

# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0

 

# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256

 

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=369M


# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before.  This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8

 

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G

 

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=738M

 

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=641M

 

# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K

 

# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=256K

 

# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=26M

 

# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1

 

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=13M

 

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=1243M

 

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=622M

 

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=18

innodb_lock_wait_timeout = 1200

 

[MYSQL]LINUX 시작서비스등록

Database 2016.11.14 08:36 Posted by 애플자라

[MYSQL_HOME]/support-files/mysql.server

cp mysql.server /etc/init.d/mysqld1

LISTEN Port확인

Linux 2016.11.11 23:25 Posted by 애플자라

-bash-4.1$ netstat -atnp
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name  
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      -                  
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      -                  
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      -                  
tcp        0      0 0.0.0.0:32888               0.0.0.0:*                   LISTEN      -                   
tcp        0      0 :::55138                    :::*                        LISTEN      -                  
tcp        0      0 :::3306                    :::*                        LISTEN      -                  
tcp        0      0 :::111                      :::*                        LISTEN      -                  
tcp        0      0 :::22                       :::*                        LISTEN      -                  
tcp        0      0 :::23                       :::*                        LISTEN      -                  
tcp        0      0 ::1:631                     :::*                        LISTEN      -

 

'Linux' 카테고리의 다른 글

리눅스 이더넷 맥 주소 확인  (0) 2017.02.24
[shell] Time format  (0) 2017.02.01
LISTEN Port확인  (0) 2016.11.11
[Linux]시스템 시간관리하기(hwclock)  (0) 2016.11.11
[Linux]rsync 복사  (0) 2016.11.01
강제 umount 방법 (umount : device is busy 발생시)  (0) 2016.08.05

[Linux]시스템 시간관리하기(hwclock)

Linux 2016.11.11 08:28 Posted by 애플자라

[/sbin] # crontab -l
0 4 * * * rdate -s time.bora.net && /sbin/hwclock --systohc

 

Case1) /sbin/hwclock -s / 하드웨어 시간

Case2) rdate -s time.bora.net && /sbin/hwclock -w

Case3) rdate -s time.bora.net && /sbin/hwclock --systohc / 바뀐 시스템 표준시각을 H/W 설정

 

시간 수동으로 변경

[root@server ~]# date -s "2014-09-05 11:51:05"
Fri Sep  5 11:51:05 KST 2014



출처: http://antilibrary.org/422 [Alex’s Antilibrary : My collection of unread books]

'Linux' 카테고리의 다른 글

[shell] Time format  (0) 2017.02.01
LISTEN Port확인  (0) 2016.11.11
[Linux]시스템 시간관리하기(hwclock)  (0) 2016.11.11
[Linux]rsync 복사  (0) 2016.11.01
강제 umount 방법 (umount : device is busy 발생시)  (0) 2016.08.05
network IP설정확인  (0) 2016.04.26

[Linux]rsync 복사

Linux 2016.11.01 15:16 Posted by 애플자라
-- 데이터 복사(매일 00:10)
rsync -avzh /data/NFS /share/homepage_nas

 

 

-- 원본 서버에 없는 파일은 백업 서버에서 삭제(진행상황 확인)
rsync --progress --delete -avzh /data/NFS /share/homepage_nas

'Linux' 카테고리의 다른 글

LISTEN Port확인  (0) 2016.11.11
[Linux]시스템 시간관리하기(hwclock)  (0) 2016.11.11
[Linux]rsync 복사  (0) 2016.11.01
강제 umount 방법 (umount : device is busy 발생시)  (0) 2016.08.05
network IP설정확인  (0) 2016.04.26
netstat  (0) 2016.03.24