Nginx web server and HHVM

 

PREFACE

Ulimit –n 200000

 

Edit file

vim /etc/security/limits.conf

 

*              –               nofile                 200000

==============================================================

NGINX CONF

==============================================================

user www-data;

worker_processes 24;

pid /var/run/nginx.pid;

events {

worker_connections 4000;

#worker_rlimit_nofile 200000;

multi_accept on;

use epoll;

}

worker_rlimit_nofile 200000;

http {

sendfile on;

tcp_nopush on;

tcp_nodelay on;

keepalive_timeout 65;

types_hash_max_size 2048;

# server_tokens off;

# server_names_hash_bucket_size 64;

# server_name_in_redirect off;

include /etc/nginx/mime.types;

default_type application/octet-stream;

proxy_cache_path /cache/web levels=1:2 keys_zone=web:20m inactive=60m max_size=800m;

access_log /var/log/nginx/access.log;

error_log /var/log/nginx/error.log;

gzip on;

gzip_static on;

gzip_disable “msie6”;

gzip_vary on;

gzip_proxied any;

gzip_comp_level 6;

gzip_buffers 32 16k;

gzip_http_version 1.1;

gzip_types font/x-woff application/x-font-ttf image/png image/x-icon image/jpeg text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

include /etc/nginx/conf.d/*.conf;

include /etc/nginx/sites-enabled/*;

}

INSTALL HHVM

 

$ sudo apt-get update

$ sudo apt-get install -y unzip vim git-core curl wget build-essential

$ sudo add-apt-repository -y ppa:nginx/mainline

Ubuntu 12.04:

$ sudo add-apt-repository -y ppa:mapnik/boost

$ wget -O – http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add –

$ echo deb http://dl.hhvm.com/ubuntu precise main | sudo tee /etc/apt/sources.list.d/hhvm.list

$ sudo apt-get update

$ sudo apt-get install -y hhvm

Ubuntu 14.04:

$ wget -O – http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add –

$ echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list

$ sudo apt-get update

$ sudo apt-get install -y hhvm

$ sudo /usr/share/hhvm/install_fastcgi.sh

$ sudo /etc/init.d/nginx restart

$ sudo /etc/init.d/apache restart (IF YOU USE THIS!!)

$ sudo /etc/init.d/hhvm restart

$ sudo update-rc.d hhvm defaults

$ sudo /usr/bin/update-alternatives –install /usr/bin/php php /usr/bin/hhvm 60

$ sudo /usr/share/hhvm/install_fastcgi.sh

$ sudo update-rc.d hhvm defaults

NOW restart hhvm using this command

$ sudo service hhvm restart

$ sudo apt-get install php5-memcached memcached

vim /etc/memcached.conf

  • -c 10240

 

extension = memcached.so ß add this conf to php.ini (/etc/hhvm/php.ini) jika menggunakan fitur memcached

 

 

php.ini file

 

 

<?php

/*

HHVMinfo – phpinfo page for HHVM HipHop Virtual Machine

Author: _ck_

License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements

Version: 0.0.6

 

* revision history

0.0.6 2014-08-02 display fix for empty vs zero

0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements

0.0.4 2014-07-30 calculate uptime from pid (may not work in all environments), fixed meta links

0.0.3 2014-07-29 display better interpretation of true, false, null and no value

0.0.2 2014-07-28 first public release

 

* known HHVM limitation as of 3.2

– cannot use eval, preg_replace/e, or create_function in RepoAuthoritative mode

– cannot disable or reduce file stat frequency (without RepoAuthoritative mode)

– cannot custom format error log or use catch_workers_output

– cannot use phpinfo, php_ini_loaded_file, get_extension_funcs

https://github.com/facebook/hhvm/labels/php5%20incompatibility

 

*/

?><!DOCTYPE html>

<html>

<head>

<title>HHVMinfo</title>

<meta name=”ROBOTS” content=”NOINDEX,NOFOLLOW,NOARCHIVE” />

<style type=”text/css”>

body { background-color: #fff; color: #000; }

body, td, th, h1, h2 { font-family: sans-serif; }

pre { margin: 0px; font-family: monospace; }

a:link,a:visited { color: #000099; text-decoration: none; }

a:hover { text-decoration: underline; }

table { border-collapse: collapse; border: 0; width: 934px; box-shadow: 1px 2px 3px #ccc; }

.center { text-align: center; }

.center table { margin: 1em auto; text-align: left; }

.center th { text-align: center !important; }

.middle { vertical-align:middle; }

td, th { border: 1px solid #666; font-size: 75%; vertical-align: baseline; padding: 4px 5px; }

h1 { font-size: 150%; }

h2 { font-size: 125%; }

.p { text-align: left; }

.e { background-color: #ccccff; font-weight: bold; color: #000; width:300px; }

.h { background-color: #9999cc; font-weight: bold; color: #000; }

.v { background-color: #ddd; max-width: 300px; overflow-x: auto; }

.v i { color: #777; }

.vr { background-color: #cccccc; text-align: right; color: #000; white-space: nowrap; }

.b { font-weight:bold; }

.white, .white a { color:#fff; }

hr { width: 934px; background-color: #cccccc; border: 0px; height: 1px; color: #000; }

.meta, .small { font-size: 75%; }

.meta { margin: 2em 0; }

.meta a, th a { padding: 10px; white-space:nowrap; }

.buttons { margin:0 0 1em; }

.buttons a { margin:0 15px; background-color: #9999cc; color:#fff; text-decoration:none; padding:1px; border:1px solid #000; display:inline-block; width:6em; text-align:center; box-shadow: 1px 2px 3px #ccc; }

.buttons a.active { background-color: #8888bb; box-shadow:none; }

</style>

</head>

 

<body>

<div class=”center”>

 

<h1><a href=”?”>HHVMinfo</a></h1>

 

<div class=”buttons”>

<a href=”?INI&EXTENSIONS&FUNCTIONS&CONSTANTS&GLOBALS”>ALL</a>

<a <?php echo isset($_GET[‘INI’])?’class=”active”‘:” ?>” href=”?INI”>ini</a>

<a <?php echo isset($_GET[‘EXTENSIONS’])?’class=”active”‘:” ?> href=”?EXTENSIONS”>Extensions</a>

<a <?php echo isset($_GET[‘FUNCTIONS’])?’class=”active”‘:” ?> href=”?FUNCTIONS”>Functions</a>

<a <?php echo isset($_GET[‘CONSTANTS’])?’class=”active”‘:” ?> href=”?CONSTANTS”>Constants</a>

<a <?php echo isset($_GET[‘GLOBALS’])?’class=”active”‘:” ?> href=”?GLOBALS”>Globals</a>

</div>

 

<?php

 

$globals=array_keys( $GLOBALS );

 

if ( empty($_GET) || count($_GET)>4 || isset($_GET[‘SUMMARY’]) ) {

if ( ($pidfile=ini_get(‘pid’)) || ($pidfile=ini_get(‘hhvm.pid_file’)) ) {

$uptime=($pidfile)&&($mtime=@filemtime($pidfile))?(new DateTime(‘@’.$mtime))->diff(new DateTime(‘NOW’))->format(‘%a days, %h hours, %i minutes’):'<i>unknown<i>’;

if ( !($inifile=(function_exists(‘php_ini_loaded_file’)?php_ini_loaded_file():”)) && ($pid=@file_get_contents($pidfile))

&& ($cmdline=@file_get_contents(“/proc/$pid/cmdline”)) ) { $inifile=preg_match(‘@-?-c(onfig)?\s*([^ ]+?)($|\s|–)@’,$cmdline,$match)?$match[2]:”; }

} else { $uptime=$inifile='<i>unknown</i>’; }

print_table( array(

‘Host’=>function_exists(‘gethostname’)?@gethostname():@php_uname(‘n’),

‘System’=>php_uname(),

‘PHP Version’=>phpversion(),

‘HHVM Version’=>ini_get(‘hphp.compiler_version’),

‘HHVM compiler id’=>ini_get(‘hphp.compiler_id’),

‘SAPI’=>php_sapi_name().’ ‘.ini_get(‘hhvm.server.type’),

‘Loaded Configuration File’=>$inifile,

‘Uptime’=>$uptime,

));

}

 

if ( isset($_GET[‘INI’]) && $ini=ini_get_all() ) {

ksort($ini); echo ‘<h2 id=”ini”>ini</h2>’; print_table($ini,array(‘Directive’,’Local Value’,’Master Value’,’Access’),false);

echo ‘<h2>access level legend</h2>’;

print_table(array(‘Entry can be set in user scripts, ini_set()’=>INI_USER,’Entry can be set in php.ini, .htaccess, httpd.conf’=>INI_PERDIR,

‘Entry can be set in php.ini or httpd.conf’=>INI_SYSTEM,'<div style=”width:865px”>Entry can be set anywhere</div>’=>INI_ALL ));

}

 

if ( isset($_GET[‘EXTENSIONS’]) && $extensions=get_loaded_extensions(true) ) {

echo ‘<h2 id=”extensions”>extensions</h2>’; natcasesort( $extensions); print_table($extensions,false,true);

}

 

if ( isset($_GET[‘FUNCTIONS’]) && $functions=get_defined_functions() ) {

echo ‘<h2 id=”functions”>functions</h2>’; natcasesort( $functions[‘internal’]); print_table($functions[‘internal’],false,true);

}

 

if ( isset($_GET[‘CONSTANTS’]) && $constants=get_defined_constants(true) ) {

ksort( $constants); foreach ( $constants as $key=>$value) { if (!empty($value)) { ksort( $value); echo ‘<h2 id=”constants-‘,$key,'”>Constants (‘,$key,’)</h2>’; print_table($value); } }

}

 

if ( isset($_GET[‘GLOBALS’]) ) {

if (0) { $_SERVER; $_ENV; $_SESSION; $_COOKIE; $_GET; $_POST; $_REQUEST; $_FILES; }    // PHP 5.4+ JIT

$order=array_flip(array(‘_SERVER’,’_ENV’,’_COOKIE’,’_GET’,’_POST’,’_REQUEST’,’_FILES’));

foreach ( $order as $key=>$ignore ) { if ( isset($GLOBALS[$key]) ) { echo ‘<h2 id=”‘,$key,'”>$’,$key,'</h2>’; if ( empty($GLOBALS[$key]) ) { echo ‘<hr>’; } else { print_table( $GLOBALS[$key]); } } }

natcasesort($globals); $globals=array_flip($globals); unset( $globals[‘GLOBALS’] );

foreach ( $globals as $key=>$ignore ) { if ( !isset($order[$key]) ) { echo ‘<h2 id=”‘,$key,'”>$’,$key,'</h2>’; if ( empty($GLOBALS[$key]) ) { echo ‘<hr>’; } else { print_table( $GLOBALS[$key]); } } }

}

 

?>

 

<div class=”meta”>

<a href=”http://hhvm.com/blog”>HHVM blog</a> |

<a href=”https://github.com/facebook/hhvm/wiki”>HHVM wiki</a> |

<a href=”https://github.com/facebook/hhvm/blob/master/hphp/NEWS”>HHVM changelog</a> |

<a href=”https://github.com/facebook/hhvm/commits/master”>HHVM commits</a> |

<a href=”http://webchat.freenode.net/?channels=hhvm”>#HHVM irc chat</a> |

<a href=”https://gist.github.com/ck-on/67ca91f0310a695ceb65?hhvminfo.php”>HHVMinfo latest</a>

</div>

 

</div></body></html>

 

<?php

 

function print_table( $array, $headers=false, $formatkeys=false, $formatnumeric=false ) {

if ( empty($array) || !is_array($array) ) { return; }

echo ‘<table border=”0″ cellpadding=”3″>’;

if ( !empty($headers) ) {

if ( !is_array( $headers) ) { $headers=array_keys( reset( $array) ); }

echo ‘<tr class=”h”>’; foreach ( $headers as $value) { echo ‘<th>’,$value,'</th>’; } echo ‘</tr>’;

}

foreach ( $array as $key=>$value ) {

echo ‘<tr>’;

if ( !is_numeric( $key) || !$formatkeys ) { echo ‘<td class=”e”>’,($formatkeys?ucwords(str_replace(‘_’,’ ‘,$key)):$key),'</td>’; }

if ( is_array($value) ) { foreach ($value as $column) { echo ‘<td class=”v”>’,format_special($column,$formatnumeric),'</td>’; } }

else { echo ‘<td class=”v”>’,format_special($value,$formatnumeric),'</td>’; }

echo ‘</tr>’;

}

echo ‘</table>’;

}

 

function format_special( $value, $formatnumeric ) {

if ( is_array($value) ) { $value='<i>array</i>’; }

elseif ( is_object($value) ) { $value='<i>object</i>’; }

elseif ( $value===true ) { $value='<i>true</i>’; }

elseif ( $value===false ) { $value='<i>false</i>’; }

elseif ( $value===NULL ) { $value='<i>null</i>’; }

elseif ( $value===0 || $value===0.0 || $value===’0′ ) { $value=’0′; }

elseif ( empty($value) ) { $value='<i>no value</i>’; }

elseif ( is_string($value) && strlen($value)>50 ) { $value=implode(‘​’,str_split($value,45)); }

elseif ( $formatnumeric && is_numeric($value) ) {

if ( $value>1048576 ) { $value=round($value/1048576,1).’M’; }

elseif ( is_float($value) ) { $value=round($value,1); }

}

return $value;

}

 

 

VHOST NGINX USING HHVM

 

server {

more_set_headers “Server: PETRUK”;

real_ip_header X-Forwarded-For;

#setenv.add-response-header =(“X-Proxy” => “PETRUK” )

proxy_set_header Host “PETRUK”;

#proxy_set_header       Host         $host;

listen 80;

server_name ……..;

root /var/www/;

index homepage.php;

include hhvm.conf;

location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {

expires max;

log_not_found off;

proxy_cache web;

proxy_cache_valid 200 302 60m;

proxy_cache_valid 404     1m;

}

location / {

if (!-e $request_filename) {

rewrite ^(.+)$ /homepage.php last;

}

}

location ~ \.php$ {

fastcgi_pass 127.0.0.1:9000; # redirect request to FastCGI server

#fastcgi_pass unix:/tmp/php5-fpm.sock; #for best tunning, karena menggunakan SOCK sendiri terpisah dengan protocol TCP IP

fastcgi_index homepage.php;

fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;

include fastcgi_params; # some required params

}

}

 

server {

listen 80;

server_name ……………;

root /var/www;

index index.php;

include hhvm.conf;

location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {

expires max;

log_not_found off;

}

 

location / {

try_files $uri $uri/ /ekonomi.php?/$request_uri;

#add_header X-my-header my-header-content;

add_header ‘Access-Control-Allow-Origin’ “$http_origin”;

}

# location / {

#       if (!-e $request_filename) {

#       rewrite ^(.+)$ /pasarmodal.php last;

#         }

# }

location ~ \.php$ {

fastcgi_pass 127.0.0.1:9000; # redirect request to FastCGI server

#fastcgi_pass unix:/tmp/php5-fpm.sock; #for best tunning, karena menggunakan SOCK sendiri terpisah dengan protocol TCP IP

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;

fastcgi_param APPLICATION_ENV staging;

include fastcgi_params; # some required params

}

}

 

                    

 

How to create webserver using lightpd, mysql and PHP5-FPM baseon on debian or ubuntu distro

ok lets start our lesson,

requirement :

1. OS = debian squezee (with repo indonesia)

2. PHP5-FPM

3. Database : Mysql server 5.0

add this repo’s

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

then add gnu pub key with this command : 

# gpg --keyserver keys.gnupg.net --recv-key 89DF5277
# gpg -a --export 89DF5277 | sudo apt-key add -
# aptitude get updat

Ok those’re the steps

1. Install lighttpd : #aptitude install lighttpd, for checking if it is work –> http://localhost or http://your ip

2. Now install phpmyadmin : #aptitude install phpmyadmin, now check your installation –> http://ip/phpmyadmin

3.

 

How To Create Your SVN Server

PreInstall

Server : Debian Squeeze

Repo Indonesia :

deb http://kambing.ui.ac.id/debian/ squeeze main contrib non-free
deb http://kambing.ui.ac.id/debian/ squeeze-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ squeeze/updates main contrib non-free
deb http://kambing.ui.ac.id/debian squeeze-proposed-updates main non-free contrib

Now update your server as usual # aptitude update

Install PHP5, APACHE2, SUBVERSION and TRAC

# apt-get install apache2 apache2-doc apache2-utils
# a2enmod rewrite
# a2enmod expires
# apt-get install libapache2-mod-php5 php5
# apt-get install php-pear php5-suhosin php5-xcache php5-mcrypt
# apt-get install php5-gd php5-memcache php5-mcrypt
# apt-get install mysql-server
# apt-get install php5-mysql

Now install subversion and trac

# apt-get install apache2 subversion trac
# apt-get install libapache2-svn
# apt-get install libapache2-mod-python
# mkdir /home/{trac,dev,svn}
# mkdir /home/dev/coba
# echo "<?php phpinfo() ?>" > /home/dev/coba/index.php
# svnadmin create /home/svn/inilah
# svn import -m "Initial import" /home/dev/coba/ file:///home/svn/coba/
# mv /home/dev/coba /home/dev/coba-orig
# svn checkout file:///home/svn/coba /coba/dev/inilah
# trac-admin /home/trac/coba initenv
  * Project Name [My Project]> coba
  * Repository type [svn]> svn
  * Path to repository [/path/to/repos]> /home/svn/coba
# htpasswd -c /etc/apache2/passwd-trac coba
# htpasswd -m /etc/apache2/passwd-trac userbaru
# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/projects
full fill with this 
=============================================================
<VirtualHost *:80>
    ServerAdmin hostmaster@saprol.com

    DocumentRoot /var/www/

    <Directory /var/www/>
        Order allow,deny
        Allow from all
    </Directory>

    ## LOG
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined

    ### TRAC Root : http://server/trac or http://server/trac/

        # Rewrite ./trac to ./trac/
        RewriteEngine on
        RewriteRule ^(.*)\/trac$ $1/ [NC]

    <Location /trac/>
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonInterpreter main
        PythonOption TracEnvParentDir /home/trac
        PythonOption TracUriRoot /trac/
        SetEnv PYTHON_EGG_CACHE /tmp
    </Location>

    ### TRAC Login : http://server/trac/*/login
    <LocationMatch ^(/trac/[^/]+)?/login>
        AuthType Basic
        AuthName "TRAC Login"
        AuthUserFile /etc/apache2/passwd-trac
        Require valid-user
    </LocationMatch>

    ### SVN repository : http://server/svn
    <Location /svn>
        DAV svn
        SVNParentPath /home/svn
        SVNListParentPath on

        AuthType Basic
        AuthName "SVN Repository"
        AuthUserFile /etc/apache2/passwd-trac
        Require valid-user
    </Location>
</VirtualHost>
=====================================================================
# a2enmod rewrite
# a2dissite default
# a2ensite projects
# /etc/init.d/apache2 restart
# chown -R www-data. /home/trac

Now access you SVN server with # svn co http://ipadd/svn/coba

Web Server Using LIGHTTPD and PHP5 FPM

ok lets start our journey ….

for indonesia use this repo

deb http://kambing.ui.ac.id/ubuntu/ precise main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise-updates main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise-security main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise-backports main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise-proposed main restricted universe multiverse

then update your server, im using ubuntu 12.04 LTS updating from Lucid

now install your lighty with this command

$ sudo apt-get install lighttpd

after installed test your localhost host, if it this work your browser show your lightty home page default,

Ok now install ur mySQL server with this command

$ sudo apt-get install mysql-server

now follow this command to install php5-fpm

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:brianmercer/php
$ sudo apt-get update
$ sudo apt-get install php5-fpm

now test your php fpm with

$ sudo /etc/init.d/php5-fpm restart

now lets start tunning LIGHTTPD, PHP FPM

now follow this command

cp /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi-fpm.conf
vim /etc/lighttpd/conf-available/10-fastcgi-fpm.conf

full fill with this

server.modules   += ( "mod_fastcgi" )
fastcgi.server    = ( ".php" =>
        ((
               "socket" => "/var/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket",
               "bin-path" => "/usr/bin/php-cgi"
        ))
)

now enable the module, horay it’s work ………..

now open

/etc/lighttpd/lighttpd.conf --> and add this code
server.max-fds = 2048
server.max-keep-alive-idle = 4
server.max-read-idle = 60
server.max-write-idle = 360
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.stat-cache-engine = "fam"
server.use-noatime = "enable"
server.max-worker = 4 #depends on your processor

now restart the service of lighttpd

and have nice the server

if you use memcached follow these instruction (for ubuntu 12.04 LTS)

1. download this packet http://download.tangent.org/libmemcached-0.44.tar.gz

2. extract the file into /usr/share/src

3. ok now, install memcahed (not lib, for the lib we can install later) use this command : aptitude install build-essential # apt-get  install php5-cli php5-dev php-pear

4. Then apt-get install memcached

5. ok, now go to /usr/share/scr –> use this command to install the libmemcached : # ./configure –prefix=/usr then make then make install

6. # pecl install memcacahed

7. go to your php.ini then add : extension = memcached.so

8. # vim /etc/memcached.conf   remark this line “-c 10240”

mounting windows share ke linux share …. pake SMB

Abstrak ,

Kmaren mikir gimana caranya windows share bisa di jalankan di linux server, mmmmmm lier juga tapi kenyataannya kagak juga, jadi gini share di windows aja dlu folder yang ingin di share, kemudian file share yg barusan di share ingin di manage di linux server, sekarang masuk ke console ketikan command seperti “mount -t smbfs -o username=USERWINDOWS,password=PASSWORD=NYA //IP WINDOWS/NAMA_FOLDER  target/folder/yang/dilinux” nah sekarang tinggal masukin ke etc/rc.local

udah deh ……….

Cara membatasi penyimpanan file MP3 di samba

Illustrasi,

Jika dalam file server user dibatasi untuk menyimpan file MP3 dalam hal ini file MP3 dilarang disimpan diserver. Berikut adalah caranya di SME Server,

buka console dan arahkan ke etc/smb/smb.conf kemudian pada baris setelah
path = /home/e-smith/files/ibays/[nama ibays]/files , tambahkan scrip dibawah ini
veto files =/*.inf/*.ink/*.mp3/*.db/*.avi/*.mpg/*.mpeg/*.exe/*.com/*.jpeg/*.gif/*.jpg/*.tif/*.bak/*.scr/*.ini/*.DLL/*.tmp/*.{*}/

restart service dengan “service smb restart”

inspirasi : http://pegallinux007.wordpress.com

How to Install squidGuard on SME Server 7x

i will fix the tuts from http://wiki.contribs.org/SquidGuard, ok, lets start

/sbin/e-smith/db yum_repositories set dag repository \
Name ‘Dag – EL4’ \
BaseURL ‘http://apt.sw.be/redhat/el4/en/$basearch/dag&#8217; \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled

Copy and paste those command in to your command shell, after that
paste this command signal-event yum-modify, then fololow those command bellow

wget http://smeserver.crazynetwork.it/contribs/jbennett/sme7/squidguard/RPMS/smeserver-squidguard-1.0-35.noarch.rpm

wget http://smeserver.crazynetwork.it/contribs/jbennett/sme7/squidguard/RPMS/squidguard-blacklists-20050528-2.smeserver.rf.noarch.rpm

yum localinstall smeserver-squidguard*.rpm –enablerepo=dag

rpm -Uvh squidguard-blacklists-20050528-2.smeserver.rf.noarch.rpm

signal-event post-upgrade; signal-event reboot

then your server will reboot, wait for a moment, now time to configure ur squid guard, run those command

config show squidguard
and you will see like this

squidguard=service
Blacklist=http://www.shallalist.de/Downloads/shallalist.tar.gz
Squidguard_Allow=trusted
Squidguard_Block=aggressive,drugs,gamble,hacking,porn,sex,untrusted,violence,warez
Squidguard_FullAccess=all
Squidguard_NoAccess=none
status=enabled

after that restart ur squid with this command service squid restart

now to prove ur squid guard was running try this command

tail -f /var/log/squidguard/squidguard.log –> shuold be like this

2011-10-27 21:59:28 [3638] squidGuard 1.2.0 started (1319727568.570)
2011-10-27 21:59:28 [3638] squidGuard ready for requests (1319727568.573)
2011-10-27 21:59:28 [3639] init urllist /var/lib/squidguard/db/warez/urls
2011-10-27 21:59:28 [3639] loading dbfile /var/lib/squidguard/db/warez/urls.db
2011-10-27 21:59:28 [3639] init domainlist /var/lib/squidguard/db/sex/lingerie/domains
2011-10-27 21:59:28 [3639] loading dbfile /var/lib/squidguard/db/sex/lingerie/domains.db
2011-10-27 21:59:28 [3639] init urllist /var/lib/squidguard/db/sex/lingerie/urls
2011-10-27 21:59:28 [3639] loading dbfile /var/lib/squidguard/db/sex/lingerie/urls.db
2011-10-27 21:59:28 [3639] squidGuard 1.2.0 started (1319727568.570)
2011-10-27 21:59:28 [3639] squidGuard ready for requests (1319727568.573)

then control + c,
if u wanna to block some web, run this command
vim /home/e-smith/files/squidguard/untrusted/domains –> add the websites wanna blocked then restart your squid

for database u can see in /var/lib/squidguard/db/

have nice try

or u can download this tuts squidGuard

adding repositories SME 7.5.1 into SME 8.xx

go to your console and paste this script

db yum_repositories set sme7contribs repository \
GPGCheck yes \
MirrorList http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smecontribs-7 \
Name ‘SME 7 – contribs’ \
Visible no \
status disabled
signal-event yum-modify
yum clean all

then see what apps that u wanna install click here

after finishing update by this script e.g i wanna install phpmyadmin, just do this script to install

yum –enablerepo=sme7contribs –enablerepo=smecontribs install smeserver-phpmyadmin

means smeserver-phpmyadmin is a name of packet

Perbaikan domain controller server pada client win7 menggunakan SME Server

pada waktu yang lalu penggunaan domain controller client  pada win 7 mengalami hambatan namun telah diperbaiki berikut adalah caranya

[root@orion ~]# db yum_repositories set SerNet repository \
BaseURL http://ftp.sernet.de/pub/samba/3.5/centos/4 \
EnableGroups yes \
GPGCheck no \
Name ‘SerNet Samba Team packages (CentOS 4)’ \
Visible yes \
status enabled
signal-event yum-modify

yum update
signal-event post-upgrade ; signal-event reboot

Kemudian ambil regeditnya di home/e-smith/files/server-resources/win7samba

Kemudian mulailah untuk join domain anda, jangan lupa untuk set enable roaming profilesnya

Artikel ini ditujukan bagi yang terbiasa menggunakan SME Server, dan artikel ini telah di coba juga dan berhasil

Menghubungkan Mysql server dengan software thirdparty “desktop base” under SME SERVER 7.x dan 8.x

Waktu kerja di Cardig International puyeng nyari cara ini, eh malem ini kepikiran lagi software yang dipake banyak contohnya : SqlYog, navicate SQL dll, ok langsung aja, buka blackconsole anda dan ketikan beberapa perintah dibawah ini

login as: root

root@192.168.9.9’s password:
Last login:

[root@orion ~]# config setprop mysqld LocalNetworkingOnly no
[root@orion ~]# mysql -e “\
> create database MyDB; \
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER \
> ON *.* \
> TO ‘MyUser’@’%’ \ –> inget ini user namenya
> IDENTIFIED BY ‘MyPW’; \ –> inget ini passwordnya
> FLUSH PRIVILEGES;”

dah kelar sekarang buka sofwarenya,

isi hostnya : ip server

Isi username :MyUser

Password     : MyPW

Tanpa panjang lebar langsung connect aja, langsung connect dah