1. 程式人生 > >在linux下安裝配置Net-Snmp

在linux下安裝配置Net-Snmp

一、安裝 

系  統:CentOS 6.2(與RedHat Enterprise Linux 6.2操作一樣)

[[email protected]]#tar -zxvf net-snmp-5.3.3.tar.gz

[[email protected]]#cd net-snmp-5.3.3

[[email protected]]#./configure

接下來會讓你選擇一些配置。

************************************Configuration Section ************************************

       You are about to be prompted with aseries of questions.  Answerthemcarefully, as they determine how the SNMP agent and relatedapplicationsare to function.

       After the configure script finishes, youcan browse the newlycreatedconfig.h file for further - less important - parameters tomodify.  Be careful if you re-run configure though,since config.h willbeoverwritten.

-Press return to continue-

//選擇snmp協議版本,預設第3版

Defaultversion of SNMP to use (3):3 

//系統聯絡資訊

SystemContact Information ([email protected]):ZXSH

//系統位置

SystemLocation (Unknown): China

//日誌位置

Locationto write logfile (/var/log/snmpd.log): /var/log/snmpd.log 

//永續性儲存位置

Locationto write persistent information (/var/net-snmp): /var/net-snmp

配置完成後會出現:

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

            Net-SNMP configuration summary:

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

  SNMP Versions Supported:    1 2c 3

  Net-SNMP Version:           5.3.3

  Building for:               linux

  Network transport support:  Callback Unix TCP UDP

  SNMPv3 Security Modules:    usm

  Agent MIB code:             mibII ucd_snmp snmpv3mibsnotification notification-log-mib target agent_mibs agentx disman/event-mibdisman/schedule utilities host ap2_snmp

  SNMP Perl modules:          disabled

  Embedded perl support:      disabled

  Authentication support:     MD5

  Encryption support:        

  WARNING: New version of the Event MIB which may be subtly different from theoriginal implementation - configure with 'disman/old-event-mib' for theprevious version

編譯安裝。

[[email protected]]#make

[[email protected]]#make install

可以用make test檢測是否安裝成功。

OK,現在Net-Snmp已經成功安裝上了。

二、配置

1. 查詢snmpd.conf位置

[[email protected]]# net-snmp-config --snmpconfpath

/usr/local/etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/root/.snmp:/var/net-snmp

現在檢視snmpd.conf是否在上面的任意一個目錄下,如果沒有,下接第二步,如果有跳到第三步。

2. 複製snmpd.conf到指定位置

//建立存放snmpd.conf的目錄

[[email protected]]# mkdir /usr/local/etc/snmp 

// EXAMPLE.conf是原始碼目錄下的snmpd.conf模版,複製

[[email protected]]# cp EXAMPLE.conf /usr/local/etc/snmp 

[[email protected]]#cd /usr/local/etc/snmp

//重新命名EXAMPLE.conf 為snmpd.conf

[[email protected]]# mv EXAMPLE.conf snmpd.conf

 3. 編輯snmpd.conf

[[email protected]]#vi snmpd.conf

com2seclocal      localhost   COMMUNITY

com2secmynetworkNETWORK/24   COMMUNITY

改為:

com2seclocal     localhost       public

com2secmynetwork 192.168.126.129 public

//public可以改成你自己喜歡的,不過以後訪問時要記住

儲存退出。

net-snmp-5.3.3.tar.gz下的EXAMPLE.conf只用改這麼一個地方就行了,附錄中我會附上snmpd.conf 。

三、測試

1.啟動snmpd服務

[[email protected]]#snmpd

如果snmpd.conf沒有在snmp-net預設的存放配置目錄下的任何一個目錄,可以用下面命令:

[[email protected]]#snmpd –c /usr/local/etc/snmp/snmpd.conf

2.用snmpwalk測試

snmpwalk-v 1 -c *** localhost system

snmpwalk-v 1 -c *** 192.168.128.129 system

其中***為在配置中你設定的字串,我的如下:

[[email protected]]#snmpwalk -v 1 -c public localhostsystem

SNMPv2-MIB::sysDescr.0= STRING: Linux ZXSH 2.6.32-220.el6.i686 #1 SMP Tue Dec 6 16:15:40 GMT 2011i686

SNMPv2-MIB::sysObjectID.0= OID: NET-SNMP-MIB::netSnmpAgentOIDs.10

