CentOS7.4安装压力测试软件stress

[root@centos12 stress-1.0.4]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

[root@centos12 thmsoftware]# wget http://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz
--2018-01-23 11:53:06-- http://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz
Resolving people.seas.harvard.edu (people.seas.harvard.edu)... 54.172.197.41
Connecting to people.seas.harvard.edu (people.seas.harvard.edu)|54.172.197.41|:80... connected.
HTTP request sent,awaiting response... 200 OK
Length: 191800 (187K) [application/x-gzip]
Saving to: ‘stress-1.0.4.tar.gz’

100%[========================>] 191,800 84.4KB/s in 2.2s

2018-01-23 11:53:14 (84.4 KB/s) - ‘stress-1.0.4.tar.gz’ saved [191800/191800]

[root@centos12 thmsoftware]#
[root@centos12 thmsoftware]# ls -ltr
total 188
-rw-r--r-- 1 root root 191800 Mar 18 2014 stress-1.0.4.tar.gz
[root@centos12 thmsoftware]# tar -xvf stress-1.0.4.tar.gz
stress-1.0.4/
stress-1.0.4/aclocal.m4
stress-1.0.4/INSTALL
stress-1.0.4/depcomp
stress-1.0.4/configure.in
stress-1.0.4/NEWS
stress-1.0.4/COPYING
stress-1.0.4/ChangeLog
stress-1.0.4/missing
stress-1.0.4/TODO
stress-1.0.4/configure
stress-1.0.4/README
stress-1.0.4/doc/
stress-1.0.4/doc/mdate-sh
stress-1.0.4/doc/stress.html
stress-1.0.4/doc/stamp-vti
stress-1.0.4/doc/stress.1
stress-1.0.4/doc/stress.info
stress-1.0.4/doc/Makefile.am
stress-1.0.4/doc/stress.texi
stress-1.0.4/doc/version.texi
stress-1.0.4/doc/texinfo.tex
stress-1.0.4/doc/Makefile.in
stress-1.0.4/AUTHORS
stress-1.0.4/Makefile.am
stress-1.0.4/Makefile.in
stress-1.0.4/src/
stress-1.0.4/src/Makefile.am
stress-1.0.4/src/stress.c
stress-1.0.4/src/Makefile.in
stress-1.0.4/test/
stress-1.0.4/test/check_version_return_code
stress-1.0.4/test/Makefile.am
stress-1.0.4/test/check_usage_return_code
stress-1.0.4/test/Makefile.in
stress-1.0.4/install-sh
[root@centos12 thmsoftware]# cd stress-1.0.4
[root@centos12 stress-1.0.4]# ls -ltr
total 328
-rwxr-xr-x 1 1003 1003 7831 Dec 8 2002 INSTALL
-rwxr-xr-x 1 1003 1003 395 Dec 9 2005 AUTHORS
-rwxr-xr-x 1 1003 1003 1921 Jan 23 2007 TODO
-rwxr-xr-x 1 1003 1003 922 May 31 2008 README
-rwxr-xr-x 1 1003 1003 367 Aug 12 2009 Makefile.am
-rwxr-xr-x 1 1003 1003 3509 Feb 18 2010 NEWS
-rwxr-xr-x 1 1003 1003 967 Mar 19 2010 configure.in
-rwxr-xr-x 1 1003 1003 11135 Mar 19 2010 missing
-rwxr-xr-x 1 1003 1003 13620 Mar 19 2010 install-sh
-rw-r--r-- 1 1003 1003 32612 Mar 19 2010 aclocal.m4
-rw-r--r-- 1 1003 1003 18730 Mar 19 2010 Makefile.in
-rwxr-xr-x 1 1003 1003 17867 Mar 19 2010 depcomp
-rwxr-xr-x 1 1003 1003 160968 Mar 19 2010 configure
-rw-r--r-- 1 1003 1003 14320 Mar 19 2010 ChangeLog
-rw-r--r-- 1 1003 1003 18092 Mar 24 2010 COPYING
drwxr-xr-x 2 1003 1003 108 Mar 18 2014 test
drwxr-xr-x 2 1003 1003 60 Mar 18 2014 src
drwxr-xr-x 2 1003 1003 189 Mar 18 2014 doc
[root@centos12 stress-1.0.4]# cat README
INSTALL

See the INSTALL file for generic installation instructions. The quick
version is:

