-
Notifications
You must be signed in to change notification settings - Fork 6
Setting up CentOS 6 Web server
sergeylukin edited this page Apr 22, 2012
·
35 revisions
- set locale to UTF-8. Add following to /etc/profile:
# set locale to UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
- useradd www
- useradd -G www developername
- yum groupinstall "Development Tools"
- yum install man wget vim readline-devel mlocate mc
- yum install httpd
- chkconfig --levels 235 httpd on
- chown www:www /var/www -R
- Set ServerName to 127.0.0.1:80 and NameVirtualHost to *:80 in /etc/httpd/conf/httpd.conf
- add Include virtuals/* to /etc/httpd/conf/httpd.conf
- Add Virtual hosts files in /etc/httpd/virtuals/
Install YAML (required):
- Download & extract latest version from http://pyyaml.org/download/libyaml/
- change directory to yaml's source
- ./configure --prefix=/usr/local
- make && make install
Install RUBY:
- cd /usr/local/src
- download & extract latest version from http://www.ruby-lang.org/en/downloads/
- change directory to ruby's source
- ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
- make && make install
- cd /usr/local/src
- download & extract latest version from http://rubygems.org/pages/download
- ruby setup.rb
- gem install jekyll
- as described here
- ..
- ./configure --prefix=/usr/local --with-apxs2=/usr/sbin/apxs'
- make && make install
- ..
- add following to /etc/httpd/conf.d/php.conf:
# PHP Configuration for Apache
#
# Load the apache module
#
LoadModule php5_module modules/libphp5.so
#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
</Files>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
- Disable SELinux: set SELINUX=disabled in /etc/selinux/config (reboot to apply changes or run /usr/sbin/setenforce 0)
- Copy /usr/local/src/php/php.ini-dev /usr/local/lib/php.ini