Professional Documents
Culture Documents
MySQL5
1. Installing mysql5 with apt-get:
apt-get install mysql5
(in case you are having dependency problems try to use Debian snapshot repository.
2. Initialize the database:
mysql_install_db
3. Start sql server by:
mysqld_safe
4. Test it by:
mysqlshow
5. Set up user password:
mysql -u root
6. Check MySQL configuration file /etc/mysql/my.cnf for additional settings.
[edit]
DNSmasq
Although Bind9, and enterprise-grade, industry-standard DNS server, is available in the
repositories, it is also next-to-impossible for mere humans to understand. If you are setting up a
DNS server at home, chances are you just want to be able to refer to your home computers by
name instead of remembering IP's or keeping up with a /etc/hosts file on every computer.
In this scenario you can set up DNSmasq on your server. DNSmasq is available in the
repositories, so you can install thus:
apt-get install dnsmasq
Once installed, DNSmasq uses the local /etc/hosts file to serve up name resolution information
on your network. Alternately, you can use a separate file that uses the same syntax.
Once you have installed DNSmasq and edited the server's /etc/hosts file, you need to configure
all your clients to use it. You can do this by putting an entry in /etc/resolv.conf:
nameserver <ip of dnsmasq server>
Put this as the first nameserver entry, then your normal DNS server (usually provided by your
ISP) as the second.
Installing vsftp
Here I will show you how to use vsftp both for use as a daemon process (running all the time)
and as an entry in inetd which, using inetd.conf spawns the daemon when a connection is
requested, saving a users system resources and cpu cycles while the server is not in use.
I personally use vsftp because it is very secure, fast, and simple to configure.
apt-get install vsftpd - will download the daemon and begin to run it in that mode. It will also add
startup scripts to your rc*.d folders, so the daemon will start each time you boot.
the configuration can be found in /etc/vsftpd.conf and can be edited freely. If you wish to run it in
inetd, simply comment out or remove listen=YES and add this to your /etc/inetd.conf.
#:FTP
ftp stream tcp nowait root /usr/sbin/vsftpd vsftpd
Options
some of the options I personally use are as follows -
write_enable=YES //alows users write access
anon_root=/home/ftp //anonymous users root
anonymous_enable=YES //allows use of anonymous users
local_enable=YES //allows unix users on the box to login to their home folders
connect_from_port_20=YES //allows port 20 connections (ftp-control)
idle_session_timeout=6000 //session timeout in SECONDS
ftpd_banner=Welcome to my FTP. Behave! //displays to users using ftp clients
For passive mode
pasv_enable=YES //passive mode, enables passive connections (using a seperate port for data
transfer)
pasv_min_port=64990
pasv_max_port=65000
Other Options
all of the options can be found at http://vsftpd.beasts.org/vsftpd_conf.html
note: Using inetd is not a good idea if more then a couple people will be using vsftp at the same
time, it has been known to become unstable.
[edit]
Installing ProFTP
ProFTP is another good FTP server. Info: ProFTP project, features
It can be installed with this command:
apt-get install proftpd
After the installation you should be able to log in using usernames and passwords available on
the computer.
If you want to allow anonymous logins look in configuration file /etc/proftpd/proftpd.conf and
uncomment the required lines.
The installation place a start link in the appropriate runlevel, therefore ProFTP will start each
time the computer boots. To start/stop the server you can use these commands (as root):
/etc/init.d/proftpd start
/etc/init.d/proftpd stop
/etc/init.d/proftpd restart
Navigate to http://localhost/mytest.php. The return value shown should be 125. Have fun!
Retrieved from "http://www.mepis.org/docs/en/index.php/LAMP_with_MySQL5_and_PHP_5"
LTSP Server
From MEPIS Documentation Wiki
Jump to: navigation, search
Intructions to set up Mepis LTSP from scratch
FPRIVATE "TYPE=PICT;ALT=One Mepis laptop can run 20 client laptops! "
LTSP is an add-on package for Linux that allows you to connect lots of low-powered thin client
terminals to a Linux server. Applications run on the server and accept input and display their
output on the thin client display. LTSP is available as a set of packages that can be installed on
any Linux system. Example of usage
Hardware for a 20 seat system
Contents
[hide]
· 1 Server
Server
First install 2 network cards and install Mepis then open a command line and type;
su
'Your root password'
update-rc.d -f guarddog remove
apt-get install ltsp-utils dhcp3-server atftpd portmap nfs-kernel-server
Say 'OK' to dhcp being non-authorative. Say 'NO' to the portmap question. When prompted to
configure dhcpd only listen on eth1, when prompted to configure atfpd use the default answer to
all questions.
rm /etc/dhcp3/dhcpd.conf
update-rc.d -f dhcp3-server remove
update-rc.d dhcp3-server start 20 2 3 4 5 . stop 1 6 .
su -
ltspadmin
Go through the following options on the ltspadmin screen:
a) Select the second option; - configure installer options. Say yes/default to all.
b) Select the first option; - install; press a to select all components. press q to install ltsp. (this
will take a while)
c) Select the third option - configure; Work through steps 1-11 in the last section as below;
1. Leave as it is.
2. Leave as it is.
3. yes to auto-generate config file.
4. ok
5. ok
6. yes to enable
7. yes to enable kdm, no to disable graphical (This section often does not work for enabling
XDMCP and reports that it is NOT working when it actually IS).
8. yes to creating hosts
9. yes to creating host.allow
10. yes to creating exports
11. yes to creating lts.conf file
Make sure you fix the dhcpd.conf as described here on the LTSP wiki (it should be ok by
default)
select an interface for your LTSP connections. You can do this by adding the following in;
nano /etc/network/interfaces
auto eth1
iface eth1 inet static
address 192.168.0.254
netmask 255.255.255.0
then;
ifdown eth1
ifup eth1
Will bring up the interface (and to activate it with your new settings). then;
apt-get remove kdm
apt-get install gdm
nano /etc/X11/gdm/gdm.conf
In the file /etc/X11/gdm/gdm.conf search for the line 'the security of xdmcp' (type <ctrl>+<W>
'the security of xdmcp') change the line below it to 'enable=true' Reboot the machine
[edit]
Finding Device IDs and MAC addresses
PCI IDs are two 4 digit hexadecimal numbers with a ':' between them. The first number is a
'manufacturer ID', e.g.
· 10ec = Realtek
· 10b7 = 3Com
The second for is the 'device ID' specific to particular devices. Example:
· 0x10ec,0x8139
· 0x10b7,0x9058.
You need to find the PCI ID to make an Etherboot image to either put on a floppy or a ROM.
You can find both the PCI ID and the Mac address at the same time with a live CD
On the client machine using MEPIS live cd run;
lspci
and then
lspci -n
this will allow you to match up the network card with it's device ID tell you the device ID. While
you are there, you can use
ifconfig -a
to reveal the MAC address of the card too.
Here is an example of the output of lspci and lspci -n:
ben@watasenia:~$ lspci
0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo
KT266/A/333]
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333
AGP]
0000:00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-
8139/8139C/8139C+ (rev 10)
0000:00:0a.0 Multimedia audio controller: Yamaha Corporation YMF-724 (rev 05)
0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
0000:00:11.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus
Master IDE (rev 06)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2
MX/MX 400] (rev b2)
ben@watasenia:~$ lspci -n
0000:00:00.0 0600: 1106:3099
0000:00:01.0 0604: 1106:b099
0000:00:08.0 0200: 10ec:8139 (rev 10)
0000:00:0a.0 0401: 1073:0004 (rev 05)
0000:00:10.3 0c03: 1106:3104 (rev 82)
0000:00:11.0 0601: 1106:3177
0000:00:11.1 0101: 1106:0571 (rev 06)
0000:01:00.0 0300: 10de:0110 (rev b2)
In this example the ethernet controller has a device ID of 10ec:8139 and it's a Realtek
Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
[edit]
· add to the '/etc/dhcp3/dhcpd.conf' file the DHCP entry on the server machine. This will
include the MAC, IP, hostname, location of the kernel. You should add IP addresses
starting at 192.168.0.10 as below. Where /path/to/boot/image will be whatever 2.6 kernel
is in tftpboot/lts/2.6whatever/pxelinux.0
host ws001 {
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.0.10;
filename "/path/to/boot/image";
}
· you may need to edit /opt/ltsp/etc/lts.conf to help the client through a difficult boot.
· WRITE THE MAC ADDRESS ON THE CLIENT, FOR EASY INSTALL WHEN IT'S
BEING ADDED TO SOMEONES LTSP SET UP.
[edit]
· find the PCI ID of the network card in the machine you are using.
· select network controller with the right vendor and device and ID
· put -1 in ASK_BOOT
· Click on "get ROM" to retrieve your boot image
· insert floppy into the server machine (to make a floppy for your client)
cat eb-5.4.1-nameoffile.zdsk > /dev/fd0
(this will make the floppy into an etherboot floppy)
· insert floppy into the client machine set the BIOS to boot from floppy
· find the MAC address of the network card (this will be revealed when the floppy boots
and finds the card)
· add to the '/etc/dhcp3/dhcpd.conf' file the DHCP entry. This will include the MAC, IP,
hostname, location of the kernel. You should add IP addresses starting at 192.168.0.10 as
below. Where /path/to/boot/image will be whatever 2.6 kernel is in
/tftpboot/lts/2.6whatever/lts
host ws001 {
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.0.10;
filename "/path/to/boot/image";
}
· you may need to edit /opt/ltsp/etc/lts.conf to help the client through a difficult boot.
· WRITE THE MAC ADDRESS ON THE CLIENT, FOR EASY INSTALL WHEN IT'S
BEING ADDED TO SOMEONES LTSP SET UP.
NX Server
From MEPIS Documentation Wiki
Jump to: navigation, search
NoMachine NX is a Terminal Server and Remote Access solution based on a comprising set of
enterprise class open source technologies. Thanks to the outstanding compression, session
resilience and resource management developed on top of the X-Window system, and the
integration with the powerful audio, printing and resource sharing capabilities of the Unix world,
NoMachine NX makes it possible to run any graphical application on any operating system
across any network connection as if you were sitting in front of your computer. (from nomachine
site)
Contents
[hide]
· 1 NX Server installation
· 2 Starting a session
· 3 NX Server control
· 4 Quality issue
· 5 Connectivity issues
[edit]
NX Server installation
To install it download nxclient, nxnode, and nxserver packages from Nomachine site
Install the downloaded packages with: "dpkg -i *.deb" or by using Kpackage.
Fix needed for version 2.1.0-7 and lower (might be required for newer version too) : edit
/usr/NX/etc/node.cfg file and add this:
AGENT_EXTRA_OPTIONS_X = "-fp
/usr/share/X11/fonts/misc/,/usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/
75dpi/,/usr/share/X11/fonts/100dpi"
[edit]
Starting a session
You can run the NX client from:
/usr/NX/bin/nxclient
You can connect to an NX server by specifying the server IP address and using the uername and
password on that sytem, make sure the firewall doesn't block port 22 and make sure the sshd is
running on the server machine, if not you can start it with:
/etc/init.d/ssh start
To make sure it starts everytime you boot run this command:
update-rc.d ssh defaults
[edit]
NX Server control
The NX server should start at boot up, you can stop it with this command:
/etc/init.d/nxserver stop
You can permanently remove it from starting with this command:
update-rc.d -f nxserver remove
You can still start it manually with this command:
/etc/init.d/nxserver start
[edit]
Quality issue
If the fonts appear in different colors and they look unclear do this:
go to "Configure" on the NX client
select "use custom settings"
Click "Modify" and select "Disable the render extension"
[edit]
Connectivity issues
Your computer should have either a real IP address, or if it uses NAT, your have to forward
the port used by the remote access programs to the local IP address assigned to your
computer.
Make sure your firewall doesn't block the port 22 that's used for remote connections.
Make sure that your IP address doesn't change, if you don't have control over it, try the free
Dynamic DNS service offered by http://www.dyndns.com
Retrieved from "http://www.mepis.org/docs/en/index.php/NX_Server"
Category: Servers