Skip to content

Instantly share code, notes, and snippets.

@aghecht
Last active December 9, 2015 19:58
Show Gist options
  • Save aghecht/4320534 to your computer and use it in GitHub Desktop.
Save aghecht/4320534 to your computer and use it in GitHub Desktop.
Set up MySQL and nginx on Centos 6
# Install MySQL
sudo yum install mysql mysql-server mysql-devel
sudo chkconfig --levels 235 mysqld on
sudo /etc/init.d/mysqld start
# Setup dbhost user
mysql -u root
GRANT ALL PRIVILEGES ON *.* TO 'dbhost'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
# Add dbhost 127.0.0.1 to /etc/hosts
# Install nginx
# 32 bit
sudo su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm'
# 64 bit
sudo su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'
#
sudo yum install nginx
sudo /sbin/chkconfig nginx on
sudo /etc/init.d/nginx stop
sudo /etc/init.d/nginx start
# Install unicorn
sudo gem install unicorn
sudo /sbin/chkconfig unicorn on
# Clean Up
sudo yum clean headers packages dbcache expire-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment