This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handle_ds_json(data) { | |
$('#belly').css({ background: 'none' }); | |
var bellyContent = $('#belly > #left'); | |
var posts = data.posts; | |
for(p in posts) { | |
var tmp = ''; | |
tmp = '<a href="'+posts[p].url+'" target="_blank">'; | |
tmp += '<h3>'+posts[p].title+'</h3>'; | |
tmp += '</a>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://dailysocial.net/api/get_recent_posts/?callback=handle_ds_json&count=5"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Load Balancer: | |
- 16 Core | |
- 4 GB RAM | |
- CentOS | |
- nginx | |
- PHP-FPM | |
App Server: | |
- 4 Core | |
- 1 GB RAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Load Balancer: | |
- CentOS | |
- nginx | |
- PHP-FPM | |
App Server: | |
- CentOS | |
- PHP-FPM | |
CDN Server: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cp -r /var/www/website /dev/shm | |
$ chown -R nginx:nginx /dev/shm/website |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/rc.local | |
cp -r /var/www/website /dev/shm | |
chown -R nginx:nginx /dev/shm/website |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/yum.repos.d/nginx.repo | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ | |
gpgcheck=0 | |
enabled=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/yum.repos.d/CentOS-Base.repo | |
[base] | |
name=CentOS-$releasever - Base | |
#mirrorlist=http://kambing.ui.ac.id/?release=$releasever&arch=$basearch&repo=os | |
baseurl=http://kambing.ui.ac.id/centos/$releasever.3/os/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
#released updates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rpm -Uvh http://epel.repo.unpas.ac.id/6/i386/epel-release-6-7.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ yum -y upgrade --enablerepo=epel,remi | |
$ yum -y groupinstall "Development Tools" --enablerepo=epel,remi | |
$ yum -y --enablerepo=epel,remi install php php-gd php-mcrypt php-pear php-devel php-mbstring php-fpm php-pecl-apc php-pecl-memcache nginx install libxml2-devel bzip2-devel libcurl-devel libjpeg-devel libpng-devel libmcrypt-devel mysql-devel libtool-ltdl-devel bind-utils wget curl |