Last active
August 29, 2015 14:05
-
-
Save JCotton1123/e6ae5b494febbd641c59 to your computer and use it in GitHub Desktop.
Setup Questions2Answers
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 common | |
yum install -y git wget curl | |
# Install apache, php, mysql | |
yum install -y httpd mod_ssl mod_php | |
yum install -y php php-mysql php-pdo | |
yum install -y mysql mysql-server | |
# Addnl php req's | |
yum install -y php-gd php-mbstring | |
# Start services | |
service mysqld start | |
chkconfig --level 2345 mysqld on | |
service httpd start | |
chkconfig --level 2345 httpd on | |
# Get Q2A code & place in webroot | |
cd /tmp && wget http://www.question2answer.org/question2answer-latest.zip | |
unzip question2answer-latest.zip -d q2a | |
mv q2a/* /var/www/html | |
mv q2a/.htaccess /var/www/html | |
# Setup QA config | |
cd /var/www/html | |
mv qa-config-example.php qa-config.php | |
sed -i 's/your-mysql-username/app_qa/g' qa-config.php | |
sed -i 's/your-mysql-password/password/g' qa-config.php | |
sed -i 's/your-mysql-db-name/questionsanswers/g' qa-config.php | |
# Setup MySQL database and user creds | |
mysql -u root -e 'create database questionsanswers' | |
mysql -u root -e "GRANT ALL ON questionsanswers.* TO 'app_qa'@'localhost' IDENTIFIED BY 'password'" | |
# Configure firewall | |
iptables -I INPUT 5 -p tcp -m conntrack --ctstate NEW -m tcp --dport 80 -j ACCEPT | |
iptables -I INPUT 5 -p tcp -m conntrack --ctstate NEW -m tcp --dport 443 -j ACCEPT | |
iptables-save > /etc/sysconfig/iptables |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment