Instalasi Webuzo

Anggaplah sudah ada ip, user sama pass VPS

Login dengan putty atau bitvise

Instal wget jika belum terinstall yum install wget -y
install nano yum install nano -y
Download Webuzo installer wget -N http://files.webuzo.com/install.sh
Ubah permission chmod 0755 install.sh
Jalankan installer Webuzo ./install.sh
Tunggu hingga proses instal Webuzo rampung

————————————————————-lanjut di broswer

Selesaikan proses instalasi dengan membuka via browser http://x.x.x.x:2004 dimana x.x.x.x adalah IP dari server anda (cek dan perhatikan output setelah selesai tahap nomor 5)
Setelah terbuka di browser anda akan mendapati Webuzo initial setup. Silahkan isikan dengan data yg benar dan valid. Pada primary domain isikan dg IP VPS ANDA, Pada isian Nameserver 1 dan 2 isikan NS sembarang saja, kalau saya isinya ns1.digitalocean.com dan ns2.digitalocean.com kalau ramnode NS1.RAMNODE.COM NS2.RAMNODE.COM sesuaikan saja. sebenarnya tidak pengaruh karena kita ngk gunain domain diawal ini. License key kosongkan saja karena kita akan memakai free license

Mudah sekali kan? Next, silahkan klik tombol “Install” dan tunggu beberapa menit hingga muncul “Installation completed successfully”
Loginlah via browser http://x.x.x.x:2004
Arahkan kursor ke Setting > General > Centang pilihan bahwa server yg digunakan adalah VPS
Selanjutnya klik tombol “Edit Settings” untuk menyimpannya (paling bawah)
Bukalah Enduser panel lewat browser http://x.x.x.x:2002. Dari panel tsb nanti anda bisa menambahkan domain, edit DNS zone, membuat database, setting email, instal aplikasi dan script (auto), dan lain2. Namun ikuti dulu tahapan berikutnya dibawah ini bagi yang mau mindahin ke nginx dan install wordpress.

=WORDPRESS WEBUZO=

