cisco 3640 配置 VPN

                                  Router VPN

r1(config)#crypto isakmp policy 1

(定义IPsec策略框架)

r1(config-isakmp)#encryption 3des

(加密方式为3des)

r1(config-isakmp)#hash sha

(哈希值函数为sha)

r1(config-isakmp)#group 2

(密钥长度group1为76位,group2为1024位)

r1(config-isakmp)#lifetime 28800

(生存时间,即密钥的有效期/秒)

r1(config-isakmp)#authentication pre-share

(认证方式为预共享密钥,/VPN两端预认证字段)

r1(config-isakmp)#exit

r1(config)#crypto isakmp identity address

r1(config)#crypto isakmp key huayu address 218.56.57.59

(标识对端IP地址及预共享密钥内容)

r1(config)#crypto ipsec transform-set huayuipsec esp-3des esp-md5-hmac

(定义IPsec转换集,名为huayuipsec)

r1(cfg-crypto-trans)#exit

配置感兴趣流量

r1(config)#access-list 101  101 permit ip 192.168.10.0 0.0.0.255 192.168.20.0 0.0.0.255

配置map

r1(config)#crypto map huayumap 10 ipsec-isakmp

(定义map图,优先级为10,优先级VPN两端匹配)

% NOTE: This new crypto map will remain disabled until a peer

        and a valid access list have been configured.

r1(config-crypto-map)#set peer 218.56.57.59

(设置对等地址)

r1(config-crypto-map)#set transform-set huayuipsec

(调用定义的转换集)

r1(config-crypto-map)#match address 101

(匹配感兴趣流量)

r1(config-crypto-map)#exit

应用到端口

r1(config)#interface e0/0

r1(config-if)#crypto map huayumap

r1(config-if)#end

*Mar  1 00:29:32.051: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON

show cryto ipsec sa

mysql 修改密码、开启远程登录(远程访问)

今天朋友做服务器,遇到了点儿问题,协助给解决了一下,其实也没什么,mysql安装及配置问题。

系统为CentOS,内核 2.6.18-164.el5

安装mysql时提示gcc编译错误,估计是没安装gcc编译器。

yum install -y gcc

yum install -y mysql

然后把相关的rpm包都装上,在此不做写出

登陆mysql:

默认用户名为root,密码为空

[root@fast ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

修改密码为123:

mysql> set password=password(‘123’);
Query OK, 0 rows affected (0.00 sec)

需要远程登录mysql数据库,默认是关闭的,要启动它:

mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’IDENTIFIED BY ‘YOURPASSWORD’ WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

刷新生效

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

完成。

Neither host ‘localhost’ nor ‘localhost’ could be looked up

安装MYSQL数据库时,启动服务遇到问题,提示如下,由提示错误可以看出,是因为主机名的解析有问题

查看/etc/hosts,文件中没有任何内容,添加一行配置,内容如下:

127.0.0.1        localhost

保存退出,重启服务测试

之前的错误提示:

[root@localhost yum.repos.d]# service mysqld start
初始化 MySQL 数据库: Neither host ‘localhost’ nor ‘localhost’ could be looked up with
/usr/bin/resolveip
Please configure the ‘hostname’ command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the –force option
                                                           [失败]

[root@localhost yum.repos.d]# vi /etc/hosts
[root@localhost yum.repos.d]# service mysqld start
初始化 MySQL 数据库: Installing MySQL system tables…
100329 18:18:19 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to

4294967295
100329 18:18:19 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to

4294967295
OK
Filling help tables…
100329 18:18:19 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to

4294967295
100329 18:18:19 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to

4294967295
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h localhost password ‘new-password’

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com
                                                           [确定]
启动 MySQL:                                               [确定]
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> show databases
    -> ;
+——————–+
| Database           |
+——————–+
| information_schema |
| mysql              |
| test               |
+——————–+
3 rows in set (0.00 sec)

mysql> exit
Bye
[root@localhost yum.repos.d]# mysqladmin -u root password root      //修改密码为root

[root@localhost yum.repos.d]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

破解 系统登录密码-administrator账号密码

1:删除系统安装目录\system32\config下的SAM文件,然后复制c:\windows\repair 下的这五个文件software,system,security,default和sam

3:你有双系统只需要把 c:\windows\repair 下的software, system, security, default , sam 五个文件copy到 c:\windows\system32\config\ 下,覆盖原来的文件即可

  只有一个os..若 C 盘是 FAT32 的话可在 DOS 下执行,如果是 NTFS 的话,用能识别出 NTFS 分区的工具来实现。执行下面的操作:

delete c:\windows\system32\config\system

delete c:\windows\system32\config\software

delete c:\windows\system32\config\sam

delete c:\windows\system32\config\security

delete c:\windows\system32\config\default

copy c:\windows\repair\system c:\windows\system32\config\system

copy c:\windows\repair\software c:\windows\system32\config\software

copy c:\windows\repair\sam c:\windows\system32\config\sam

copy c:\windows\repair\security c:\windows\system32\config\security

copy c:\windows\repair\default c:\windows\system32\config\default

(我在网上找了一下用NTFS Reader for DOS 1.02这个软件也可以

同样支持在DOS下支持FAT文件系统)

下载地址:http://www.onlinedown.net/soft/10162.htm#download

apache 虚拟目录错误:CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional “env=” clause (see docs)

[root@rhvl venus]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 1000 of /etc/httpd/conf/httpd.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional “env=” clause (see docs)
                                                           [FAILED]重启服务时出现以上错误。查了点儿资料,没感觉有什么有效信息,就再次查看配置文件。
觉得日志文件格式(common)有点儿问题,追加到后面后,再次重启服务,OK了。

<VirtualHost www.venus.com >
    ServerAdmin venuslinux@gmail.com
    DocumentRoot /var/www/html/upload/
    ServerName www.venus.com
    ErrorLog logs/venus/venussite.log
    CustomLog logs/venus/venuscus.log common //把common追加到后面 common是日志定义的格式
</VirtualHost>