First, upgrade to root to facilitate the operation:
Vexs @ Ubuntu11 :~ $ Sudo passwd root
[Sudo] password for vexs:
Enter new UNIX password:
Retype new UNIX password:
Passwd: password updated successfully
Vexs @ Ubuntu11 :~ $ Su
Password:
Root @ Ubuntu11:/home/vexs #
Then, according to S4 (the Command records operated by ur4.
Http://www.google.com.hk/url? Sa = t & source = web & cd = 1 & ved = 0 cbk1_jaa & url = http % 3A % 2F % 2Fwww. linux. uz % 2 Fforum % 2Findex. php % 3 Faction % 3 Ddlattach % 3 Btopic % 3D2654. 0% 3 Battach % 3D2749 & ei = LZ_jTY_wIYiIuAPOg4jtBg & usg = AFQjCNGq6nFHXTSNVSNOz3pvQGa6hYXVAw
Decompress the downloaded squashfs package (more than 130 MB) and copy it to/opt(metadata is metasploit-3.5.0.squashfs.rar, change the name ):
Root @ Ubuntu11:/home/vexs # cp-R Downloads/metasploit-3.5.0.squashfs/opt/
Root @ Ubuntu11:/home/vexs # cd/opt/
Root @ Ubuntu11:/opt # mount-t squashfs./metasploit-3.5.0.squashfs/mnt/-o loop
Root @ Ubuntu11:/opt # ls/mnt/
Root @ Ubuntu11:/opt # mkdir metasploit-3.5.0
Root @ Ubuntu11:/opt # cp-R/mnt/* metasploit-3.5.0
Then create a user to assign permissions:
Root @ Ubuntu11:/opt # cd metasploit-3.5.0
Root @ Ubuntu11:/opt/metasploit-3.5.0 # useradd postgres
Root @ Ubuntu11:/opt/metasploit-3.5.0 # chmod-R 0700./postgresql/data/
Root @ Ubuntu11:/opt/metasploit-3.5.0 # chown-R postgres: postgres postgresql/data/
Root @ Ubuntu11:/opt/metasploit-3.5.0 # chown postgres./postgresql/
In general, this is enough. Now you can start and try to see if there is any error:
Root @ Ubuntu11:/opt/metasploit-3.5.0 #./ctlscript. sh start
LOG: database system was shut down at 2011-03-13 21:09:33 HKT
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
/Opt/metasploit-3.5.0/postgresql/scripts/ctl. sh: postgresql started at port 7337
/Opt/metasploit-3.5.0/apps/pro/engine/scripts/ctl. sh: prosvc started
Cd: 31: cant cdto/opt/metasploit-3.5.0/apps/pro/ui
Syntax OK
/Opt/metasploit-3.5.0/apache2/scripts/ctl. sh: httpd started at port 666
Let's look at the port listening situation:
Root @ Ubuntu11:/opt/metasploit-3.5.0 # netstat-an | grep:
Try to access the local port 666 through a browser. The user name and password are as follows:
Https: // localhost: 666/login
Login: satsura
PWD: sanjar
If Service Temporarily Unavailable appears unfortunately, refresh the page multiple times. Haha.
Then press S4 (the command reference provided by uR4 mainly to modify the access permission:
It is best to stop the modification first:
Asploit-3.5.0 "> root @ Ubuntu11:/opt/metasploit-3.5.0 #./ctlscript. sh stop
Copy and paste these files:
Chown-R root *
Chmod-R 777 apps/
Chown postgres: root postgresql/
Chown-R postgres: postgres postgresql/data/
Chown-R postgres: postgres postgresql/. s. PGSQL.7337.lock
Chown-R daemon: oot apps/pro/tasks/
Chown-R daemon: oot apps/pro/reports/
Chown-R daemon: oot apps/pro/loot/
Chown-R daemon: oot apps/pro/export/
Chown-R daemon: oot apps/pro/ui/log/
Chown-R daemon: oot apps/pro/ui/tmp/
Chown-R daemon: oot apps/pro/ui/script
Chown-R daemon: oot apps/pro/ui/scripts/
Chown-R daemon: oot apps/pro/ui/tmp/pids/
Chown-R daemon: oot apps/pro/ui/tmp/sockets/
Chown-R daemon: oot apps/pro/ui/tmp/sessions/
Chown-R daemon: oot apps/pro/ui/tmp/cache/
Chown-R daemon: oot apps/pro/ui/scripts/ctl. sh
This is not necessary. Just like creating a daemon user, it is not necessary. The system already has a daemon.
Online update is not supported, and more tests are not performed. The expiration time of the built-in Key is, and the test needs to adjust the time before this date.