McNair Center IT
Server Build notes:
- RDP Documentation (IP Address: 128.42.44.182)
- Web Server Documentation (IP Address: 128.42.44.180)
- Database Server Documentation (IP Address: 128.42.44.181)
- Test Web Server Documentation (IP Address: 128.42.44.22)
Other useful resources:
- Posgres Server Configuration
- Working with PostgreSQL
- Haas PhD Server Configuration
- Software Repository
Wishlist:
Logins
- The initials for the SDC platinum on Father (the RDP server) are: mc
FAQ
In order to access the McNair Center resources, you generally need to be on the Rice network. Exceptions to this include accessing the dbase and webserver by ssh, and accessing the webserver (including the wiki) through the web. To access all other resources, you need to be connected in one of three ways:
- By a wired ethernet connection on the Rice campus, including through wired workstations at the McNair Center
- Through the Rice Owls wireless network (note: the Rice Visitor network will not allow you access)
- From off-campus (or through Rice Vistor, etc.) but through the VPN. Connection details are available here: https://docs.rice.edu/confluence/display/ITDIY/Connecting+to+the+Rice+network+with+VPN
Connecting to the RDP Server
To connect to the RDP Server, you will need a user account on the RDP server. If you don't have one, see Ed.
For PCs
- Go to the Start menu and search for and then open the "Remote Desktop Connection" application
- In the new window, enter the RDP machine's IP address (128.42.44.182) into the text box labeled "Computer"
- Click "Show Options" and then enter ad.mcnaircenter.org\user (where user should be replaced with your username on the RDP server) as the username
- Click Connect and type in your password when prompted
- You should now be able to access the RDP machine from the resulting window
For Macs
- To connect from Mac to Windows, download the Microsoft Remote Desktop App off the Mac App store.
- Open the app and go to Create / Edit Remote Desktops.
- On the Connection Center screen click New. A new window should pop up prompting you for several fields of information. Here are the important ones:
- PC name: this should be the RDP machine's IP address (128.42.44.182)
- Credentials: The user name and password to be used for the RDP server. Your username should be ad.mcnaircenter.org\user (where user is replaced with your username on the RDP server) and your password is your password on the RDP server.
- Save the remote desktop and you should be able to access it from the Microsoft Remote Desktop App.
Mapping the Network Drive
To map to a network drive, you will need a user account on the RDP server. If you don't have one, see Ed.
For PCs
- Open File Explorer on your PC and click "This PC"
- Look for the "Computer" tab in the menu at the top of the window and choose "Map Network Drive"
- In the new window, choose any empty drive letter (for example, Z:) and for the folder, type \\128.42.44.182\bulk
- Check the "Connect using different credentials" checkbox
- Click Finish and enter your username (in the form ad.mcnaircenter.org\user where user is replaced with your username on the RDP server) and password when prompted
- You should be able to see the network drive on your computer now.
For Macs
- Go into the OS X Finder and hit Command+K which should bring up the "Connect to Server" menu.
- In that menu, enter smb://128.42.44.182/bulk into the server address and click Connect.
- Enter your username (in the form ad.mcnaircenter.org\user where user is replaced with your username on the RDP server) and password on the RDP server.
- The drive should now appear on your Finder menu sidebar.
Connecting the Database Server
You can map the database server's drive in the same way that you map the bulk drive on the RDP server. The details are:
IP address: 128.42.44.181 username (you don't need to specify the domain): researcher password: 9million
You can connect the database server from your laptop or from the RDP. For connecting from the RDP, follow the connection for connecting from windows.
Connecting to the dbase server from windows
- Download putty.exe (its free)
- Connect to 128.42.44.181 (save your connection for later)
- Username: researcher
- Password: 9million
Connecting to the dbase server from mac
- Open a terminal
- Connect using (on the first time you have to accept the certificate):
ssh 128.42.44.181
- Same username and password as above
Using the Dbase server
Change directory to your project's directory and the open a connection to the dbase server:
cd /bulk/whatever psql yourdb
To create a dbase, just type:
createdb yourbdname
Using the Normalize Fixed Width Script
There is a very useful script that will take text files with lots of spaces and turn them into tab delimited text files, this file can currently be found at "E:\Processing\SDC Data." You can access it by
- RDP onto the server and open Windows Powershell. It is on the taskbar at the bottom of the screen with a blue square icon with an arrow in it.
- type in "cd 'E:\Processing\SDC Data' "
OR
- Open File Explorer
- Look in bulk (E:) then Processing then SDC Data
There you should be able to find the script NormalizeFixedWIdth.pl. In order to run the script you must RDP onto the server and use PowerShell. There are 2 easy ways to get your file into the same folder as this script
- You could copy the script into the folder with the files you want to normalize
- You could copy the files you want to normalize into "E:\Processing\SDC Data" and then take it out once you are done normalizing it
Once you have performed one of the above steps you can use the script to normalize your text file. To do this:
- Open windows PowerShell
- use the cd (change directory) command to navigate to the place you put both the text file and the script, if you moved your text file, use "cd 'E:\Processing\SDC Data' ". The proper way to use this command is to type "cd (name of folder you want to move into without parentheses around it)" into PowerShell.
- PowerShell should say "PS E:\Processing\SDC Data>" or a different filepath if you moved the script.
- Now in order to use the script type "perl NormalizeFixedWidth.pl -file='name of file to normalize (make sure to include the single quotes on the outside and the file extension or the script won't work)' "
Server Backup
Backups are written to an external usb HDD at midnight everyday by invoking backup scripts from cron. Backup logs are also updated.
web server
Current backup policy is to backup all MySQL databases on the server.
Backup script: /root/scripts/web_mysqldump_backup.plx Backup destination path: /media/usb_backup/mysqldump/ Backup log: /var/log/web_mysqldump_backup.log.gz
The script uses mysqldump and rsync for backup. As of 6-13-2016, backup destination paths are hard-coded in the script.
- TO DO: add command line options like --backup-destination= remote/local, --verbose/quiet
redo this script like for database server (see below) because its cleaner..
To see more information see perldoc
perldoc /root/scripts/web_mysqldump_backup.plx
database server
Current backup policy is to backup most PostgreSQL databases on the server. We ignore a few test databases.
Backup script: /root/scripts/db_pgdump_backup.plx List of databases to back up: /root/scripts/db_pgdump_backup.list Backup destination path: /media/usb_backup/pgdump/ Backup log: /var/log/db_pgdump_backup.log
The script uses pg_dump for backup. All databases are then collected in a tar archive. As of 6-15-2016, backup destination paths are hard-coded in the script.
- TO DO: add command line options like --backup-destination= remote/local, --verbose/quiet
To see more information see perldoc
perldoc /root/scripts/db_pgdump_backup.plx