Showing posts with label linux mint. Show all posts
Showing posts with label linux mint. Show all posts

Saturday, April 27, 2013

Installing Nginx and PHP on Linux Mint 13...

Step 1:
- Installing Nginx web/proxy server
$ sudo add-apt-repository ppa:nginx/$nginx
$ sudo apt-get update 
$ sudo apt-get install nginx
- Start the service
$ sudo service nginx start
- Then test the installation by opening web browser and type your ip address or localhost to the url text box. You should see a welcoming page.

Step 2:
- Installing PHP
$ sudo add-apt-repository ppa:ondrej/php5
$ sudo apt-get update
$ sudo apt-get install php5-fpm php5.cli
- Edit ini file
$ sudo nano /etc/php5/fpm/php.ini
- Change the cgi.fix_pathinfo=1 to cgi.fix_pathinfo=0

- Edit config file
$ sudo gedit /etc/nginx/sites-available/default 
- Uncomment highlighted lines below
server {
        listen 80;
        listen [::]:80 ipv6only=on default_server;

        root /usr/share/nginx/html;
        index index.html index.htm index.php;

        # Make site accessible from http://localhost/
        server_name localhost;

        location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.html;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules
        }

        location /doc/ {
            alias /usr/share/doc/;
            autoindex on;
            allow 127.0.0.1;
            allow ::1;
            deny all;
        }

        # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
        #location /RequestDenied {
        #   proxy_pass http://127.0.0.1:8080;    
        #}

        #error_page 404 /404.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;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
        #   fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #   # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        #
        #   # With php5-cgi alone:
        #   fastcgi_pass 127.0.0.1:9000;
        #   # With php5-fpm:
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
            deny all;
        }
    }
- Start PHP service
$ sudo service php5-fpm start
- Restart Nginx service
$ sudo service nginx restart
- Test your installation by creating info.php file with source code below into your webserver root directory
<php?
    phpinfo();
?>
Step 3: Installing xdebug (optional)
$ sudo apt-get install php5-xdebug
- Get Loaded Configuration File (from your browser by opening info.php you've created earlier) and add the text below to php.ini
zend_extension=/usr/lib/php5/20100525/xdebug.so
xdebug.remote_enable=on
- Restart PHP and Nginx service

Important notes:
- To completely uninstall Nginx (including settings)
$ sudo apt-get purge nginx nginx-common nginx-full
- If you're getting the error below when you start Nginx service
$ nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
- Edit /etc/nginx/sites-available/default file by changing the text
from
listen [::]:80 default_server;

to
listen [::]:80 ipv6only=on default_server;

Wednesday, April 11, 2012

Finally!!! An almost stable (96%) catalyst version 12.3 available for GNOME 3...

no more lagging during the transition between working and activity mode


windows 7 aero effect working perfectly under vmware


catalyst version 12.3


virtual desktop movement is quite smooth


Update (13/04/2012)
Solved laggs/slow windows movement in GNOME3 by adding this line
export CLUTTER_VBLANK=none
into ~/.profile or into /etc/profile file. Restart X server or reboot system.

ref: ATI Catalyst - ArchWiki.

Thursday, January 5, 2012

How to always use a text-based location bar in nautilus 3...

Open terminal and type the command below
    $ gsettings set org.gnome.nautilus.preferences always-use-location-entry true
To switch back
    $ gsettings set org.gnome.nautilus.preferences always-use-location-entry false

Saturday, December 31, 2011

Fixes for common issues on Linux Mint 12...

System: Dell Studio XPS 16 - 1647
OS: Linux Mint 12 - Lisa 64-bit

Problem 1:
Broadcom BCM43224 (0596) Wifi card not working out of box (bug #873511).

Solution:
Install driver from Jockey and then edit config file
    $ sudo nano /etc/modprobe.d/blacklist.conf
to blacklist the drivers (for my case I need to blacklist both bcma and brcmsmac) by adding the text below at the end of the file
    blacklist bcma
    blacklist brcmsmac
and then reboot.

Problem 2:
Unable to pair devices, send, receive and browse files via bluetooth.

Solution:
System update fixed pair devices issue, however sending file only works one way (PC to device). Browsing files in device is still not working (bug #879923).

Problem 3:
No sound from headphone jack.

Solution:
An old issue since Julia.

Worth to highlight:
  • ATI proprietary driver ver 11.12 performance still sluggish on GNOME 3
  • A nice shell extensions from ppa:webupd8team/gnome3
    • gnome-shell-extensions-pidgin
    • gnome-shell-extensions-workspace-indicator
  • AWN works great on GNOME 3

Friday, December 2, 2011

My Linux Mint 12 hiccup experienced...

Laptop Model: Dell Studio XPS 16 - 1647

1) Issues when using ATI proprietary FGLRX driver (via Additional Drivers or manual download)
  • Sluggish performance on windows movement and mode switching between desktop and activity
  • Windows 7 guest OS under VMWare with Aero effect enable crashed even when I'm not using a fullscreen mode

2) No sound from headphone jack (old issue since Julia)

3) Unable to pair, send file and browse other devices via bluetooth

