|
|
| |||||||
| Site & Server Administration Server Yönetimi hakkında, .htaccess, Apache configuration ve log analiz, güvenlik |
| |
|
| | | LinkBack | Seçenekler |
| |||
| panelsiz vps kullanıyordum(512 mb) galiba ram yetersizliğinden apache kesilip duruyordu, sonra apache yi kaldırıp nginx yükledim ram 250 mb ın üstünü hiç görmüyor ve sitelerin açılış hızı da arttı , performans için serverınıza nginx yükleyin derim... bu sayfadakileri sırayla yaparak sorunsuz yüklenebiliyor. Red Hat / CentOS Install nginx PHP5 FastCGI Webserver Step # 1: Enable EPEL repo ngnix is not included in the base system. Turn on EPEL repo to install nginx stable release: Kod: rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/$(uname -m)/epel-release-5-3.noarch.rpm Type the following command at a shell prompt: Kod: yum install nginx Loaded plugins: downloadonly, fastestmirror, priorities, protectbase Loading mirror speeds from cached hostfile * epel: archive.linux.duke.edu * base: ftp.linux.ncsu.edu * updates: centos.mirror.nac.net * addons: mirror.cs.vt.edu * extras: centos.mirror.nac.net 0 packages excluded due to repository protections Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package nginx.x86_64 0:0.6.34-1.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================== ================================================== ================================================== ======== Package Arch Version Repository Size ================================================== ================================================== ================================================== ======== Installing: nginx x86_64 0.6.34-1.el5 epel 319 k Transaction Summary ================================================== ================================================== ================================================== ======== Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total size: 319 k Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : nginx [1/1] Installed: nginx.x86_64 0:0.6.34-1.el5 Complete! nginx configuration file
Type the following to install php5 with other modules: Kod: yum install php-pear-Net-Socket php-pear php-common php-gd php-devel php php-mbstring php-pear-Mail php-cli php-imap php-snmp php-pdo php-xml php-pear-Auth-SASL php-ldap php-pear-Net-SMTP php-mysql Type the following command: Kod: yum install spawn-fcgi Kod: wget http://bash.cyberciti.biz/dl/419.sh.zip unzip 419.sh.zip mv 419.sh /etc/init.d/php_cgi chmod +x /etc/init.d/php_cgi Kod: /etc/init.d/php_cgi start netstat -tulpn | grep :9000 tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 14294/php-cgi By default php server listens on 127.0.0.1:9000 port. Finally, update /etc/nginx/nginx.conf as follows: Kod: vi /etc/nginx/nginx.conf location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name; include fastcgi_params; } Save and close the file. Restart nginx: Kod: service nginx restart Kod: <?php phpinfo(); ?> Konu gzou tarafından (06-02-2010 Saat 22:24:15 ) değiştirilmiştir.. |
![]() |
| Bookmarks |
| Seçenekler | |
| |