New Server Build Steps
Setup steps.
- Rename server beach default ddonohoe account to donohoe in these files group, group-, gshadow, gshadow-, passwd, passwd-, shadow, shadow- (editing the '-' files probably unnecessary, but WTH.
- mv /home/ddonohoe /home/donohoe
- Ran ssh-keygen -t dsa to create ssh key
- Installed other public keys in .ssh/authorized_keys
- Change root password and donohoe passwd
- Create DD Poker 3 user useradd -m ddpoker3 -s /bin/bash and set passwd
Initial Setup
Assumes you have your login and ssh setup
$ scp macpro:~/common/setup/dd_setup . $ ./dd_setup
Code
$ start-svntunnel $ svn -N co svn://localhost:3691/repos/trunk/dev $ cd dev $ svn update code config docs repos runtime tools thirdparty
Security / Config
- /sbin/chkconfig --list | grep on to see all that are on
- /etc/init.d/sendmail stop - turn off send mail for now
- /sbin/chkconfig --del sendmail
- /etc/init.d/bluetooth stop - turn off bluetooth
- /sbin/chkconfig --del bluetooth
- /etc/init.d/cups stop - turn off cups (common unix printing system)
- /sbin/chkconfig --del cups
- /etc/init.d/ntpd stop - turn off ntpd (will use ntpdate)
- /sbin/chkconfig --del ntpd
- system-config-date (cmd-line GUI) to set timezone to CST
- hwclock --systohc to sync hardware clock to system clock
- /usr/sbin/ntpdate -s -p 8 -u `/bin/sed -e 's/#.*//' /etc/ntp/step-tickers` to set time from ntp (in cron)
- NOTE: restart cron after changing date /etc/init.d/crond stop/start
- how to add IPs
and Linux Networking
- nmap (-A) -F -vv server.domain.com to scan ports
Java
$ cd /usr/local $ /home/donohoe/junk/jdk-6u11-linux-x64.bin $ ln -s jdk1.6.0_11 java
Apache
- Put temp page in /var/www/html
- Turn off SSL since not currently using it /etc/httpd/conf.d/ssl.conf
- Edit /etc/httpd/conf/httpd/conf and changed to bind to specific IP
- To add a user in /etc/httpd/conf/users: htpasswd [username]
Tomcat
$ cd /usr/local $ tar xzvf /home/donohoe/junk/apache-tomcat-6.0.18.tar.gz $ ln -s apache-tomcat-6.0.18 tomcat $ cp /home/ddpoker3/work/dev/tools/tomcat /etc/init.d/ $ cp tomcat /etc/init.d/ $ chmod 755 /etc/init.d/tomcat $ chkconfig --add tomcat $ chkconfig --list tomcat $ ln -s /home/ddpoker3/work/dev/code/pokerwicket/target/pokerwicket-3.0.war /usr/local/tomcat/webapps/ROOT.war $ ln -s /home/ddpoker3/work/dev/code/pokerwicket/target/pokerwicket-3.0.war ROOT.war
MySQL
Mysql 5.0.45 came pre-installed. First time I started it, got this message:
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
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 free.ddpoker.com password 'new-password'
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
[ OK ]
Starting MySQL: [ OK ]
- Changed the root password using the commands above
- Edited /etc/init.d/mysqld changed chkconfig line to # chkconfig: 2345 64 36
- Issued these commands to reset and verify
$ chkconfig --del mysqld $ chkconfig --add mysqld $ chkconfig --list | grep mysql /etc/init.d/mysqld start
- DB files in /var/lib/mysql
DD Poker 3
$ cd /home/ddpoker3/work/dev/tools/pokerserver $ ./install $ /etc/init.d/pokerserver start
JSPWiki - to fix RCS issues
cd /home/jspwiki/pages
find . -name '*txt' -exec rcs -M -l {} \;
Modify ssh to not kill our cvs tunnels and restrict root login
Edited /etc/ssh/sshd_config to add:
PermitRootLogin no KeepAlive yes ClientAliveInterval 60
Restarted sshd /etc/init.d/sshd restart.
Alpine
Download from http://dag.wieers.com/rpm/packages/alpine/
rpm -ivh alpine-1.10-1.el5.rf.x86_64.rpm
Checking Config Files Into Subversion
As explained in the Subversion Notes page, here are the specifics of how we got config files into svn:
On my local dev machine:
$ cd config/machines $ mkdir free $ cd free $ mkdir etc $ mdkir -p tomcat/conf
$ cd /usr/local/tomcat $ svn co svn://localhost:3691/repos/trunk/dev/config/machines/free/tomcat/conf $ cd conf $ svn add *.* $ svn commit $ cd / $ svn co svn://localhost:3691/repos/trunk/dev/config/machines/free/etc $ cd etc $ svn add [files of interest, used -N to add just a directory and not its contents] $ svn commit
Webalizer
$ webalizer -c /etc/webalizer_poker.conf /usr/local/tomcat/logs/ddpoker.access.log.2009-0* $ webalizer -c /etc/webalizer_wiki.conf /usr/local/tomcat/logs/wiki.access.log.2009-0*
Add new attachment
Only authorized users are allowed to upload new attachments.