4) Broadcom STA wireless driver not working, tried solutions found on forums yet I'm still stuck with it (working fine on Julia and openSUSE 12.1)

At the end of the day, I've revert back to Julia with ATI proprietary FGLRX driver version 10.10. A combination that works perfectly for my laptop. ATI sucks!!! I wish I could have change my graphic card to NVIDIA, unfortunately it's not easy and almost impossible for laptop.

Saturday, October 29, 2011

Installing LibreOffice on Linux Mint 10...

1) Remove OpenOffice
    $ sudo apt-get purge openoffice*.*
2) Installing via Ubuntu ppa
    $ sudo add-apt-repository ppa:libreoffice/ppa
    $ sudo apt-get update
    $ sudo apt-get install libreoffice
    $ sudo apt-get install libreoffice-gnome
    $ sudo apt-get install language-support-en
3) Or installing via deb installers
  • download the installer from here
  • extract tarballs LibO_xxxx_install-deb_en-US.tar.gz
  • go to folder LibO_xxxx_install-deb_en-US/DEBS and run
    $ sudo dpkg -i *.deb
  • go to folder LibO_xxxx_install-deb_en-US/DEBS/desktop-integration and run
    $ sudo dpkg -i *.deb

Tuesday, September 27, 2011

Things to do after upgraded to Katya 64-bit...

Yes, I know it's a late upgrade and the new release is coming soon. But, who cares. I just got a chance to do it last night.

1) Enabling Compiz will cause windows movement lagging
Solution:
  • At CCSM, go to "Composite -> General -> Refresh Rate" and change the value to 60
  • Then go to "OpenGL -> General", unchecked "Sync To VBlank" option

2) Enabling Blur effect, adding "class=Gnome-terminal" will cause windows flicker.
Solution:
  • Use type "Normal" instead
	type=Menu | PopupMenu | DropdownMenu | Tooltip | Notification | Combo | Dnd | Normal

3) Overlay scroll started to annoy me
Solution:
  • Uninstall the library
	$ sudo apt-get --purge remove overlay-scrollbar liboverlay-scrollbar-0.1-0

4) My Quake 3 demo is not working
Solution:
  • Install ia32-libs library
	$ sudo apt-get install ia32-libs

5) No sound from my headphone jack?
Solution:

Sunday, April 10, 2011

Batch process images plugin for Gimp...

To install
sudo apt-get install gimp-plugin-registry
If you prefer GUI installer, open Synaptic, search for gimp batch and mark for installation

Synaptic


To use the plugin, open Gimp and go to Filters -> Batch -> Batch Process... menu

GIMP batch process plugin


Add files to be process at Input tab

Input tab


Set value to whichever tab processes that you need and set the image type at Output tab (default is .bmp).

Resize tab


Click Start button.

Note:
Tested with GIMP v 2.6.10 on Linux Mint 64-bit.

Thursday, March 24, 2011

Installing Firefox 4 on Ubuntu...