DISMAN-EVENT-MIB::sysUpTimeInstance= Timeticks: (18151) 0:03:01.51

SNMPv2-MIB::sysContact.0= STRING: Me <[email protected]>

SNMPv2-MIB::sysName.0= STRING: ZXSH

SNMPv2-MIB::sysLocation.0= STRING: Right here, right now.

.

.

.

SNMPv2-MIB::sysORUpTime.6= Timeticks: (4) 0:00:00.04

SNMPv2-MIB::sysORUpTime.7= Timeticks: (4) 0:00:00.04

SNMPv2-MIB::sysORUpTime.8= Timeticks: (4) 0:00:00.04

[[email protected]]#snmpwalk -v 1 -c public192.168.128.129 system

和上面一樣的結果...

四、注意事項

1、重啟snmp服務

修改snmpd.conf後,需要重啟該服務,步驟如下:

//查詢程序snmpd的pid

[[email protected]]#ps -A

//殺掉該程序

[[email protected]]#kill -9 pid

//啟動服務

[[email protected]]#snmpd –c /usr/local/etc/snmp/snmpd.conf

如果每次都這樣是不是太麻煩拉,那就寫個指令碼來完成吧

[[email protected]]# touch ServiceSnmpd.sh

[[email protected]]# chmod 755 ServiceSnmpd.sh

[[email protected]]# vi ./ServiceSnmpd.sh

內容如下:

#!/bin/sh
#kill snmpd pid
pidlist=`ps -ef|grep snmpd | grep -v "grep"|awk '{print $2}'`
echo "snmpd Id list :$pidlist"
if [ "$pidlist" = "" ]
then
  echo "no snmpd pid alive"
else
  for pid in ${pidlist}
 {
   kill -9 $pid
 echo "KILL $pid:"
 echo "service stop success"
  }
fi
#start snmpd
echo "loading snmpd.conf"
snmpd -c /usr/local/etc/snmp/snmpd.conf
echo "start snmpd service complete"


 
儲存退出。將ServiceSnmpd.sh路徑新增到環境變數下,就可以在shell中直接執行ServiceSnmpd.sh來重啟服務了。

 五、附錄

snmpd.conf內容如下:

###############################################################################
#
# EXAMPLE.conf:
#   An example configuration file for configuring the ucd-snmp snmpd agent.
#
###############################################################################
#
# This file is intended to only be an example.  If, however, you want
# to use it, it should be placed in /usr/local/etc/snmp/snmpd.conf.
# When the snmpd agent starts up, this is where it will look for it.
#
# You might be interested in generating your own snmpd.conf file using
# the "snmpconf" program (perl script) instead.  It's a nice menu
# based interface to writing well commented configuration files.  Try it!
#
# Note: This file is automatically generated from EXAMPLE.conf.def.
# Do NOT read the EXAMPLE.conf.def file! Instead, after you have run
# configure & make, and then make sure you read the EXAMPLE.conf file
# instead, as it will tailor itself to your configuration.

# All lines beginning with a '#' are comments and are intended for you
# to read.  All other lines are configuration commands for the agent.

#
# PLEASE: read the snmpd.conf(5) manual page as well!
#


###############################################################################
# Access Control
###############################################################################

# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE.  YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

# By far, the most common question I get about the agent is "why won't
# it work?", when really it should be "how do I configure the agent to
# allow me to access it?"
#
# By default, the agent responds to the "public" community for read
# only access, if run out of the box without any configuration file in 
# place.  The following examples show you other ways of configuring
# the agent so that you can change the community names, and give
# yourself write access as well.
#
# The following lines change the access permissions of the agent so
# that the COMMUNITY string provides read-only access to your entire
# NETWORK (EG: 10.10.10.0/24), and read/write access to only the
# localhost (127.0.0.1, not its real ipaddress).
#
# For more information, read the FAQ as well as the snmpd.conf(5)
# manual page.

####
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):

#       sec.name  source          community
com2sec local     localhost       public
com2sec mynetwork 192.168.126.129      public

####
# Second, map the security names into group names:

#             	sec.model  sec.name
group MyRWGroup	v1         local
group MyRWGroup	v2c        local
group MyRWGroup	usm        local
group MyROGroup v1         mynetwork
group MyROGroup v2c        mynetwork
group MyROGroup usm        mynetwork

####
# Third, create a view for us to let the groups have rights to:

