nfs4-acl-tools-0.3.3-5.el6.x86_64.rpm
nfs-utils-1.2.2-7.el6.x86_64.rpm
nfs-utils-lib-1.1.5-1.el6.i686.rpm
nfs-utils-lib-1.1.5-1.el6.x86_64.rpm
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@instructor Packages]# chkconfig nfs on
[root@instructor Packages]# chkconfig --list nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@instructor Packages]# chkconfig --level 5 nfs off
[root@instructor Packages]# chkconfig --list nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:off 6:off
[root@instructor Packages]# chkconfig --level 5 nfs on
[root@instructor Packages]# chkconfig --list nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@instructor Packages]#
rpcbind-0.2.0-8.el6.x86_64.rpm
[root@instructor Packages]# rpm -ivh rpcbind-0.2.0-8.el6.x86_64.rpm
warning: rpcbind-0.2.0-8.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
package rpcbind-0.2.0-8.el6.x86_64 is already installed
[root@instructor Packages]# find portreserve
find: `portreserve': No such file or directory
[root@instructor Packages]# find portreserve*
portreserve-0.0.4-4.el6.x86_64.rpm
[root@instructor Packages]# rpm -ivh portreserve-0.0.4-4.el6.x86_64.rpm
warning: portreserve-0.0.4-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:portreserve ########################################### [100%]
正在启动 portreserve:
[root@h1 ~]# service portreserve status
portreserve (pid 1391) 正在运行...
[root@h1 ~]#
[root@h1 /]# mkdir /var/share
[root@h1 /]# cd /var/share
[root@h1 share]# vi 1.txt
"1.txt" [New] 1L, 13C written
[root@h1 share]# vi /etc/exports
"/etc/exports" 1L, 23C written
[root@h1 share]# service nfs restart
关闭 NFS 守护进程:[确定]
关闭 NFS mountd:[确定]
关闭 NFS quotas:[确定]
关闭 NFS 服务: [确定]
启动 NFS 服务: [确定]
关掉 NFS 配额:[确定]
启动 NFS mountd:[确定]
正在启动 RPC idmapd:[确定]
正在启动 RPC idmapd:[确定]
启动 NFS 守护进程:[确定]
[root@h1 share]#
[root@h1 ~]# export lang=""
[root@h1 ~]# setup
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled#enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
~
[root@h1 var]# service portreserve start
正在启动 portreserve:
[root@h1 var]#
Export list for 192.168.8.100:
/user1 *
[root@h1 ~]# mkdir /var/mount/100
mkdir: 无法创建目录"/var/mount/100": 没有那个文件或目录
[root@h1 ~]# mkdir -p /var/mount/100
[root@h1 ~]# mount 192.168.8.100:/user1 /var/mount/100
[root@h1 ~]# cd /var/mount/100
[root@h1 100]# ls
000.txt 123.txt 222.txt
[root@h1 100]# touch 192.168.8.20.txt
[root@h1 100]# vi 192.168.8.20.txt
Hello!
[root@h1 100]# ls
000.txt 123.txt 192.168.8.20.txt 222.txt
[root@h1 100]# ll -a
总用量 24
drwxrwxrwx 4 root root 4096 11月 11 2012 .
drwxr-xr-x 3 root root 4096 11月 11 11:41 ..
drwxr-xr-x 2 nfsnobody nfsnobody 4096 11月 11 2012 000.txt
-rw-r--r-- 1 nfsnobody nfsnobody 7 11月 11 2012 123.txt
-rw-r--r-- 1 nfsnobody nfsnobody 8 11月 11 2012 192.168.8.20.txt
drwxr-xr-x 2 nfsnobody nfsnobody 4096 11月 11 2012 222.txt
[root@h1 100]#chmod 777 /var/share
Last login: Sat Nov 10 20:30:50 2012 from 192.168.5.222
[root@instructor ~]# showmount -e 192.168.5.130 Export list for 192.168.5.130: /var/share * [root@instructor mount]# umount /var/mount/130
[root@instructor mount]# rmdir 130 [root@instructor mount]# mkdir -p /var/mount/130 [root@instructor mount]# mount 192.168.5.130:/var/share /var/mount/130/ [root@instructor mount]# cd 130 [root@instructor 130]# ls 1.txt [root@instructor 130]# cp 1.txt 2.txt [root@instructor 130]# [root@instructor mount]# umount /var/mount/130 |
为 vsftpd 启动 vsftpd:[确定]
#root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
~
[root@h1 /]#
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
#root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
~
"/etc/vsftpd/user_list" 20L, 362C written
[root@h1 /]#
C:\Users\陈\Desktop>ftp 192.168.5.130
连接到 192.168.5.130。 220 (vsFTPd 2.2.2) 用户(192.168.5.130:(none)): root 331 Please specify the password. 密码: 230 Login successful. ftp> dir 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. -rw------- 1 0 0 1726 Oct 19 22:39 anaconda-ks.cfg -rw-r--r-- 1 0 0 48953 Oct 19 22:39 install.log -rw-r--r-- 1 0 0 12572 Oct 19 22:38 install.log.syslog drwxr-xr-x 2 0 0 4096 Oct 19 22:45 涓嬭浇 drwxr-xr-x 2 0 0 4096 Oct 19 22:45 鍏叡鐨? drwxr-xr-x 2 0 0 4096 Oct 19 22:45 鍥剧墖 drwxr-xr-x 2 0 0 4096 Oct 19 22:45 鏂囨。 drwxr-xr-x 2 0 0 4096 Oct 19 22:45 妗岄潰 drwxr-xr-x 2 0 0 4096 Oct 19 22:45 妯℃澘 drwxr-xr-x 2 0 0 4096 Oct 19 22:45 瑙嗛 drwxr-xr-x 2 0 0 4096 Oct 19 22:45 闊充箰 226 Directory send OK. ftp: 收到 733 字节,用时 0.02秒 45.81千字节/秒。 ftp> cd /var/ftp/pub/ 250 Directory successfully changed. ftp> put temp/txt temp/txt: ftp> ftp> put temp.txt 200 PORT command successful. Consider using PASV. 150 Ok to send data. 226 Transfer complete. ftp: 发送 1030 字节,用时 0.00秒 1030000.00千字节/秒。 |
26 # obviously need to create a directory writable by the FTP user.
27 anon_upload_enable=YES
28 #
29 # Uncomment this if you want the anonymous FTP user to be able to create
30 # new directories.
31 anon_mkdir_write_enable=YES
32 #
[root@h1 pub]# service vsftpd restart
关闭 vsftpd:[确定]
为 vsftpd 启动 vsftpd:[确定]
[root@h1 pub]#
文件系统 类型 容量 已用 可用 已用%% 挂载点
/dev/sda2 ext4 70G 19G 47G 29% /
tmpfs tmpfs 940M 264K 940M 1% /dev/shm
[root@h1 ~]# fdisk -l
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003ea61
/dev/sda1 1 1275 10240000 82 Linux swap / Solaris
/dev/sda2 * 1275 10444 73645056 83 Linux
[root@h1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x7a268102.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1): 1^H
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): 500M
The partition table has been altered!
Syncing disks.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (设备或资源忙). As a result, it may not reflect all of your changes until after reboot.
[root@h1 ~]#
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7a268102
/dev/sdb1 1 500 4016218+ 83 Linux
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003ea61
/dev/sda1 1 1275 10240000 82 Linux swap / Solaris
/dev/sda2 * 1275 10444 73645056 83 Linux
[root@h1 ~]#
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe blocks
251472 inodes, 1004054 blocks
50202 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=1031798784
31 block groups
32768 blocks per group, 32768 fragments per group
8112 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Creating journal (16384 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
180 days, whichever comes first. Use tune2fs -c or -i to override.
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7a268102
/dev/sdb1 1 500 4016218+ 83 Linux
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003ea61
/dev/sda1 1 1275 10240000 82 Linux swap / Solaris
/dev/sda2 * 1275 10444 73645056 83 Linux
[root@h1 ~]# mount /dev/sdb1 /var/share/
[root@h1 ~]# df -hT
文件系统 类型 容量 已用 可用 已用%% 挂载点
/dev/sda2 ext4 70G 19G 47G 29% /
tmpfs tmpfs 940M 264K 940M 1% /dev/shm
/dev/sdb1 ext3 3.8G 72M 3.6G 2% /var/share
[root@h1 ~]#
正在启动 httpd:httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.5.130 for ServerName
[确定]
/var/www/html#--------------网页页面目录
<body>
<title>
HELLO !
</title>
"HELLO EVERYONE!"
</body>
~
"hello.html" 9L, 74C written
[root@h1 html]#
停止 mysqld: [确定]
初始化 MySQL 数据库: Installing MySQL system tables...
OK
Filling help tables...
OK
support-files/mysql.server to the right place for your system
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root -h h1 password 'new-password'
/usr/bin/mysql_secure_installation
databases and anonymous user created by default. This is
strongly recommended for production servers.
cd /usr ; /usr/bin/mysqld_safe &
cd /usr/mysql-test ; perl mysql-test-run.pl
正在启动 mysqld: [确定]
[root@h1 html]#
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.61 Source distribution
affiliates. Other names may be trademarks of their respective
owners.
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 s ec)
Query OK, 1 row affected (0.00 sec)
+--------------------+
| Database |
+--------------------+
| information_schema |
| db1 |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
Database changed
Query OK, 0 rows affected (0.01 sec)
mysql> insert into t1 values(1,'ORACLE');
Query OK, 1 row affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
+------+--------+
| id | name |
+------+--------+
| 1 | ORACLE |
| 2 | RedHat |
+------+--------+
2 rows in set (0.00 sec)
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
23 rows in set (0.00 sec)
mysql> use mysql ;
Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed
mysql> show tables; +---------------------------+ | Tables_in_mysql | +---------------------------+ | columns_priv | | db | | event | | func | | general_log | | help_category | | help_keyword | | help_relation | | help_topic | | host | | ndb_binlog_index | | plugin | | proc | | procs_priv | | servers | | slow_log | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | user | +---------------------------+ 23 rows in set (0.00 sec) mysql> select host,user,password from user;
+-----------+------+----------+ | host | user | password | +-----------+------+----------+ | localhost | root | | | h1 | root | | | 127.0.0.1 | root | | | localhost | | | | h1 | | | +-----------+------+----------+ 5 rows in set (0.00 sec) mysql> quit
Bye [root@h1 html]# vi 1.sql use db1
create table t00(id int,name varchar(30)); insert into t00 values(1,'ORACLE'); insert into t00 values(2,'MYSQL'); "1.sql" [New] 5L, 123C written
[root@h1 html]# [root@h1 html]# mysql mysql> source /var/www/html/1.sql
Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed
Query OK, 0 rows affected (0.03 sec) Query OK, 1 row affected (0.02 sec)
Query OK, 1 row affected (0.00 sec)
mysql> |