./configure && make && sudo make install

USAGE

You can see the program's usage statement by invoking it with --help. A
typical invocation is:

stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s

A user manual is available:

info stress

The project home page is:

http://weather.ou.edu/~apw/projects/stress/

PATCHES

This program works really well for me,but it might not have some of the
features that you want. If you would like,please extend the code and send
me the patch. Please use the context diff format. That is: save the
original program as stress.c.orig,then make and test your desired changes
to stress.c,then run `diff -u stress.c.orig stress.c' to produce a context
diff. Enjoy the program :-)

Amos Waterland <apw@rossby.metr.ou.edu>
Norman,Oklahoma
27 Nov 2001
[root@centos12 stress-1.0.4]# ./configure && make && make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in /thmsoftware/stress-1.0.4':<br/>configure: error: no acceptable C compiler found in $PATH<br/>Seeconfig.log' for more details.
[root@centos12 stress-1.0.4]# cat config.log
This file contains any messages produced by compilers while
running configure,to aid debugging if configure makes a mistake.

It was created by configure,which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure

---------

Platform.

---------

hostname = centos12
uname -m = x86_64
uname -r = 3.10.0-693.11.1.el7.x86_64
uname -s = Linux
uname -v = #1 SMP Mon Dec 4 23:52:40 UTC 2017

/usr/bin/uname -p = x86_64
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin

-----------

Core tests.

-----------

configure:1858: checking for a BSD-compatible install
configure:1926: result: /usr/bin/install -c
configure:1937: checking whether build environment is sane
configure:1980: result: yes
configure:2005: checking for a thread-safe mkdir -p
configure:2044: result: /usr/bin/mkdir -p
configure:2057: checking for gawk
configure:2073: found /usr/bin/gawk
configure:2084: result: gawk
configure:2095: checking whether make sets $(MAKE)
configure:2117: result: yes
configure:2350: checking for gcc
configure:2380: result: no
configure:2443: checking for cc
configure:2490: result: no
configure:2546: checking for cl.exe
configure:2576: result: no
configure:2600: error: in /thmsoftware/stress-1.0.4':<br/>configure:2603: error: no acceptable C compiler found in $PATH<br/>Seeconfig.log' for more details.

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

Cache variables.

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

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=yes

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

Output variables.

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

ACLOCAL='${SHELL} /thmsoftware/stress-1.0.4/missing --run aclocal-1.10'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /thmsoftware/stress-1.0.4/missing --run tar'
AUTOCONF='${SHELL} /thmsoftware/stress-1.0.4/missing --run autoconf'
AUTOHEADER='${SHELL} /thmsoftware/stress-1.0.4/missing --run autoheader'
AUTOMAKE='${SHELL} /thmsoftware/stress-1.0.4/missing --run automake-1.10'
AWK='gawk'
CC=''
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /thmsoftware/stress-1.0.4/missing --run makeinfo'
MKDIR_P='/usr/bin/mkdir -p'
OBJEXT=''
PACKAGE='stress'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='1.0.4'
ac_ct_CC=''
amfastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am
include=''
amisrc=''
am
leading_dot='.'
amquote=''
am
tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /thmsoftware/stress-1.0.4/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/usr/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

-----------

confdefs.h.

-----------

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "stress"
#define VERSION "1.0.4"

configure: exit 1
[root@centos12 stress-1.0.4]#

编译错误,缺少GCC模块

[root@centos12 stress-1.0.4]# stress --cpu 8 --io 4 --vm 2 --vm-by tes 128M --timeout 10s
-bash: stress: command not found
[root@centos12 stress-1.0.4]#
[root@centos12 stress-1.0.4]# find / -name stress
[root@centos12 stress-1.0.4]#
[root@centos12 stress-1.0.4]# yum install gcc -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.cn99.com
  • extras: mirrors.tuna.tsinghua.edu.cn
  • updates: mirrors.cn99.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package gcc.x86_64 0:4.8.5-16.el7_4.1 will be installed
    --> Processing Dependency: cpp = 4.8.5-16.el7_4.1 for package: gcc-4.8.5-16.el7_4.1.x86_64
    --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-16.el7_4.1.x86_64
    --> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-16.el7_4.1.x86_64
    --> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-16.el7_4.1.x86_64
    --> Running transaction check
    ---> Package cpp.x86_64 0:4.8.5-16.el7_4.1 will be installed
    ---> Package glibc-devel.x86_64 0:2.17-196.el7_4.2 will be installed
    --> Processing Dependency: glibc-headers = 2.17-196.el7_4.2 for package: glibc-devel-2.17-196.el7_4.2.x86_64
    --> Processing Dependency: glibc-headers for package: glibc-devel-2.17-196.el7_4.2.x86_64
    ---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
    ---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
    --> Running transaction check
    ---> Package glibc-headers.x86_64 0:2.17-196.el7_4.2 will be installed
    --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-196.el7_4.2.x86_64
    --> Processing Dependency: kernel-headers for package: glibc-headers-2.17-196.el7_4.2.x86_64
    --> Running transaction check
    ---> Package kernel-headers.x86_64 0:3.10.0-693.11.6.el7 will be installed
    --> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size

Installing:
gcc x86_64 4.8.5-16.el7_4.1 updates 16 M
Installing for dependencies:
cpp x86_64 4.8.5-16.el7_4.1 updates 5.9 M
glibc-devel x86_64 2.17-196.el7_4.2 updates 1.1 M
glibc-headers x86_64 2.17-196.el7_4.2 updates 676 k
kernel-headers x86_64 3.10.0-693.11.6.el7 updates 6.0 M
libmpc x86_64 1.0.1-3.el7 base 51 k
mpfr x86_64 3.1.1-4.el7 base 203 k

Transaction Summary

Install 1 Package (+6 Dependent packages)

Total download size: 30 M
Installed size: 60 M
Downloading packages:
(1/7): glibc-headers-2.17-196.el7_4.2.x86_64.rpm | 676 kB 00:06
(2/7): glibc-devel-2.17-196.el7_4.2.x86_64.rpm | 1.1 MB 00:08
(3/7): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:09
(4/7): mpfr-3.1.1-4.el7.x86_64.rpm | 203 kB 00:09
(5/7): cpp-4.8.5-16.el7_4.1.x86_64.rpm | 5.9 MB 00:25
(6/7): kernel-headers-3.10.0-693.11.6.el7.x86_64.rpm | 6.0 MB 00:28
(7/7): gcc-4.8.5-16.el7_4.1.x86_64.rpm | 16 MB 00:43

Total 699 kB/s | 30 MB 00:44
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mpfr-3.1.1-4.el7.x86_64 1/7
Installing : libmpc-1.0.1-3.el7.x86_64 2/7
Installing : cpp-4.8.5-16.el7_4.1.x86_64 3/7
Installing : kernel-headers-3.10.0-693.11.6.el7.x86_64 4/7
Installing : glibc-headers-2.17-196.el7_4.2.x86_64 5/7
Installing : glibc-devel-2.17-196.el7_4.2.x86_64 6/7
Installing : gcc-4.8.5-16.el7_4.1.x86_64 7/7
Verifying : cpp-4.8.5-16.el7_4.1.x86_64 1/7
Verifying : glibc-devel-2.17-196.el7_4.2.x86_64 2/7
Verifying : mpfr-3.1.1-4.el7.x86_64 3/7
Verifying : libmpc-1.0.1-3.el7.x86_64 4/7
Verifying : glibc-headers-2.17-196.el7_4.2.x86_64 5/7
Verifying : gcc-4.8.5-16.el7_4.1.x86_64 6/7
Verifying : kernel-headers-3.10.0-693.11.6.el7.x86_64 7/7

Installed:
gcc.x86_64 0:4.8.5-16.el7_4.1

Dependency Installed:
cpp.x86_64 0:4.8.5-16.el7_4.1
glibc-devel.x86_64 0:2.17-196.el7_4.2
glibc-headers.x86_64 0:2.17-196.el7_4.2
kernel-headers.x86_64 0:3.10.0-693.11.6.el7
libmpc.x86_64 0:1.0.1-3.el7
mpfr.x86_64 0:3.1.1-4.el7

Complete!
[root@centos12 stress-1.0.4]#
[root@centos12 stress-1.0.4]#
[root@centos12 stress-1.0.4]#
[root@centos12 stress-1.0.4]#
[root@centos12 stress-1.0.4]# ./configure && make && make install checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking for sqrt in -lm... yes
checking for basename in -lgen... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating test/Makefile
config.status: executing depfiles commands
Making all in .
make[1]: Entering directory /thmsoftware/stress-1.0.4'<br/>make[1]: Nothing to be done forall-am'.
make[1]: Leaving directory /thmsoftware/stress-1.0.4'<br/>Making all in src<br/>make[1]: Entering directory/thmsoftware/stress-1.0.4/src'
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"stress\" -DVERSION=\"1.0.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBM=1 -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -g -O2 -MT stress.o -MD -MP -MF .deps/stress.Tpo -c -o stress.o stress.c
mv -f .deps/stress.Tpo .deps/stress.Po
gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -g -O2 -o stress stress.o -lm
make[1]: Leaving directory /thmsoftware/stress-1.0.4/src'<br/>Making all in doc<br/>make[1]: Entering directory/thmsoftware/stress-1.0.4/doc'
make[1]: Nothing to be done for all'.<br/>make[1]: Leaving directory/thmsoftware/stress-1.0.4/doc'
Making all in test
make[1]: Entering directory /thmsoftware/stress-1.0.4/test'<br/>make[1]: Nothing to be done forall'.
make[1]: Leaving directory /thmsoftware/stress-1.0.4/test'<br/>Making install in .<br/>make[1]: Entering directory/thmsoftware/stress-1.0.4'
make[2]: Entering directory /thmsoftware/stress-1.0.4'<br/>make[2]: Nothing to be done forinstall-exec-am'.
make[2]: Nothing to be done for install-data-am'.<br/>make[2]: Leaving directory/thmsoftware/stress-1.0.4'
make[1]: Leaving directory /thmsoftware/stress-1.0.4'<br/>Making install in src<br/>make[1]: Entering directory/thmsoftware/stress-1.0.4/src'
make[2]: Entering directory /thmsoftware/stress-1.0.4/src'<br/>test -z "/usr/local/bin" || /usr/bin/mkdir -p "/usr/local/bin"<br/>/usr/bin/install -c 'stress' '/usr/local/bin/stress'<br/>make[2]: Nothing to be done forinstall-data-am'.
make[2]: Leaving directory /thmsoftware/stress-1.0.4/src'<br/>make[1]: Leaving directory/thmsoftware/stress-1.0.4/src'
Making install in doc
make[1]: Entering directory /thmsoftware/stress-1.0.4/doc'<br/>make[2]: Entering directory/thmsoftware/stress-1.0.4/doc'
make[2]: Nothing to be done for install-exec-am'.<br/>test -z "/usr/local/share/info" || /usr/bin/mkdir -p "/usr/local/share/info"<br/>/usr/bin/install -c -m 644 './stress.info' '/usr/local/share/info/stress.info'<br/>install-info --info-dir='/usr/local/share/info' '/usr/local/share/info/stress.info'<br/>test -z "/usr/local/share/man/man1" || /usr/bin/mkdir -p "/usr/local/share/man/man1"<br/>/usr/bin/install -c -m 644 'stress.1' '/usr/local/share/man/man1/stress.1'<br/>make[2]: Leaving directory/thmsoftware/stress-1.0.4/doc'
make[1]: Leaving directory /thmsoftware/stress-1.0.4/doc'<br/>Making install in test<br/>make[1]: Entering directory/thmsoftware/stress-1.0.4/test'
make[2]: Entering directory /thmsoftware/stress-1.0.4/test'<br/>make[2]: Nothing to be done forinstall-exec-am'.
make[2]: Nothing to be done for install-data-am'.<br/>make[2]: Leaving directory/thmsoftware/stress-1.0.4/test'
make[1]: Leaving directory `/thmsoftware/stress-1.0.4/test'
[root@centos12 stress-1.0.4]# which stress /usr/local/bin/stress
[root@centos12 stress-1.0.4]#