Login kedalam Webuzo panel http://x.x.x.x:2002
Kita akan instal WordPress via console, mari login ke server dg Putty atau bitvise
Masuklah ke direktori domain dimana anda ingin instal WordPress. cd /home/kampret/public_html/xxxx dimana kampret adalah username Webuzo yg sudah dibuat pada proses instal dan xxxx adalah addon domain atau domain2 lain yg anda tambahkan kemudian
Download script wordpress wget http://wordpress.org/latest.zip
Ekstrak file tsb unzip latest.zip
Pindahkan semua isi file wordpress ke direktori root domain cp -rf ./wordpress/* .
Copy file sample konfigurasi wordpress cp wp-config-sample.php wp-config.php
Kembali ke Webuzo dan buatlah sebuah database untuk instalasi wordpress
Buatlah user utk database tsb dan tambahkan user ke database wordpress yg sudah dibuat. Jangan lupa catat passwordnya karena nanti akan ditambahkan pada file wp-config.php
Beri all privileges kepada user
Kembali ke console (langkah nomor 7) dan editlah file tsb vim wp-config.php
Tambahkan nama database, user database dan passwordnya kedalam file tsb lalu save
Lanjutkan instalasi WordPress dg membuka pada browser http://xxxx dimana xxxx adalah domain yg sudah terpasang di server yg ingin diinstali blog dg platform wordpress. Ikuti instruksi yg ada pada halaman instal tsb dan selesai.
Agar tidak terjadi error pada permalinks (404 not found) maka ubah ownership domain beserta isinya menurut username Webuzo, contoh chown -R kampret:kampret /home/kampret/public_html/xxxx atau jika pada primary domain chown -R kampret:kampret /home/kampret/public_html/xxxx (kampret adalah username)
Sekarang blog wordress anda sudah up dan siap digunakan utk blogging, mengeruk dollar, dll.  Login dulu ke dashboard wp untuk kustomisasi blog anda (ganti theme, instal plugin, dll) di http://xxxx/wp-admin (xxxx = domain anda)

=GANTI APACE KE NGINX=

Bagi yang mau mengganti APACE di webuzo ke NGINX atau bagi yang mengalami 500 Internal Server Error

Login ke panel http://x.x.x.x:2002
Instal NGINX dan centang set as default (enduser panel -> APPS -> Web Servers)
Buang Apache: yum remove httpd -y
Agar tidak 404 not found, lanjutkan

Loginlah sebagai root ke ssh server anda kemudian buka mantra berikut ini:

nano /usr/local/apps/nginx/etc/conf.d/common

Setelah terbuka, tambahkan  baris ini:

location / {try_files $uri $uri/ /index.php?q=$request_uri&$args;}

menyimpannya ctrl+x kemudian tekan y dan ENTER

Simpan kembali lalu restart NGINX webserver:service nginx restart

TAMBAHAN:

-untuk merestart dan melihat service apa saja yang berjalan di webuzo anda bisa ke end user di webuzo dan cari service. dari sini anda bisa menghentikan/menjalankan atau merestart service : nginx, apace, php, dan lain-lain.

-untuk melihat password phpMyAdmin pada terminal putty atau bitvise ketikan perintah

nano /var/webuzo/my.conf

jika perintah nano tidak bekerja

yum install nano

catet atau copy passwordnya dan login ke phpMyAdmin dengan user root dan pass yang disimpan tadi.

sumber: diedit dikit dari ari-f*com untuk penyesuainan pengguna AGC..

-Salam Persekongkolan-

Update wordpress post_date to random date with SQL

Replace wordpress post_date to random date,
open phpmyadmin, click SQL, run with this code

UPDATE wp_posts SET post_date = '2014-08-02 00:00:00' + interval rand()*120 day + interval rand()*36000 second

update wp_posts set post_date_gmt = post_date;
update wp_posts set post_modified = post_date;
update wp_posts set post_modified_gmt = post_date;

This can be change all post date, start from 2014-08-02 00:00:00 to 120 days later

This ok tested

Optimasi Modem ADSL Speedy

  • 1. Reset Modem terlebih dahulu agar mendapatkan settingan default
  • 2. Setting modem sampai bisa browsing
  • 2. masuk kemenu modem, cari opsi UPNP dan Disable, atau non Ceklist pada point UPnP
  • 3. ADSL Setting menggunakan G.DMT , jangan auto
  • 4. Disable bitswap
  • 5. Disable SRA
  • 6. Reboot/ Restart modem
  • Merge all CSV or TXT files in a folder

    Merge all CSV or TXT files in a folder in
    one worksheet

    Example 1

    Merge all data from the csv files in a folder into a text file

    Note: with a few small changes you can also use this for
    txt files. Replace *.csv for *.txt

    1) Windows Start
    Button | Run
    2) Type cmd
    and hit enter (“command” in Win 98)
    3) Go to the folder
    with the CSV files (for help how to do that enter “help cd”)
    4)
    Type copy *.csv all.txt and hit enter to copy
    all data in the files into all.txt.
    5) Type
    exit and hit enter to close the DOS window

    Now we must import the text file all.txt
    into Excel.

    1) Open Excel
    2)
    When you use File Open to open all.txt the Text Import Wizard will help you
    import the file
    3) Choose Delimited
    4)
    Next
    5) Check Comma
    6) Finish

     

    Example 2

    This code will ask you to browse to the folder with the csv files and
    after you click OK in this dialog
    it merge all data into a txt file and
    then import and save it into a Excel file for you.

    Copy the code
    below into a normal module of a workbook :

    Alt-F11
    Insert>Module
    Paste the macro
    Alt q to go back to Excel
    Alt F8 to open your macro
    list
    Select Merge_CSV_Files and press Run

    There is no need to change anything in the code example for csv files to
    test it.
    But read the Tips below the macro if you not get the result you
    want.

    Option Explicit
    
    #If VBA7 Then
        Private Declare PtrSafe Function OpenProcess Lib "kernel32" _
            (ByVal dwDesiredAccess As Long, _
            ByVal bInheritHandle As Long, _
            ByVal dwProcessId As Long) As Long
    
        Private Declare PtrSafe Function GetExitCodeProcess Lib "kernel32" _
            (ByVal hProcess As Long, _
            lpExitCode As Long) As Long
    #Else
        Private Declare Function OpenProcess Lib "kernel32" _
            (ByVal dwDesiredAccess As Long, _
            ByVal bInheritHandle As Long, _
            ByVal dwProcessId As Long) As Long
    
        Private Declare Function GetExitCodeProcess Lib "kernel32" _
            (ByVal hProcess As Long, _
            lpExitCode As Long) As Long
    #End If
    
    Public Const PROCESS_QUERY_INFORMATION = &H400
    Public Const STILL_ACTIVE = &H103
    
    Public Sub ShellAndWait(ByVal PathName As String, Optional WindowState)
        Dim hProg As Long
        Dim hProcess As Long, ExitCode As Long
        'fill in the missing parameter and execute the program
        If IsMissing(WindowState) Then WindowState = 1
        hProg = Shell(PathName, WindowState)
        'hProg is a "process ID under Win32. To get the process handle:
        hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, hProg)
        Do
            'populate Exitcode variable
            GetExitCodeProcess hProcess, ExitCode
            DoEvents
        Loop While ExitCode = STILL_ACTIVE
    End Sub
    
    Sub Merge_CSV_Files()
        Dim BatFileName As String
        Dim TXTFileName As String
        Dim XLSFileName As String
        Dim FileExtStr As String
        Dim FileFormatNum As Long
        Dim DefPath As String
        Dim Wb As Workbook
        Dim oApp As Object
        Dim oFolder
        Dim foldername
    
        'Create two temporary file names
        BatFileName = Environ("Temp") & _
                "\CollectCSVData" & Format(Now, "dd-mm-yy-h-mm-ss") & ".bat"
        TXTFileName = Environ("Temp") & _
                "\AllCSV" & Format(Now, "dd-mm-yy-h-mm-ss") & ".txt"
    
        'Folder where you want to save the Excel file
        DefPath = Application.DefaultFilePath
        If Right(DefPath, 1) <> "\" Then
            DefPath = DefPath & "\"
        End If
    
        'Set the extension and file format
        If Val(Application.Version) < 12 Then
            'You use Excel 97-2003
            FileExtStr = ".xls": FileFormatNum = -4143
        Else
            'You use Excel 2007 or higher
            FileExtStr = ".xlsx": FileFormatNum = 51
            'If you want to save as xls(97-2003 format) in 2007 use
            'FileExtStr = ".xls": FileFormatNum = 56
        End If
    
        'Name of the Excel file with a date/time stamp
        XLSFileName = DefPath & "MasterCSV " & _
                      Format(Now, "dd-mmm-yyyy h-mm-ss") & FileExtStr
    
        'Browse to the folder with CSV files
        Set oApp = CreateObject("Shell.Application")
        Set oFolder = oApp.BrowseForFolder(0, "Select folder with CSV files", 512)
        If Not oFolder Is Nothing Then
            foldername = oFolder.Self.Path
            If Right(foldername, 1) <> "\" Then
                foldername = foldername & "\"
            End If
    
            'Create the bat file
            Open BatFileName For Output As #1
            Print #1, "Copy " & Chr(34) & foldername & "*.csv" _
                    & Chr(34) & " " & TXTFileName
            Close #1
    
            'Run the Bat file to collect all data from the CSV files into a TXT file
            ShellAndWait BatFileName, 0
            If Dir(TXTFileName) = "" Then
                MsgBox "There are no csv files in this folder"
                Kill BatFileName
                Exit Sub
            End If
    
            'Open the TXT file in Excel
            Application.ScreenUpdating = False
            Workbooks.OpenText Filename:=TXTFileName, Origin:=xlWindows, StartRow _
                    :=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
                    ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True, _
                    Space:=False, Other:=False
    
            'Save text file as a Excel file
            Set Wb = ActiveWorkbook
            Application.DisplayAlerts = False
            Wb.SaveAs Filename:=XLSFileName, FileFormat:=FileFormatNum
            Application.DisplayAlerts = True
    
            Wb.Close savechanges:=False
            MsgBox "You find the Excel file here: " & vbNewLine & XLSFileName
    
            'Delete the bat and text file you temporary used
            Kill BatFileName
            Kill TXTFileName
    
            Application.ScreenUpdating = True
        End If
    End Sub

    Format or skip columnsIf you want to format or skip a
    columns then you see you can add FieldInfo in OpenText like
    FieldInfo:=Array(Array(1, 2), Array(3, 4))

    This example change the format of column 1 and 3 (column number, format
    number)
    This are the format numbers

    1:          General
    2:         
    Text
    3:         
    Month-Day-Year
    4:         
    Day-Month-Year
    5:         
    Year-Month-Day
    6:         
    Month-Year-Day
    7:         
    Day-Year-Month
    8:         
    Year-Day-Month
    9:         
    Skip column

     

    Merge txt files instead of csv files

    Replace

    Print #1, “Copy ” & Chr(34) &
    foldername & “*.csv” _

    With

    Print
    #1, “Copy ” & Chr(34) & foldername & “*.txt” _

    If you use it for txt files then you can change the delimiter or maybe
    you want to use FixedWidth.
    The best thing you can do is to record a
    macro when you import one txt file manual.
    Then look at the recorded code
    and add the code lines to Workbooks.OpenText .

     

    Source: http://coweb.cc.gatech.edu/ice-gt/339

    Hotlink Images htaccess

    Example: Your site url is www.mysite.com. To stop hotlinking of your images from other sites and display a replacement image called nohotlink.jpe placed in your images directory, place this code in your .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

    The first line of the above code begins the rewrite. The second line matches any requests from your own mysite.com url. The [NC] code means “No Case”, meaning match the url regardless of being in upper or lower case letters. The third line means allow empty referrals. The last line matches any files ending with the extension jpeg, jpg, gif, bmp, or png. This is then replaced by the nohotlink.jpe file in your images directory. This JPEG image is using the extension jpe instead of jpg to prevent blocking your own replacement image.

    To stop hotlinking from specific outside domains only, such as myspace.com, blogspot.com and livejournal.com, but allow any other web site to hotlink images:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC]
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

    You can add as many different domains as needed. Each RewriteCond line should end with the [NC,OR] code. NC means to ignore upper and lower case. OR means “Or Next”, as in, match this domain or the next line that follows. The last domain listed omits the OR code since you want to stop matching domains after the last RewriteCond line.

    You can display a 403 Forbidden error code instead of an image. Replace the last line of the previous examples with this line:

    RewriteRule .*\.(jpe?g|gif|bmp|png)$ – [F]

    Warning: Do not use .htaccess to redirect image hotlinks to another HTML page or server that isn’t your own (such as this web page). Hotlinked images can only be replaced by other images, not with an HTML page.

    As with any htaccess rewrites, you may block some legitimate traffic (such as users behind proxies or firewalls) using these techniques.

    Disable Post Revisions for WordPress

    WordPress defaults WP_POST_REVISIONS to true (enable post revisions). If you want to disable the awesome revisions feature, use this setting:

    define('WP_POST_REVISIONS', false );

    If you want to specify a maximum number of revisions, change false to an number

    define('WP_POST_REVISIONS', 3);

    Use this setting for wp-config.php

    to Delete post revisions using SQL command, use this code:

    DELETE FROM wp_posts WHERE post_type = "revision";

    Delete Post Revisions using SQL Command

    Login to phpmyadmin, Run a SQL Query for Deleting Post Revision Rows

    Copy paste this code to SQL, and then click go


    DELETE a,b,c
    FROM wp_posts a
    LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id)
    LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
    LEFT JOIN wp_term_taxonomy d ON ( b.term_taxonomy_id = d.term_taxonomy_id)
    WHERE a.post_type = 'revision'
    AND d.taxonomy != 'link_category';

    Search and Replace WordPress using SQL Command

    The format is easy to understand and can of course be used with any MySQL table, not just WordPress:

    UPDATE [your_table_name] SET [your_table_field] = REPLACE([your_table_field], '[string_to_find]' , '[string_to_be_replaced]');

    Example:

    UPDATE wp_posts SET post_content = REPLACE(post_content, 'string_yg_diganti', 'string_pengganti');

    Replace searches for certain characters in a string and replaces them with other characters. So this statement:

    SELECT Replace('blablabla Rocks!', 'Rocks', 'Rolls');

    will return

    blablabla Rolls!