ก๊วนซอฟท์แวร์ </softganz> SoftGang (Gang Software)

Web &amp; Software Developer Gang.

Change my life to Ubuntu

by Little Bear @18 ก.พ. 51 21:54 ( IP : 61...161 ) | Tags : Ubuntu , Server , Apache , PHP , MySQL

ติดตั้ง Ubuntu Desktop ให้เป็น Server (LAMP)

Install Apache

#sudo apt-get install apache2

Enable mod_rewrite

#sudo a2enmod rewrite

เปลี่ยน DocumentRoot ของ apache เป็น folder อื่น และเปิดใช้งาน clean url

#gksudo gedit /etc/apache2/sites-available/default
  • เปลี่ยนบรรทัด /var/www/ เป็น /my web folder/ จำนวน 2 ตำแหน่ง
  • แก้ค่า AllowOverride ของ /my web folder/ จาก None เป็น AllowOverride All

Install PHP

<a class="hashtag" href="/tags/sudo">#sudo</a> apt-get install php5 libapache2-mod-php5 php5-gd
<a class="hashtag" href="/tags/sudo">#sudo</a> /etc/init.d/apache2 restart

Install MySQL

<a class="hashtag" href="/tags/sudo">#sudo</a> apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin

<a class="hashtag" href="/tags/gksudo">#gksudo</a> gedit /etc/php5/apache2/php.ini

add this line extension=mysql.so

#sudo /etc/init.d/apache2 restart

หากมีข้อมูลเก่าของ mysql ก็สามารถ copy มาไว้ที่ /var/lib/mysql แล้ว โดยใช้คำสั่ง

<a class="hashtag" href="/tags/sudo">#sudo</a> cp /media/disk/var/lib/mysql/* /var/lib/mysql/
<a class="hashtag" href="/tags/sudo">#sudo</a> chown -hR mysql /var/lib/mysql/*
<a class="hashtag" href="/tags/sudo">#sudo</a> chgrp -hR mysql /var/lib/mysql/*

ทางทีดีคือไปอ่านรายละเอียดจากเว็บต้นฉบับดีกว่าครับ ที่ Installing LAMP On Ubuntu For Newbies

Or from howtoforge.com

#sudo apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
<a class="hashtag" href="/tags/sudo">#sudo</a> apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

ติดตั้ง Tahoma font

ถึงยังไงผมก็ยังชอบฟอนท์ Tahoma ของ Windows อยู่ดี ก็เลยต้องหาวิธีติดตั้งฟอนท์ Tahoma บน Ubuntu

เจอบทความ Adding Windows fonts in Linux ทดลองดูแล้ว It's work เลยเอาลิงก์มาเก็บไว้ก่อน

วิธีที่ผมใช้ง่ายนิดเดียว คือ copy fonts Tahoma จาก Windows/Fonts มาใว้ใน folder ./fonts ของ home folder

แล้วก็ทำการติดตั้งฟอนต์ทดแทน เพื่อแก้ปัญหาสระเยื้องใน OOo

ติดตั้ง Extensions ของ Firefox ที่ใช้ประจำ คือ CollorZilla , Download Statusbar , DownThemAll , Firebug , FireGestures , NoScript , ShowIP , Xmarks

Install FileZilla

#sudo apt-get install filezilla

Install thunderbird

#sudo apt-get install thunderbird

Install Geany editor

#sudo apt-get install geany

Upgrade OOo.org 2.3.0

#sudo gedit /etc/apt/sources.list

add 2 lines

deb http://download.thaigrid.or.th/pub/ubuntu/contrib gutsy openoffice.org deb-src http://download.thaigrid.or.th/pub/ubuntu/contrib gutsy openoffice.org

<a class="hashtag" href="/tags/sudo">#sudo</a> apt-get update
<a class="hashtag" href="/tags/sudo">#sudo</a> apt-get install openoffice.org

NAS200

Mounting SMB Shares Network share permanently mount samba share

Add this line to file /etc/init.d/module-init-tools

#for Aircard 580
modprobe usbserial vendor=0x1199 product=0x0122
mknod /dev/ttyUSB5 c 188 0

# mount NAS200
modprobe smbfs
mkdir /media/nas200

Manual mount nas200 to /media/nas200 is

#sudo mount -t smbfs //192.168.1.2/ /media/nas200 -o username=myusername,password=mypassword,uid=1000,mask=000,iocharset=utf8



Make AirCard button on panel

  • Right click on panel -> Add to panel
  • Select Custom Application Launcher
  • Command : xterm -T "Connect to CDMA" -e pppd call cdma

Relate topics

Comment #1If there is a problem now it's that:
Other operating systems (Not Member)
Posted @12 พ.ย. 53 19:17 ip : 2...218

Ubuntu releases too many good apps as the standard. Sometimes this can make it hard for the user to choose.(Remember Empathy being a replacement to Pidgin?) Fortunately, users can contact Canonical for Ubuntu support to help them sort out issues such as this. Their rates are quite affordable and the service is reported to be top notch. There is also superb community support for free if you use the Ubuntu forums.

Comment #2teach grant program
teach grant program (Not Member)
Posted @1 ก.ย. 54 21:21 ip : 180...231

Easily, the article is actually the best topic on this registry related issue. I fit in with
your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantastic lucidity in your writing. I will instantly grab
your rss feed to stay informed of any updates.

Comment #3nug jars
nug jars (Not Member)
Posted @8 ต.ค. 54 03:30 ip : 180...236

Just now I discovered the web for exactly this kind of information.Everything is very open and very clear explanation of issues.It contains truly information.In theory I’d like to write like this also - getting time and actual effort to make a excellent piece of writing… but what can I say… I procrastinate a lot and by no means seem to obtain something done.

Comment #4server management
server management (Not Member)
Posted @14 ม.ค. 55 22:27 ip : 180...170

This is my very first time here, really good looking blog. I discovered a lot of interesting stuff within your blog especially it's discussion. From all the remarks on your posts, it looks like this is really a extremely popular site. Keep up the good work.

Comment #5
fredmoses@yahoo.com (Not Member)
Posted @23 พ.ค. 56 18:28 ip : 217...21

users can contact Canonical for Ubuntu support to help them sort out issues such as this. Their rates are quite affordable and the service is reported to be top notch.

Comment #6
fredmoses@yahoo.com (Not Member)
Posted @28 พ.ค. 56 15:09 ip : 217...96

วิธีที่ผมใช้ง่ายนิดเดียว คือ copy fonts Tahoma จาก Windows/Fonts มาใว้ใน folder ./fonts ของ home folder

Comment #7
mikeoless@yahoo.com (Not Member)
Posted @28 พ.ค. 56 17:00 ip : 217...96

วิธีที่ผมใช้ง่ายนิดเดียว คือ copy fonts Tahoma จาก Windows/Fonts มาใว้ใน folder ./fonts ของ home folder

Comment #8
andreces@yahoo.com (Not Member)
Posted @31 พ.ค. 56 14:35 ip : 217...96

ติดตั้ง Extensions ของ Firefox ที่ใช้ประจำ คือ CollorZilla , Download Statusbar , DownThemAll , Firebug , FireGestures , NoScript , ShowIP , Xmarks