Archive

Archive for the ‘Linux’ Category

Simple NGinX Config

January 7, 2015 Leave a comment

Simple configuration to host static file like images and act as proxy to pass php resquest to apache httpd.

NGinX Configuration:

#
# The default server
#
server {
    listen       80 default_server;
    server_name  _;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        root   /var/www/html/some_site/images_folder;
        index  index.html index.htm;
    }

    error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on http://some.site.com:8080
    #
    location ~ \.php$ {
        proxy_pass   http://some.site.com:8080;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}
Categories: Linux

Installing EPEL Repository (CentOS 6.x)

October 20, 2014 Leave a comment

You install the EPEL repository by downloading the appropriate RPM package for your system and installing it.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm

The Remi repository provides newer versions of the software in the core CentOS and Red Hat repositories. The Remi repository depends on the EPEL repository.

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 
sudo rpm -Uvh remi-release-6*.rpm

References:

Categories: Linux

Choosing CentOS Installation

December 21, 2013 Leave a comment

Recently when I wanted to install Centos in my Virtual Machine, I saw several options type of installation. Since it’s about server installation i want to to make sure it secure enough without installing unncessary packages. So I google to find it out. Here is the explanation about Centos Installation, and at last i choose ‘minimal’ :D. I found the explanation here

  • Desktop: base, basic-desktop, core, debugging, desktop-debugging, desktop-platform, directory-client, fonts, general-desktop, graphical-admin-tools, input-methods, internet-applications, internet-browser, java-platform, legacy-x, network-file-system-client, office-suite, print-client, remote-desktop-clients, server-platform, x11
  • Minimal Desktop: base, basic-desktop, core, debugging, desktop-debugging, desktop-platform, directory-client, fonts, input-methods, internet-browser, java-platform, legacy-x, network-file-system-client, print-client, remote-desktop-clients, server-platform, x11
  • Minimal: core
  • Basic Server: base, console-internet, core, debugging, directory-client, hardware-monitoring, java-platform, large-systems, network-file-system-client, performance, perl-runtime, server-platform
  • Database Server: base, console-internet, core, debugging, directory-client, hardware-monitoring, java-platform, large-systems, network-file-system-client, performance, perl-runtime, server-platform, mysql-client, mysql, postgresql-client, postgresql, system-admin-tools
  • Web Server: base, console-internet, core, debugging, directory-client, java-platform, mysql-client, network-file-system-client, performance, perl-runtime, php, postgresql-client, server-platform, turbogears, web-server, web-servlet
  • Virtual Host: base, console-internet, core, debugging, directory-client, hardware-monitoring, java-platform, large-systems, network-file-system-client, performance, perl-runtime, server-platform, virtualization, virtualization-client, virtualization-platform
  • Software Development Workstation: additional-devel, base, basic-desktop, core, debugging, desktop-debugging, desktop-platform, desktop-platform-devel, development, directory-client, eclipse, emacs, fonts, general-desktop, graphical-admin-tools, graphics, input-methods, internet-browser, java-platform, legacy-x, network-file-system-client, performance, perl-runtime, print-client, remote-desktop-clients, server-platform, server-platform-devel, technical-writing, tex, virtualization, virtualization-client, virtualization-platform, x11
Categories: Linux

Installing Subversion in Debian

October 16, 2011 Leave a comment

This article was taken from : http://www.reviewingit.com/index.php/content/view/62/2/

So happens there comes a time when you need to track whos been adding what to your documents, and how to revert back to last Mondays copy of a document. What you need is a software to manage the versions and track the changes done by whomever. What you need is a tool called subversion. I’ve been hunting around for some good document to go through the install step by step but could not find one short of reading an entire book on the subject. So I decided to write a small document on what I did to install my copy of subversion on Debian etch, just using apt… read on…

First you need the following

A. A clean debian 4.0 etch system
B. Tortisesvn :- a subversion client for Windows (Xp or Vista) Get it here
1. First we need to Install ssh server
# apt-get update
# apt-get upgrade
# apt-get install ssh

2. Next we install Apache2
# apt-get install apache2
# apt-get install libapache2-mod-php5

3. Install subversion packages
# apt-get update
# apt-get install subversion
# apt-get install libapache2-svn
4. Create Repository
# mkdir /var/svn/
# svnadmin create –fs-type fsfs /var/svn/myproject

5. Generate Test data in repository
# mkdir ~/TEMP/
# echo “Testing” > ~/TEMP/test.txt
# svn import -m “Testing via ssh+svn” ~/TEMP/ svn+ssh://127.0.0.1/var/svn/myproject/trunk
# svn co svn+ssh://127.0.0.1/var/svn/myproject/trunk testcheckout

6. See if files in repository
# svnlook tree /var/svn/myproject/

7. Changeowner of repository folder to apache user
# chown -R www-data:www-data /var/svn/*
# chmod -R 770 /var/svn/*

8. Make sure svn is running in apache
# a2enmod dav
# a2enmod dav_svn
9. Create user accounts for SVN users, you will be prompted for their passwords
# htpasswd -c /etc/apache2/svn.passwd usera

# htpasswd /etc/apache2/dav_svn.passwd userb
# htpasswd /etc/apache2/dav_svn.passwd userc

10. Input this code into /etc/apache2/mods-available/dav_svn.conf
<Location /myproject_site>
DAV svn
SVNPath /var/svn/myproject
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/apache2/svn.passwd
Require valid-user
#SSLRequireSSL <– note this is commented out
</Location>
11. Reload the apache config then, Test the connection using a browser to http://<repository address>/myproject_site
# /etc/init.d/apache2 force-reload
12. If it works time to add SSL to Apache
#apt-get install openssl ssl-cert

13. Generate a certificate
# openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem

>>ensure you fill up all the details
for the certificate<<

14. Change the permissions on the certificate
# chmod 600 /etc/apache2/apache.pem

15. Modify the /etc/apache2/ports.conf add the following string
Listen 443

16. modify /etc/apache2/sites-available/default
change the default NameVirtualHost * to NameVirtualHost *:80
Add NameVirtualHost *:443
Change <VirtualHost *> to <VirtualHost *:80>

17.Add right at the end of the file

<VirtualHost *:443>
ServerAdmin webmaster@localhost
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
</VirtualHost>

18. Uncomment SSL required in /etc/apache2/mods-available/dav_svn.conf
<Location /svn_zen>
DAV svn
SVNPath /var/svn-repos/project_zen
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
SSLRequireSSL       <—HERE
</Location>

 

19.Reload the Apache config
# /etc/init.d/apache2 force-reload
20. Ensure mod ssl is loaded
# a2enmod ssl
21. Ensure repository permissions are correct

# chown -R www-data:www-data /var/svn/*
# chmod -R 770 /var/svn/*
22. Test in browser, enter the userid you created and password
https://<address of webserver>/myproject_site
23. Now that all is working with SSL Lets add some granular permissions
, usera and userb has readwrite userc only has read permissions to the repository.
# nano /etc/apache2/svn_ACL

put this in

[groups]
readwritegrp = usera, userb
readgrp = userc

[/]
@readwritegrp = rw
@readgrp = r

[/myproject_site/trunk]
@readwritegrp = rw
@readgrp = r

24. Lets tell subversion to use the permissions, Add this in to /etc/apache2/mods-available/dav_svn.conf
<Location /myproject_site>
DAV svn
SVNPath /var/svn/myproject
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/apache2/svn.passwd
Require valid-user
SSLRequireSSL
AuthzSVNAccessFile /etc/apache2/svn_ACL    <—HERE
</Location>

25. Reload Apache and Have Fun with your SVN repository!!!
# /etc/init.d/apache2 force-reload
26. Fire up your Tortise SVN I use it in Vista it adds a right click menu which you can use to check in and check out documents. But first up use the repository browser to goto https://<your server address>/myproject_site to make sure all is going well
enter your userid and password created earlier. If all goes well you can start playing around with you TortiseSVN to check out and check in docs. Also you can diff and see the history of
updates. Its Great!!

Categories: Linux, Programming

From Squeeze to Wheezy and Gnome 3

April 30, 2011 4 comments

#Update :1

alternative installing nvidia driver without building with module asistant

sasuke:~$sudo apt-get install nvidia-kernel-2.6.32-5-686 nvidia-glx nvidia-xconfig nvidia-settings
sasuke:~$sudo nvidia-xconfig
sasuke:~$sudo reboot

#end of update

// Old Post

Well I don’t know this is the right method or not, but at least it work for me. This step is how I did :

  1. Install  Debian 6 (Squeeze) base system
  2. Upgrade to the latest kernel with apt-get update, apt-get dist-upgrade, this is my repository list :
    deb http://ftp.jp.debian.org/debian wheezy main contrib non-free
    deb http://ftp.jp.debian.org/debian wheezy-proposed-updates main contrib non-free
    deb http://ftp.jp.debian.org/debian sid main contrib non-free
  3. Reboot and select the new kernel
  4. Install required packages to build my NVIDIA driver and to test the OpenGL
    apt-get install module-assistant nvidia-kernel-source nvidia-xconfig nvidia-common mesa-utils
  5. Build and install Nvidia driver with modul-assistant
  6. Install X, Desktop Environment (Gnome,) Desktop Manager (GDM)
    apt-get install xserver-xorg, xorg, gnome-core, gdm
  7. Test Nvidia Graphics with glxgears, see the fps (mine is around 4000fps)
  8. Setup Xorg configuration File
    nvidia-xconfig
  9. Add experimental to repository list
    deb http://ftp.jp.debian.org/debian experimental main contrib non-free
    deb http://ftp.jp.debian.org/debian unstable main contrib non-free
  10. Install Gnome 3
    apt-get update
    apt-get install -t experimental gnome3-session
  11.  Reboot System
  12. Testing

Screenshot (SuperTuxkart, Terminal, Firefox 4)

Categories: Linux

Configure Japanese and Korean Language on Debian

April 29, 2011 Leave a comment
Categories: Japanese Language, Linux

TRIPLE BOOT WINDOWS 7/MAC OS 10.6/DEBIAN 6

March 21, 2011 3 comments

Berikut Langkah-langkahnya :

  1. Backup semua data
  2. Create GUID Partition Table (GPT) dengan Mac OS 10.6 DVD
    1. create partisi windows 7 (MS-DOS)
    2. create partisi mac os 10.6 (MacOS Extended Journaled)
    3. create partisi Debian 6 (FREE SPACE)
    4. create partisi data (MS-DOS)
    5. create partisi swap (FREE SPACE)
  3. Install MAC OS 10.6
    1. Install Mac OS base system
    2. Install Combo Fix Update
    3. Install Multibeast (Easy Beast+VoodoHDA 0.21+VoodooPS2Controller)
    4. Install gpt-sync
  4. Create Hybrid GPT/MBR dengan gpt-sync
  5. Install Debian 6 beserta paket2nya
  6. Install Windows beserta program-program aplikasinya
  7. Install EasyBCD dan Edit Konfigurasi Bootloader
  8. Testing
Categories: Linux, Mac Os, Windows