1) Adding ppa to repositories
    $ sudo add-apt-repository ppa:mozillateam/firefox-stable
2) Update repository
    $ sudo apt-get update
3) Reinstall package to latest version
    $ sudo apt-get --reinstall install firefox
Note:
Tested on Ubuntu 10.04 32-bit and Linux Mint 10 64-bit.

Sunday, February 20, 2011

How to rip an mp3 audio from YouTube video...

Packages required, ffmpeg and libavcodec-extra-52
$ sudo apt-get install ffmpeg libavcodec-extra-52
The easiest way is to run the command below. Note that -ab is an option for audio bitrate
$ ffmpeg -i uverworld.flv -ab 192k uverworld.mp3
If you prefer GUI, you can use VLC. Below is a step by step screenshots

Click save item in playlist


Select mp3 profile and click Start button


If you want to change audio bitrate, click edit profile button, set bitrate, Save changes and Start the process


Note:
Tested on Linux Mint 10 64-bit.

Sunday, November 21, 2010

Customizing plymouth login screen background, fonts and gtk...

1) Open terminal, copy and paste the following command.
    $ sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow
2) Close terminal and log out. Once at login screen you'll see an Appearance pop up. Make your changes and log in.

3) Now to disable Appearance pop up from login screen. Open terminal, copy and paste the following command.
    $ sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop
Note :
Tested on Ubuntu 10.04 and Linux Mint 10.

Thursday, August 26, 2010

Installing VMware Player 3.1.1 on Ubuntu 10.04...


Screenshots...



1) Install build-essential and linux-headers (for my case I skip this step because I had these two packages installed before)
$ sudo apt-get install build-essential linux-headers-`uname -r`
2) Change the installer mode
$ chmod +x ./VMware-Player-3.1.1-282343.x86_64.bundle
3) Execute the installer
$ gksudo bash ./VMware-Player-3.1.1-282343.x86_64.bundle
When popup appear, click Install.

Note:
Tested on Ubuntu 10.04 Lucid Lynx and Linux Mint 10 64-bit.

Update (20/11/2010)
Command to uninstall.
sudo bash vmware-installer -u vmware-player
Update (01/03/2011)
Tested VMWare Player 3.1.3 on Linux Mint 10 64-bit

Tuesday, September 29, 2009

Installing latest NVidia display driver on Ubuntu (manual)...

1) Install Linux headers and build essential
    $ sudo apt-get install linux-headers-`uname -r` build-essential
2) Go to console mode by pressing Ctrl+Alt+F1

3) Logon

4) Stop X-Server
    $ sudo /etc/init.d/gdm stop
5) Execute the installer
    $ sudo sh NVIDIA-Linux-x86-[version].run
6) Complete the installation process

7) Execute command below
    $ sudo nvidia-xconfig --add-argb-glx-visuals
8) Restart X-Server
    $ sudo /etc/init.d/gdm start

Sunday, September 27, 2009

Installing Quake 3 Arena Demo on Ubuntu...

1) Download the installer from Id Software
    $ wget ftp://ftp.idsoftware.com/idstuff/quake3/linux/linuxq3ademo-1.11-6.x86.gz.sh
2) Allow the file to be executed as a program
    $ sudo chmod 755 linuxq3ademo-1.11-6.x86.gz.sh
3) Post Dapper, dash is a default shell for Ubuntu. We need to change this to bash before installing the game. To do so, open terminal and at home folder execute the following command and select <No>.
    $ sudo dpkg-reconfigure dash
4) Execute the installer
    $ ./linuxq3ademo-1.11-6.x86.gz.sh -target ~/programs/q3-temp
