在Linux 安装JDK和Tomcat 很简单,简要介绍如下:
首先去下载软件,地址分别是
http://java.sun.com/javase/downloads/index.jsp
和
注意选择自己需要的合适的版本,比如我下载的是apache-tomcat-5.5.23.tar.gz和jdk-6u18-linux-x64-rpm.bin.gz,然后上传到/tmp目录下。
安装JDK:
[root@tomcat1 tmp]# sh jdk-6u18-linux-x64-rpm.bin
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
......
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
Extracting...
......
Press Enter [...]
用root用户登录,首先清除原来的snap信息:
p5a1@/#snap -r
The following directories and files will be deleted:
-----------------------------------------------------------
/tmp/ibmsupt/general (directory)
/tmp/ibmsupt/other (directory)
/tmp/ibmsupt/testcase (directory)
/tmp/ibmsupt/ssa (directory)
/tmp/ibmsupt/pcixscsi (directory)
/tmp/ibmsupt/snap.pax.Z (file)
Do you want me to remove these directories (y/n)? y
Removing... done.
如果以前未做过snap,会提示:
nothing to clean up
清理完成后可以开始收集:
p5a1@/#snap -gbLc
/var/adm/ras/trcfile: No [...]
RedHat和CentOS都自带了一个gssftp服务,使用方式如下:
[root@linux local]# cd /etc/xinetd.d
[root@linux xinetd.d]# ls
chargen cups-lpd daytime-udp echo-udp gssftp krb5-telnet rsync time-udp
chargen-udp daytime echo eklogin klogin kshell time
编辑gssftp文件,将server_args改为-l,将disable改为no:
[root@linux xinetd.d]# vi gssftp
# default: off
# description: The kerberized FTP server accepts FTP connections \
# that can be authenticated with Kerberos 5.
[...]
有时候我们需要记录Linux用户的操作记录用于审计,因此就要避免用户可以自行清除操作日志,一个简单的方式是使用script功能。
首先在用户的profile文件中开启记录功能:
[banping@linux ~]$ cd /home/banping/
[banping@linux ~]$ vi .bash_profile
# write log
exec /usr/bin/script -a -f -q /tmp/test/script-`date +%Y%m%d%k%M`.lst
这行脚本的意思是在/tmp/test目录下以时间为文件名来记录操作信息,由于是写在了.bash_profile文件中,用户登入到Linux系统的时候就会触发执行。
然后我们在/tmp下建立test目录存放操作日志信息即可:
[banping@linux tmp]# mkdir test
这样就实现了记录的功能,而要防止用户自行修改,我们可以设置这些文件只能被附加,不能被修改或删除:
[root@linux banping]# chattr +a .bash_profile
[root@linux tmp]# chattr +a -R test
这样登录用户就无法修改这些信息了,以下是一个简单的测试:
[root@tomcat tmp]# cd test
[root@tomcat test]# touch 1.txt
[root@tomcat test]# rm [...]
Linux的网络相关配置记录在了很多文件中,记录一下。
查看网卡是否被内核识别:
[root@linux ~]# dmesg|grep -in eth
150:divert: not allocating divert_blk for non-ethernet device lo
239:divert: allocating divert_blk for eth0
240:e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
366:divert: not allocating divert_blk for non-ethernet device sit0
389:ADDRCONF(NETDEV_UP): eth0: link is not ready
390:e1000: eth0: e1000_watchdog_task: NIC Link is Up 1000 [...]
技术组织
最近评论
- passenger 发表在《一个完整的Oracle建表的例子》
- tudou 发表在《Oracle增大redo log file的方法》
- Yousri 发表在《如何在mac下长期使用SecureCRT》
- Amazon SES筆記 « What's Going On 发表在《如何使用Amazon的邮件服务SES》
- 如何使用Amazon的邮件服务SES | 半瓶 发表在《为Postfix增加DKIM功能》
- pary 发表在《为Postfix增加DKIM功能》
历史归档
广告位

