Archive

Archive for the ‘Ubuntu’ Category

All About Ubuntu

Ganti ipaddress

nano /etc/network/interface
tambahin:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.11
netmask 255.255.0.0
gateway 192.168.0.1

Restart Apache

sudo /etc/init.d/apache2 restart
sudo /etc/init.d/mysql restart

Samba

sudo mkdir /srv/samba/share
sudo chown nobody.nogroup /srv/samba/share
sudo /etc/init.d/samba restart
sudo service smb restart
nano /etc/samba/smb.conf
tambahin
[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755

open port mysql
iptables -A INPUT -p tcp –dport 3306 -j ACCEPT
iptables -A INPUT -p udp –dport 3306 -j ACCEPT

Set mysql bind address
Before you can access the database from other computers in your network, you have to change its bind address. Note that this can be a security problem, because your database can be accessed by others computers than your own. Skip this step if the applications which require mysql are running on the same machine.
type:
nano /etc/mysql/my.cnf
and change the line:
bind-address           = localhost
to your own internal ip address e.g. 192.168.1.20
bind-address           = 192.168.1.20

update lewat cdrom
sudo apt-cdrom add
sudo aptitude update
sudo aptitude install build-essential

Shutdown
sudo shutdown -h 0
sudo reboot

Mounting
usb -> mount /dev/sdx /media/sdx
cdrom -> mount /dev/cdrom /media/cdrom
sudo unmount /dev/cdrom

Building and installing the mssql extension from source
download http://freetds.org/
$ ./configure –prefix=/usr/local/freetds –enable-msdblib
$ make
$ sudo make install

$ sudo cp include/tds.h /usr/local/freetds/include
$ sudo cp src/tds/.libs/libtds.a /usr/local/freetds/lib

$ apt-get source php5

mkdir ~/SourceCode/php-mssql

$ cp ext/mssql/config.m4 ~/SourceCode/php-mssql
$ cp ext/mssql/php_mssql.c ~/SourceCode/php-mssql
$ cp ext/mssql/php_mssql.h ~/SourceCode/php-mssql

$ ./configure –with-mssql=/usr/local/freetds
$ make
$ make install

$ cd /etc/php5/conf.d/

$ sudo vim mssql.ini
; Enable the mssql extension
extension=mssql.so

$ sudo vim /etc/profile
At the end of the file add:
export FREETDSCONF=/etc/freetds/freetds.conf

Now add this same entry into your web server’s environment variables. I am using apache and assuming you are to. If not, consult your web server’s documentation for how to do this:
$ sudo vim /etc/apache2/envvars

Now add these entries to the end of the file:
export FREETDSCONF=/etc/freetds/freetds.conf

$ sudo vim /etc/freetds/freetds.conf

Go to the end of the file and add the following lines
;— Custom MSSQL server name —
; THIS CAN BE ANY NAMED SERVER REFERENCE YOU WANT TO CREATE
[SERVERNAME]
; This is the host name of the MSSQL server
host=HOSTNAME
; This is the port number to use
port=PORTNUMBER
; This is the TDS version to use for anything over Server 2000
tds version=8.0

Now we need to add the freetds library to the load library stack.
$ sudo vi /etc/ld.so.conf

Go to the end of the file and add the following line:
/usr/local/freetds/lib

# Restart your web server
Like everything that involves a change to the PHP environment or configuration on your machine, restart the web server. I am assuming this is being built upon an apache server. If not, you will need to know how to stop and start your web server or, at the very least, know how to reboot your machine:
$ sudo apache2ctl stop
$ sudo apache2ctl start

mod-rewrite
sudo a2enmod rewrite
restart/reload apache
detail :

http://ubuntuforums.org/archive/index.php/t-764037.html

http://ubuntuforums.org/archive/index.php/t-7304.html

Categories: Ubuntu
Follow

Get every new post delivered to your Inbox.