#           incl/excl subtree                          mask
view all    included  .1                               80

####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:

#                context sec.model sec.level match  read   write  notif
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none

# -----------------------------------------------------------------------------


###############################################################################
# System contact information
#

# It is also possible to set the sysContact and sysLocation system
# variables through the snmpd.conf file.  **PLEASE NOTE** that setting
# the value of these objects here makes these objects READ-ONLY
# (regardless of any access control settings).  Any attempt to set the
# value of an object whose value is given here will fail with an error
# status of notWritable.

syslocation Right here, right now.
syscontact Me <[email protected]>

# Example output of snmpwalk:
#   % snmpwalk -v 1 -c public localhost system
#   system.sysDescr.0 = "SunOS name sun4c"
#   system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
#   system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
#   system.sysContact.0 = "Me <[email protected]>"
#   system.sysName.0 = "name"
#   system.sysLocation.0 = "Right here, right now."
#   system.sysServices.0 = 72


# -----------------------------------------------------------------------------


###############################################################################
# Process checks.
#
#  The following are examples of how to use the agent to check for
#  processes running on the host.  The syntax looks something like:
#
#  proc NAME [MAX=0] [MIN=0]
#
#  NAME:  the name of the process to check for.  It must match
#         exactly (ie, http will not find httpd processes).
#  MAX:   the maximum number allowed to be running.  Defaults to 0.
#  MIN:   the minimum number to be running.  Defaults to 0.

#
#  Examples:
#

#  Make sure mountd is running
proc mountd

#  Make sure there are no more than 4 ntalkds running, but 0 is ok too.
proc ntalkd 4

#  Make sure at least one sendmail, but less than or equal to 10 are running.
proc sendmail 10 1

#  A snmpwalk of the prTable would look something like this:
# 
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.2
# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
#
#  Note that the errorFlag for mountd is set to 1 because one is not
#  running (in this case an rpc.mountd is, but thats not good enough),
#  and the ErrMessage tells you what's wrong.  The configuration
#  imposed in the snmpd.conf file is also shown.  
# 
#  Special Case:  When the min and max numbers are both 0, it assumes
#  you want a max of infinity and a min of 1.
#


# -----------------------------------------------------------------------------


###############################################################################
# Executables/scripts
#

#
#  You can also have programs run by the agent that return a single
#  line of output and an exit code.  Here are two examples.
#
#  exec NAME PROGRAM [ARGS ...]
#
#  NAME:     A generic name.
#  PROGRAM:  The program to run.  Include the path!
#  ARGS:     optional arguments to be passed to the program

# a simple hello world
exec echotest /bin/echo hello world

# Run a shell script containing:
#
# #!/bin/sh
# echo hello world
# echo hi there
# exit 35
#
# Note:  this has been specifically commented out to prevent
# accidental security holes due to someone else on your system writing
# a /tmp/shtest before you do.  Uncomment to use it.
#
#exec shelltest /bin/sh /tmp/shtest

# Then, 
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.8
# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world"
# enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest"
# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0

# Note that the second line of the /tmp/shtest shell script is cut
# off.  Also note that the exit status of 35 was returned.

# -----------------------------------------------------------------------------


###############################################################################
# disk checks
#

# The agent can check the amount of available disk space, and make
# sure it is above a set limit.  

# disk PATH [MIN=DEFDISKMINIMUMSPACE]
#
# PATH:  mount path to the disk in question.
# MIN:   Disks with space below this value will have the Mib's errorFlag set.
#        Default value = DEFDISKMINIMUMSPACE.

# Check the / partition and make sure it contains at least 10 megs.

disk / 10000

# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F 
# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""

# -----------------------------------------------------------------------------


###############################################################################
# load average checks
#

# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
#
# 1MAX:   If the 1 minute load average is above this limit at query
#         time, the errorFlag will be set.
# 5MAX:   Similar, but for 5 min average.
# 15MAX:  Similar, but for 15 min average.

# Check for loads:
load 12 14 14

# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.10
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39 
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31 
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36 
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""

# -----------------------------------------------------------------------------


###############################################################################
# Extensible sections.
# 

# This alleviates the multiple line output problem found in the
# previous executable mib by placing each mib in its own mib table:

# Run a shell script containing:
#
# #!/bin/sh
# echo hello world
# echo hi there
# exit 35
#
# Note:  this has been specifically commented out to prevent
# accidental security holes due to someone else on your system writing
# a /tmp/shtest before you do.  Uncomment to use it.
#
# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest

# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.50
# enterprises.ucdavis.50.1.1 = 1
# enterprises.ucdavis.50.2.1 = "shelltest"
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
# enterprises.ucdavis.50.100.1 = 35
# enterprises.ucdavis.50.101.1 = "hello world."
# enterprises.ucdavis.50.101.2 = "hi there."
# enterprises.ucdavis.50.102.1 = 0

# Now the Output has grown to two lines, and we can see the 'hi
# there.' output as the second line from our shell script.
#
# Note that you must alter the mib.txt file to be correct if you want
# the .50.* outputs above to change to reasonable text descriptions.

# Other ideas:
# 
# exec .1.3.6.1.4.1.2021.51 ps /bin/ps 
# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq

# -----------------------------------------------------------------------------


###############################################################################
# Pass through control.
# 

# Usage:
#   pass MIBOID EXEC-COMMAND
#
# This will pass total control of the mib underneath the MIBOID
# portion of the mib to the EXEC-COMMAND.  
#
# Note:  You'll have to change the path of the passtest script to your
# source directory or install it in the given location.
# 
# Example:  (see the script for details)
#           (commented out here since it requires that you place the
#           script in the right location. (its not installed by default))

# pass .1.3.6.1.4.1.2021.255 /bin/sh PREFIX/local/passtest

# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.255
# enterprises.ucdavis.255.1 = "life the universe and everything"
# enterprises.ucdavis.255.2.1 = 42
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
# enterprises.ucdavis.255.5 = 42
# enterprises.ucdavis.255.6 = Gauge: 42
#
# % snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.255.5
# enterprises.ucdavis.255.5 = 42
#
# % snmpset -v 1 -c public localhost .1.3.6.1.4.1.2021.255.1 s "New string"
# enterprises.ucdavis.255.1 = "New string"
#

# For specific usage information, see the man/snmpd.conf.5 manual page
# as well as the local/passtest script used in the above example.

###############################################################################
# Subagent control
#

# The agent can support subagents using a number of extension mechanisms.
# From the 4.2.1 release, AgentX support is being compiled in by default.
# To use this mechanism, simply uncomment the following directive.
#
#  master  agentx
#
#   Please see the file README.agentx for more details.
#


###############################################################################
# Further Information
#
#  See the snmpd.conf manual page, and the output of "snmpd -H".
#  MUCH more can be done with the snmpd.conf than is shown as an
#  example here.

相關推薦

linux安裝配置Net-Snmp

一、安裝  系  統:CentOS 6.2(與RedHat Enterprise Linux 6.2操作一樣) [[email protected]]#tar -zxvf net-snmp-5.3.3.tar.gz [[email protecte

Linux安裝配置SNMP服務

ip地址 .com 設備節點 1.4.1 linux下 檢查 linu sof href 一、安裝snmp服務 1、檢查系統是否已經安裝snmp的rpm包 以下是安裝snmp服務需要的rpm包: libsensors3-2.10.6-55.el5.i386.rpm

Java學習筆記——Linux安裝配置MySQL

code names 刪掉 set 影響 per install nod 設置 山重水復疑無路,柳暗花明又一村               ——遊山西村 系統:Ubuntu 16.04LTS 1\官網下載mysql-5.7.18-linux-glibc2.5-x86

Linux安裝配置DNS