5) If the installer is returning an error like below
    Warning: unknown mime-type for "archive" -- using "application/*"
    Warning: unknown mime-type for "integrity..." -- using "application/*"
    Error: no such file "-r"
    Error: no such file "-n"
    Error: no such file "Verifying"
    Error: no such file "archive"
    Error: no such file "integrity..."
    tail: cannot open `+6' for reading: No such file or directory
    Warning: unknown mime-type for "-r" -- using "application/*"
    Warning: unknown mime-type for "Error" -- using "application/*"
    Warning: unknown mime-type for "in" -- using "application/*"
    Warning: unknown mime-type for "check" -- using "application/*"
    Warning: unknown mime-type for "sums" -- using "application/*"
    Warning: unknown mime-type for "1808389199" -- using "application/*"
    Warning: unknown mime-type for "1300192087" -- using "application/*"
    Error: no such file "-r"
    Error: no such file "Error"
    Error: no such file "in"
    Error: no such file "check"
    Error: no such file "sums"
    Error: no such file "1808389199"
    Error: no such file "1300192087"
    Press Return to close this window ...
6) Simply execute the command below and re-executing the installer
    $ export _POSIX2_VERSION=199209
7) During the installation, if there's a permission denied error on the targeted bin folder, simply create the folder manually using terminal or nautilus and proceed with the installation
    /
        /home
            /your-username
                /programs
                    /q3-demo
                        /bin
8) Launch the game
    $ programs/q3-demo/q3demo.x86
9) If there's no sound, check sound initialization section from the output, if it's the same as below
    ------- sound initialization -------
    /dev/dsp: Broken pipe
    Could not toggle.
10) Edit bootmisc.sh
    $ sudo gedit /etc/init.d/bootmisc.sh
From
    ...
    case "$1" in
    start|"")
    do_start
    ;;
    ...
to
    ...
    case "$1" in
    start|"")
    do_start
    echo "q3demo.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
    echo "q3demo.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss
    ;;
    ...
11) Restart your machine (there should be a way to restart the service alone)

12) Launch the game with parameters shown below
    $ programs/q3-demo/q3demo.x86 +set s_musicvolume -1
13) Remove installer temp folder
    $ rm -r programs/q3-temp
14) Change back shell from bash to dash by selecting <Yes>
    $ sudo dpkg-reconfigure dash 
Note:
Installation steps tested on Ubuntu 9.04, 9.10, 10.04 and Linux Mint 7

Update (04/12/2009):
/etc/init.d/bootmisc.sh has been removed from Ubuntu 9.10.

Solution:
Add echo "q3demo.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss into your game launcher script.
    #!/bin/sh
    # Needed to make symlinks/shortcurts work.
    # Run Quake III with some default arguments

    cd "/home/your-username/programs/q3-demo"
    sudo echo "q3demo.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
    quake="./q3demo.x86"
    "$quake" $*
    exit $?
Update (03/06/2010)
To install on Ubuntu 64 bit, need to add linux32 to the command
    $ linux32 ./linuxq3ademo-1.11-6.x86.gz.sh -target ~/programs/q3-temp
Tested on Ubuntu 10.04 Lucid Lynx 64 bit.

Update (27/08/2010)
If suddenly the sound gone and you couldn't get it back, open terminal and test this command:
    $ sudo echo "q3demo.x86_64 0 0 direct" > /proc/asound/card0/pcm0p/oss
If you're getting this error
    bash: /proc/asound/card0/pcm0p/oss: Permission denied
Just set the correct permission to the file and you're done. Tested on Ubuntu 10.04 Lucid Lynx 64 bit.

Update (18/11/2010)
Installation steps working correctly on Linux Mint 10. However I'm having difficulty executing the binary. Getting error "bash: ./q3demo.x86_64: No such file or directory". Still trying to figure out what went wrong.

Update (19/11/2010)
I almost forgot. Quake 3 Arena demo is a 32 bit application. Since I'm using Linux Mint 64 bit, I need to install 32 bit library to make it work. The library was pre-installed on Ubuntu 64 bit, but that's not the case for Linux Mint. Above issue solved!!!
    $ sudo apt-get install ia32-libs
Now there's one more issue left. The sound. /proc/asound/card0/pcm0p/oss file seems missing.

Update (20/11/2010)
Just found out that the ubuntu developers decided the majority of people don’t need OSS support, so they compiled the kernel without it.

Quake 3 without sound in Ubuntu 10.10
Ubuntu 10.10 no /dev/dsp

Damn!!!