|
1.查看连接端口状态 注:linux服务器ip为192.168.5.128 [root@instructor network-scripts]# netstat -an |grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 52 192.168.5.128:22 192.168.5.254:58254 ESTABLISHED
tcp 0 0 :::22 :::* LISTEN
unix 2 [ ACC ] STREAM LISTENING 18782 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 2 [ ACC ] STREAM LISTENING 20640 /root/.pulse/dd227498d29cadc3fc3f83030000004e-runtime/native
unix 3 [ ] STREAM CONNECTED 49167 /root/.pulse/dd227498d29cadc3fc3f83030000004e-runtime/native
unix 3 [ ] STREAM CONNECTED 21677 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 21630 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 21622
unix 3 [ ] STREAM CONNECTED 21621 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 21620 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 21083 /root/.pulse/dd227498d29cadc3fc3f83030000004e-runtime/native
unix 3 [ ] STREAM CONNECTED 21075 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 21022
unix 3 [ ] STREAM CONNECTED 20913 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20885 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20883 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20729 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAMCONNECTED 20722 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 21082 /root/.pulse/dd227498d29cadc3fc3f83030000004e-runtime/native
unix 3 [ ] STREAM CONNECTED 20622
unix 3 [ ] STREAM CONNECTED 20613 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20579 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20483 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20423 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 20422
unix 3 [ ] STREAM CONNECTED 19664 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 19593 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 19404 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 19267 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 19237 /tmp/orbit-root/linc-89b-0-5f37917f49f22
unix 3 [ ] STREAM CONNECTED 19016 /tmp/orbit-root/linc-89b-0-5f37917f49f22 ---------------------------------------------------------- 2.samba服务 [root@instructor /]# cd /var/ftp/pub/rhel6/Packages/
[root@instructor Packages]# rpm -ivh samba-
samba-3.5.4-68.el6.x86_64.rpm samba-winbind-3.5.4-68.el6.x86_64.rpm
samba-client-3.5.4-68.el6.x86_64.rpm samba-winbind-clients-3.5.4-68.el6.i686.rpm
samba-common-3.5.4-68.el6.i686.rpm samba-winbind-clients-3.5.4-68.el6.x86_64.rpm
samba-common-3.5.4-68.el6.x86_64.rpm
[root@instructor Packages]# rpm -ivh samba-common-3.5.4-68.el6.x86_64.rpm
warning: samba-common-3.5.4-68.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba-common ########################################### [100%]
[root@instructor Packages]# rpm -ivh samba-3.5.4-68.el6.x86_64.rpm
warning: samba-3.5.4-68.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba ########################################### [100%]
[root@instructor Packages]# rpm -ivh samba-client-3.5.4-68.el6.x86_64.rpm
warning: samba-client-3.5.4-68.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba-client ########################################### [100%]
[root@instructor Packages]# cd /var
[root@instructor var]# ls
account crash empty games lib lock mail opt report spool www
cache db ftp gdm local log nis preserve run tmp yp [root@instructor var]# mkdir samba
[root@instructor var]# chmod 777 samba
[root@instructor var]# ll -a
total 96
drwxrwxrwx. 2 root root 4096 Oct 20 20:13 samba
drwxr-xr-x. 14 root root 4096 Oct 20 20:09 spool
drwxrwxrwt. 2 root root 4096 Oct 20 20:09 tmp
drwxr-xr-x. 6 root root 4096 Aug 20 08:08 www
drwxr-xr-x. 2 root root 4096 Dec 4 2009 yp [root@instructor var]# cd /etc/samba
[root@instructor samba]# ls
lmhosts smb.conf smbusers
[root@instructor samba]# vi smb.conf #先键入 /security,该用户 # ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration. security = user
passdb backend = tdbsam
#------------------------------------------------------------ 将security = user改为security = share #再键入SHift+G 至末行 #insert 模式下键入 #-------------my samba File
comment=samba
path=/var/samba
public=yes
read only=no
-- INSERT -- #保存退出 "smb.conf" 295L, 9863C written
[root@instructor samba]# service smb restart
Shutting down SMB services: [ OK ]
Starting SMB services: [ OK ]
[root@instructor samba]# service iptables stop #在图形界面 [root@instructor ~]# setup #关闭防火墙
Firewall 关闭,选【OK】 选【YES】 --------------------------------------------------------------------------------------------------- 3.linux 安装jdk(环境变量) [root@instructor Share]# cd /var/Share/ [root@instructor Share]# chmod 777 /var/Share [root@instructor Share]# chmod 777 * [root@instructor Share]# ./jdk-6u27-linux-x64.bin [root@instructor Share]# ls
jdk1.6.0_27 jdk-6u27-linux-x64.bin [root@instructor Share]# vi /etc/profile #键入SHift+G,大小写注意,export必须小写 export JAVA_HOME=/var/Share/jdk1.6.0_27
export PATH=$JAVA_HOME/bin:.:$PATH
export CLASSPATH=$JAVA_HOME/lib:. ~
"/etc/profile" 77L, 1574C written
[root@instructor jdk1.6.0_27]# source /etc/profile [root@instructor javacord]# touch hello.java
[root@instructor javacord]# vi hello.java public void main()
public class hello
{ public static void main(String args[])
{
System.out.println("Hello!"); } } "hello.java" 10L, 115C written
[root@instructor javacord]# javac -d . hello.java
[root@instructor javacord]# java hello
Hello! ----------------------------------------------------------------- 4.安装tomcat [root@instructor Share]# ls
apache-tomcat-6.0.14 javacord jdk-6u27-linux-x64.bin linux.x64_11gR2_database_2of2.zip
apache-tomcat-6.0.14.zip jdk1.6.0_27 linux.x64_11gR2_database_1of2.zip
[root@instructor Share]# unzip apache-tomcat-6.0.14.zip
[root@instructor bin]# chmod 777 /var/Share/apache-tomcat-6.0.14/bin/*
[root@instructor bin]# ./startup.sh #以上source /etc/profile JRE_HOME生效 Using CATALINA_BASE: /var/Share/apache-tomcat-6.0.14
Using CATALINA_HOME: /var/Share/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /var/Share/apache-tomcat-6.0.14/temp
Using JRE_HOME: /var/Share/jdk1.6.0_27 #iexplore 访问 http://192.168.5.128:8080/ [root@instructor bin]# ./shutdown.sh
Using CATALINA_BASE: /var/Share/apache-tomcat-6.0.14
Using CATALINA_HOME: /var/Share/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /var/Share/apache-tomcat-6.0.14/temp
Using JRE_HOME: /var/Share/jdk1.6.0_27
[root@instructor bin]# [root@instructor Share]# cd /var/Share/apache-tomcat-6.0.14/webapps/
[root@instructor webapps]# ls
docs examples host-manager manager ROOT
[root@instructor webapps]# cd ROOT/
[root@instructor ROOT]# ls
admin build.xml index.html RELEASE-NOTES.txt tomcat-power.gif WEB-INF
asf-logo-wide.gif favicon.ico index.jsp tomcat.gif tomcat.svg
[root@instructor ROOT]# touch 1.jsp
[root@instructor ROOT]# vi 1.jsp "1.jsp" 6L, 45C written
[root@instructor ROOT]# [root@instructor ROOT]# cd ..
[root@instructor webapps]# cd ..
[root@instructor apache-tomcat-6.0.14]# cd bin
[root@instructor bin]# ./startup.sh
Using CATALINA_BASE: /var/Share/apache-tomcat-6.0.14
Using CATALINA_HOME: /var/Share/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /var/Share/apache-tomcat-6.0.14/temp
Using JRE_HOME: /var/Share/jdk1.6.0_27 #iexplore 访问http://192.168.5.128:8080/1.jsp ----------------------------------------------------------------- 5.oracle11g #---------------oralce 11g 在redhat6 详细安装,请查看 http://cswggod.blog.运维网.com/4569505/1050040 root@instructor bin]# groupadd dba
[root@instructor bin]# groupadd oinstall
[root@instructor bin]# useradd -d /home/oracle -m -g oinstall -G dba oracle ##oracle:oinstall owner user:owner group
[root@instructor bin]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@instructor bin]# mkdir -p /app/oracle/product/11.2.0/dbhome_1 [oracle@instructor Share]$ ls
apache-tomcat-6.0.14 jdk1.6.0_27 linux.x64_11gR2_database_1of2.zip
apache-tomcat-6.0.14.zip javacord jdk-6u27-linux-x64.bin linux.x64_11gR2_database_2of2.zip
[oracle@instructor Share]$ unzip linux.x64_11gR2_database_1of2.zip [oracle@instructor Share]$ unzip linux.x64_11gR2_database_2of2.zip [oracle@instructor database]$ chmod 777 *
[oracle@instructor database]$ ./runInstaller
|
|
|