linux dns yum install -y bind (安裝DNS服務)vim /etc/named.conf (編輯DNS配置文件,添加一個zone,如下) zone "123.com" IN { type master; fil

Linux安裝配置Jenkins

linux安裝Jenkins前面簡單介紹了下CentOS7下安裝配置nuxus和CentOS7下防火墻的配置,今天繼續介紹CentOS7下jenkins的安裝配置。下載 我在安裝配置時,用的是jenkins的rpm包,下載地址如下: https://jenkins.io/

Linux安裝配置LIDS系統

LIDSLIDS全稱為Linux Intrusion Detection System,是一種基於Linux內核補丁模式的入侵檢測系統,它也是一種基於主機的入侵檢測系統。它集成在Linux內核中,來進一步加強Linux內核的安全性,為Linux內核提供實現一種安全模式、參考模式和強制存取控制模式。雖然,網絡防

linux安裝配置jdk(解壓版)

生效 測試 linu 文件 info img url www 技術 在linux下登錄oracle官網,下載解壓版jdk 傳送門 系統默認下載到“下載”目錄中 創建要將該文件解壓的文件夾: 其中 -p 參數代表遞歸創建文件夾(可以創建多級目錄) 進

Linux安裝配置JDK

exp lin tar.gz spa www. bin jdk1.8 VM mod 一.下載JDK到甲骨文官網下載JDK(www.oracle.com) 二.解壓安裝在/usr下新建目錄/java1.cd /usr2.sudo mkdir java通過cd命令進入到下載的J

linux安裝配置nginx

nginx這裏以nginx-1.13.12版本為例子 1、首先去官網下載nginx-1.13.12.tar.gz安裝包並上傳到linux服務器並解壓縮安裝包 tar -zxvf nginx-1.13.12.tar.gz 2、在安裝ngxin之前我們首先要保證linux的防火墻是關閉狀態 systemct

Linux安裝配置 http ,修改本機中http伺服器主頁,自定義顯示內容。

HTTP(Hyper Text Transfer Protocol) 超文字傳輸協議,位於osi模型中的應用層。               安裝:可以使用yum等多種方式安裝,最方便的自然是yum安裝(Redhat需

Linux安裝配置JDK和Tomcat操作步驟

下面以JDK7和Tomcat7為例,介紹CentOS7.5下安裝配置JDK和Tomcat的操作步驟。 1、安裝JDK 1.1、檢視yum庫中都有哪些jdk版本 yum search java|grep jdk1.2、選擇指定的版本安裝 yum install java-1.7.0-openj

Centons7安裝配置Flume、Linux安裝配置Flume、Flume的簡單使用示例、Flume整合Kafka使用

本篇文章主要介紹在windows下使用vmware虛擬機器中的Linux(Centons7)下配置安裝Flume。 目前Flume 的最新版本為1.8,筆者安裝的是1.6,是Flume的一個經典版本,通常在生產環境中使用的就是這個版本,在安裝Flume前,看先它的前置條件  (1)

linux安裝配置rabbitMQ

1.安裝Erlang 由於RabbitMQ依賴Erlang, 所以需要先安裝Erlang Erlang的安裝方式大概有兩種: 1.從Erlang Solution安裝(推薦) # 新增erlang solutions源 $ wget https://packages.erlang-solutions

Centons7安裝配置Kafka、Linux安裝配置Kafka

本篇文章主要介紹在windows下使用vmware虛擬機器中的Linux(Centons7)下配置安裝Kafka。 簡要步驟: ①、下載Kafka解壓包 ②、解壓Kafka ③、修改配置檔案 ④、啟動Kafka ⑤、建立topic   詳細步驟:

linux安裝配置redis服務

linux下安裝配置redis服務 2016年03月25日 15:39:31 coding_everyday 閱讀數:3530更多 個人分類: redis          最近專案需要用到r

linux安裝配置nginx(tomcat)

一,安裝nginx 有問題一步步來 nginx下載地址: http://nginx.org/en/download.html 把下載好的nginx版本放到/usr/local中 1.1 解壓 [[email protected] ~]# cd /usr

linux安裝配置mysql

首先檢查自己的linux系統是32位還是64位,到官網下載相應版本的mysql, 並將.tar.gz壓縮包傳到/usr 目錄下 不會傳的同學, 看一下另一篇講解怎麼從windows給linux傳檔案: 傳完不在/usr資料夾,百度一下搜尋指令,和移動檔案指令, 放到/

linux安裝配置tomcat

先確定自己的linux是32位還是64位, 下載相應版本的tomcat壓縮包並傳輸到linux系統上,  不會從winsdows傳檔案到linux的參考另一部落格: TOMCAT需要JDK環境, 沒裝的參考裝JDK教程: 這篇部落格從把壓縮包放在/usr/loc

linux安裝配置mongodb

一:下載 下載地址: 二:安裝 2.1 解壓 [[email protected] download]# ls -ltr total 71552 -rw-r--r-- 1 root root 32979820 Jun 15 10:01 mysql-5.6.2

新手學Linux(四)----Linux安裝配置MongoDB資料庫

    最近在學習研究linux,今天就教教大家怎麼在linux上安裝配置MongoDB資料庫 一、安裝步驟     1、下載及解壓     下載完成後用WinSCP複製到/us