2. yum -y update
3.remove apache
4.install c++
yum groupinstall 'Development Tools'
contoh c++:compile:
5.install mysql
yum install mysql-server
/etc/init.d/mysqld restart
/usr/bin/mysql_secure_installation
yum install nginx
/etc/init.d/nginx start
yum install php-fpm php-mysql
vi /etc/php.ini
cgi.fix_pathinfo=0
source:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-6
6.install fcgiwrap
source:
https://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-centos-6.0-p2
yum install fcgi-devel
cd /usr/local/src/ git clone git://github.com/gnosek/fcgiwrap.git cd fcgiwrap autoreconf -i ./configure make make install
yum install spawn-fcgi
vi /etc/sysconfig/spawn-fcgi
*modif sampai spt ini:
# You must set some working options before the "spawn-fcgi" service will work. # If SOCKET points to a file, then this file is cleaned up by the init script. # # See spawn-fcgi(1) for all possible options. # # Example : #SOCKET=/var/run/php-fcgi.sock #OPTIONS="-u apache -g apache -s $SOCKET -S -M 0600 -C 32 -F 1 -P /var/run/spawn-fcgi.pid -- /usr/bin/php-cgi" FCGI_SOCKET=/var/run/fcgiwrap.socket FCGI_PROGRAM=/usr/local/sbin/fcgiwrap FCGI_USER=nginx FCGI_GROUP=nginx FCGI_EXTRA_OPTIONS="-M 0700" OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"
tambahkan di posisi server{}
location /cgi-bin/ { # Disable gzip (it makes scripts feel slower since they have to complete # before getting gzipped) gzip off; # Set the root to /usr/lib (inside this location this means that we are # giving access to the files under /usr/lib/cgi-bin) root /var/www/www.example.com; # Fastcgi socket fastcgi_pass unix:/var/run/fcgiwrap.socket; # Fastcgi parameters, include the standard ones include /etc/nginx/fastcgi_params; # Adjust non standard parameters (SCRIPT_FILENAME) fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }
reload:
/etc/init.d/nginx reload
No comments:
Post a Comment