Difference between revisions of "VmMrtSrv06"
From MohidWiki
(→Install Thredds) |
(→and ftpd) |
||
Line 106: | Line 106: | ||
====and ftpd==== | ====and ftpd==== | ||
− | + | > yum install vsftpd | |
+ | > /sbin/chkconfig --levels 345 vsftpd on | ||
+ | > /sbin/chkconfig --list | grep ftp | ||
+ | > vim /etc/vsftpd/vsftpd.conf | ||
+ | vsftpd.conf> | ||
+ | anonymous_enable=NO | ||
+ | write_enable=NO | ||
====[http://www.unidata.ucar.edu/projects/THREDDS/tech/tutorial/GettingStarted.html Install Thredds]==== | ====[http://www.unidata.ucar.edu/projects/THREDDS/tech/tutorial/GettingStarted.html Install Thredds]==== |
Revision as of 19:54, 5 February 2009
VmMrtSrv06 is a xen domain built in Maretec xen server composed of a 20GB LV and a temporarily device made of a dvd iso.
Contents
[hide]Objective/Function
This domain is meant to become a dedicated OpenDAP/Thredds/LAS and ftp server.
Architecture
Logs/notes
Creation
From the maretec user at the MrtXnSrv, 192.168.20.125:
Create a new LV and a new domain
> sudo lvcreate -n vmmrtsrv06 -L 20G dados01 > cd /home/maretec/xen_configs /home/maretec/xen_configs> sudo /usr/sbin/xm new -F vmmrtsrv06-1.0.cfg > sudo /usr/sbin/xm start vmmrtsrv06 > sudo /usr/sbin/xm sched-credit -d VMMMRTSRV06 -w 256 -c 150 > sudo /usr/sbin/xm sched-credit sched-credit> Name ID Weight Cap Domain-0 0 256 0 VMMRTSRV02 17 256 0 VMMRTSRV03 256 0 VMMRTSRV04 19 256 0 VMMRTSRV05 33 256 0 VMMRTSRV06 36 256 150
let's add a data LV as a new PV in the domain
> sudo /sbin/lvcreate -n vmmrtsrv06-data -L 50G dados01 > sudo /usr/sbin/xm block-attach VMMRTSRV06 phy:/dev/mapper/dados01-vmmrtsrv06--data hdb:disk w > sudo /usr/sbin/xm reboot VMMRTSRV06
Accessing the domain via a console with VNC
Access the domain with a VNC client, such as <goto>TightVNC</goto>. The domain console access port with VNC is 192.168.20.125:5903. If running from the live cd, then proceed to install the distro. If the distro is already installed and you're not running from the live cd, then the linux distro is already installed and you can check the network ip so you can ssh. Open a new terminal and type the > ifconfig command. Read the ip number. In this case we have 192.168.20.136. Then you can proceed to configure your new domain.
Configuration
From the user user at the VmMrtSrv06, 192.168.20.136:
Update your distro
> su > yum update
Add a new PV, a new VG and new LVs
> pvcreate /dev/sdb > pvscan > vgcreate -p 4 -v data /dev/sdb > vgscan > lvcreate -n opendap -L 40G data > lvcreate -n ftp -L 5G data > lvcreate -n http -L 1G data
Create filesystems and mount them
> mkfs -t ext2 /dev/data/opendap > mkfs -t ext2 /dev/data/ftp > mkfs -t ext2 /dev/data/http > mkdir /opendap > mkdir /http > mkdir /ftp > vim /etc/fstab fstab> /dev/data/opendap /opendap ext2 defaults 0 0 fstab> /dev/data/http /http ext2 defaults 0 0 fstab> /dev/data/ftp /ftp ext2 defaults 0 0 > mount -a > df
Configure users and groups
- Use VNC then go to System-->Administration-->Users and groups
- Make users the primary group of user user.
- Create the group Maretec. Every user of this system should be applied to the group Maretec.
- Create the user datamover. Make his primary group Maretec.
Configure permissions
> chgrp -R maretec /opendap > chgrp -R maretec /ftp > chgrp -R maretec /http > chmod g+w /opendap > chmod g+w /http > chmod g+w /ftp
Configure the firewall
> vim /etc/sysconfig/iptables iptables> -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT iptables> -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT > /etc/init.d/iptables restart > netstat -tulpn
From the X environment, open up the System-->Administration-->Firewall. Then open up the ports 22(ssh), 21(ftp), 80(http), 443(https) and 8080(tomcat).
Enable sshd
> vim /etc/ssh/sshd_config sshd_config> #PermitRootLogin yes sshd_config> PermitRootLogin no > service sshd start > service sshd status > chkconfig --level 345 sshd on > chkconfig | grep sshd
and httpd
> service httpd start > service httpd status > chkconfig --level 345 httpd on > chkconfig | grep httpd
and ftpd
> yum install vsftpd > /sbin/chkconfig --levels 345 vsftpd on > /sbin/chkconfig --list | grep ftp > vim /etc/vsftpd/vsftpd.conf vsftpd.conf> anonymous_enable=NO write_enable=NO
Install Thredds
- Configure Thredds
- Then launch it at startup:
> vim /etc/rc.d/rc.local rc.local> /home/user/Download/apache-tomcat-6.0.18/bin/startup.sh
Install Netcdf
> yum install netcdf > yum install nco
Maintenance
None done yet...
Changing the bridging between the LAN and the DMZ
To be done...
Troubleshooting
- The mouse in VNC won't work!
-
> sudo yum update
on the client maching, then reboot.