上述表明stress 安装成功

进行压测
[root@centos12 stress-1.0.4]# stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s
stress: info: [8041] dispatching hogs: 8 cpu,4 io,2 vm,0 hdd
stress: info: [8041] successful run completed in 11s
[root@centos12 stress-1.0.4]#

查看负载变化

[root@centos12 ~]# uptime
13:53:49 up 3:59,2 users,load average: 0.04,0.04,0.05
[root@centos12 ~]# uptime

13:54:03 up 3:59,load average: 1.87,0.42,0.17[root@centos12 ~]# uptime13:54:03 up 3:59,0.17[root@centos12 ~]#[root@centos12 ~]#[root@centos12 ~]# uptime13:54:04 up 3:59,load average: 1.72,0.41,0.17[root@centos12 ~]# uptime13:54:06 up 3:59,0.17[root@centos12 ~]# uptime13:54:07 up 3:59,0.17

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


linux下开机自启: 在/etc/init.d目录下新建文件elasticsearch 并敲入shell脚本: 注意, 前两行必须填写,且要注释掉。 第一行为shell前行代码,目的告诉系统使用shell。 第二行分别代表运行级别、启动优先权、关闭优先权,且后面添加开机服务会用到。 shell脚本
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要赋予其可执行权 chmod +x /etc/rc.d/rc.local 2、赋予脚本可执行权限假设/usr/local/script/autostart.sh是你的脚本路径,给予执行权限 chmod +x /usr
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用ls -ll,会显示成字节大小,而ls- lh会以KB、MB等为单位进行显示,这样比较直观一些。 通过命令du -h –max-depth=1 *,可以查看当前目录下各文件、文件夹的大小,这个比较实用。 查询当前目录总大小可以使用d
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一但shell关闭网站也就关闭了,所以要配置守护进程, 用的是Supervisor,本文主要记录配置的过程和过程遇到的问题 安装Supervisor&#160;1 yum install python-setuptools
设置时区(CentOS 7) 先执行命令timedatectl status|grep &#39;Time zone&#39;查看当前时区,如果不是时区(Asia/Shanghai),则需要先设置为中国时区,否则时区不同会存在时差。 #已经是Asia/Shanghai,则无需设置 [root@xia
vim&#160;/etc/sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO=&quot;static&quot; ONBOOT=yes IPADDR=192.168.8.106 NETMASK=255.255.252.0 GATEWAY=192.168.
一、安装gcc依赖 由于 redis 是用 C 语言开发,安装之前必先确认是否安装 gcc 环境(gcc -v),如果没有安装,执行以下命令进行安装 [root@localhost local]# yum install -y gcc 二、下载并解压安装包 [root@localhost local
第一步 On CentOS/RHEL 6.*: $ sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm On CentOS/RHEL 7: $
/// &lt;summary&gt; /// 取小写文件名后缀 /// &lt;/summary&gt; /// &lt;param name=&quot;name&quot;&gt;文件名&lt;/param&gt; /// &lt;returns&gt;返回小写后缀,不带“.”&lt;/ret
which nohup .bash_profile中并source加载 如果没有就安装吧 yum provides */nohup nohup npm run start &amp; nohup ./kibana &amp;
1.1 MySQL安装 1.1.1 下载wget命令 yum -y install wget 1.1.2 在线下载mysql安装包 wget https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 1.1.3 安装My
重启 reboot shutdown -r now init 6 关闭 init 0 shutdown -h now shutdown -h 20:25 #8点25关机查看内存 free CPU利用率 top 日期 date 设置时间 date 033017002015 #月日时间年 日历 cal
1、firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 :
1 下载并安装MySQL官方的&#160;Yum Repository wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm 使用上面的命令就直接下载了安装用的Yum Repository,大概
CentOS6.x CentOS6中转用Upstrat代替以前的init.d/rcX.d的线性启动方式。 一、相关命令 通过initctl help可以查看相关命令 [root@localhost ~]# initctl help Job commands: start Start job. sto
1、使用命令:df -lk 找到已满磁盘 2、使用命令:du --max-depth=1 -h 查找大文件,删除
ifconfig:查看网卡信息 网卡配置文件位置: /etc/sysconfig/network-scripts/文件夹 nmtui:配置网卡 netstat -tlunp:查看端口信息 端口信息存储位置: /etc/services文件 route:查看路由信息 wget:下载网路文件,例如 wg
ps -ef:查看所有进程,&#160;ps -ef |grap firewalld 查看与firewalld相关的进程 which :查看进程:which firewalld kill 进程id:杀掉进程 kill 640,强制杀:kill -9 640 man:查看帮助,例如 man ps 查看
useradd:添加用户 useradd abc,默认添加一个abc组 vipw:查看系统中用户 groupadd:添加组groupadd ccna vigr:查看系统中的组 gpasswd:将用户abc添加到ccna组 gpasswd -a abc ccna groups abc:查看用户abc属