Академический Документы
Профессиональный Документы
Культура Документы
6
ifup eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes #change from no
vi /etc/selinux/config
SELINUX=disabled #change from enforcing
yum groupinstall "Development Tools"
cd /usr/src/
wget http://ftp.vim.org/security/openssl/openssl-1.0.2d.tar.gz
tar xzf openssl-1.0.2d.tar.gz
cd openssl-1.0.2d
./config --prefix=/usr/local --openssldir=/usr/local/openssl -fPIC no-gost no-sh
ared no-zlib
make
make depend
make install
yum install pcre-devel.x86_64
groupadd apache
useradd apache -g apache
cd /usr/src/
wget http://archive.apache.org/dist/httpd/httpd-2.4.17.tar.gz
tar xzf httpd-2.4.17.tar.gz
./configure --prefix="/usr/local/httpd" --enable-module=so --enable-mods-shared=
"core http_core mod_authn_file mod_authn_core mod_authz_host mod_authz_user mod_
authz_core mod_authnz_ldap mod_access_compat mod_auth_basic mod_socache_shmcb mo
d_filter mod_deflate mod_mime util_ldap mod_log_config mod_logio mod_env mod_exp
ires mod_headers mod_setenvif mod_proxy mod_session event mod_unixd mod_autoinde
x mod_cgid mod_dir mod_alias mod_rewrite mod_ssl" --with-included-apr --with-ss
l=/usr/local/ --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc/httpd
make
make install
cd modules/filters/
vi /usr/bin/apr-1-config
LDFLAGS="-lz" #add -lz
/usr/bin/apxs -c mod_deflate.c
cp .libs/mod_deflate.so /usr/local/httpd/modules/
cd /usr/src/
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
tar xzf mod_fastcgi-current.tar.gz
cd mod_fastcgi-2.4.6
wget wget https://raw.github.com/ByteInternet/libapache-mod-fastcgi/byte/debian/
patches/byte-compile-against-apache24.diff
patch -p1 < byte-compile-against-apache24.diff
cp Makefile.AP2 Makefile
make top_dir=/usr/local/httpd
mv /usr/local/httpd/cgi-bin/test-cgi /usr/local/httpd/cgi-bin/php-cgi
vi /etc/httpd/httpd.conf
Add
Include /etc/httpd/conf.d/*.conf
LoadModule fastcgi_module modules/mod_fastcgi.so
LoadModule deflate_module modules/mod_deflate.so
Change
Listen 80 -> Listen 8080
Add at the end
<IfModule mod_fastcgi.c>
ScriptAlias /fcgi-bin/ "/usr/local/httpd/cgi-bin/"
FastCGIExternalServer /usr/local/httpd/cgi-bin/php-cgi -host 127.0.0.1:9
000 -pass-header Authorization
AddHandler php-fastcgi .php .phtml
Action php-fastcgi /cgi-bin/php-cgi
</IfModule>
Uncomment
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule actions_module modules/mod_actions.so
<IfModule dir_module>
DirectoryIndex index.html index.php # Add index.php
</IfModule>
cp /usr/sbin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd
Add these lines after #!/bin/sh
#
#
#
#
#
#
#
#
#
cd ~
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch
.rpm
rpm -ivh epel-release-6-8.noarch.rpm
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.
x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install perl-devel libxml2-devel bzip2-devel curl-devel libpng-devel libjpeg
-devel db4-devel libXpm-devel gmp-devel libc-client-devel openldap-devel unixODB
C-devel sqlite-devel aspell-devel net-snmp-devel libxslt-devel t1lib-devel.x86_
64 libtidy libtidy-devel freetype-devel libmcrypt-devel.x86_64 memcached varnish
telnet
groupadd www-data
useradd www-data -g www-data
cd /usr/src/
http://ar2.php.net/distributions/php-5.4.37.tar.gz
tar xzf php-5.4.37.tar.gz
vi /etc/httpd/conf.d/onecall.conf
<VirtualHost *:8080>
ServerName onecall.hostname.loc
DocumentRoot /var/www/onecall/public/hostname
<Directory /var/www/onecall/public/hostname>
AllowOverride All
Require all granted
SetEnv APPLICATION_ENV local
RewriteEngine On
RewriteBase /
RewriteCond
RewriteRule
RewriteCond
RewriteRule
RewriteCond
RewriteCond
RewriteCond
RewriteRule
RewriteRule
RewriteRule
</Directory>
</VirtualHost>
chkconfig
chkconfig
chkconfig
chkconfig
service
service
service
service
%{REQUEST_FILENAME} -s [OR]
%{REQUEST_FILENAME} -l [OR]
%{REQUEST_FILENAME} -d
^.*$ - [NC,L]
^.*$ index.php [NC,L]
^(.*js|css)(\?ver=)(.*)$ $1 [L]
httpd on
varnish on
php-fpm on
memcached on
varnish start
memcached start
httpd start
php-fpm start