This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new user (CentOS will create /home/admin as well) | |
adduser admin | |
# Assign the user a new password | |
passwd admin | |
# Add the user to the "wheel" group | |
usermod -a -G wheel admin | |
# Edit the /etc/sudoer file (requires knowledge of vi) | |
visudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Flush iptables rules (start with a clean slate where all traffic to all destinations is allowed) | |
iptables -F | |
# Allow loopback traffic | |
iptables -A INPUT -i lo -j ACCEPT | |
# Reject traffic destined to any port on IP address 127.0.0 through 127.0.0.7 | |
# iptables -A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT | |
# Allow all ESTABLISHED and RELATED connections to stay up | |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# Allow all external hosts to be reachable from the box | |
iptables -A OUTPUT -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum update | |
yum groupinstall 'Development Tools' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the postgres packages | |
yum install postgresql postgresql-server | |
# Configure postgresql to start automatically on boot | |
chkconfig postgresql on | |
# Stat posgresql | |
service postgresql start | |
# Switch to postgres user (required to make initial connection to postgresql with default configuration) | |
su - postgres | |
# Make initial connection to the database to test connectivity | |
psql -d template1 -U postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /var/log/application/* -name "*.log" -type f -mtime -1 | |
-exec egrep -Hn \ | |
'\b(?:4[0-9]{12}(?:[0-9]{3})? | |
|5[1-5][0-9]{14} | |
|6(?:011|5[0-9][0-9])[0-9]{12} | |
|3[47][0-9]{13} | |
|3(?:0[0-5]|[68][0-9])[0-9]{11} | |
|(?:2131|1800|35\d{3})\d{11})\b' | |
{} > ~/output.out \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
easy_install -U pip | |
pip install -U virtualenv | |
cd /install/directory/location/ | |
virtualenv --no-site-packages acuity | |
cd acuity/ | |
source bin/activate | |
pip install django | |
pip install twisted | |
# Running the application | |
cd /install/directory/location/acuity/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /opt/env/ | |
chown django:django /opt/envs | |
su - django | |
cd /opt/env | |
virtualenv --no-site-packages django-mingus | |
pip install -E django-mingus/ psycopg2 | |
source django-mingus/bin/activate | |
cd djagno-mingus | |
git clone git://github.com/montylounge/django-mingus.git | |
cd django-mingus/mingus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Install git | |
cd ~/src | |
wget http://kernel.org/pub/software/scm/git/git-1.6.6.tar.gz | |
tar xzvf git-1.6.6.tar.gz | |
cd git-1.6.6 | |
./configure | |
make | |
make install | |
-- Install mercurial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://initd.org/pub/software/psycopg/psycopg2-2.0.13.tar.gz | |
yum install postgresql-devel | |
tar xzvf psycopg2-2.0.13.tar.gz | |
cd psycopg2-2.0.13 | |
python2.6 setup.py build | |
python2.6 setup.py install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/src | |
wget http://bit.ly/6E0DNN | |
chmod u+x setuptools-0.6c11-py2.6.egg | |
./setuptools-0.6c11-py2.6.egg --prefix=/usr/local | |
easy_install -U pip | |
pip install -U virtualenv |
OlderNewer