Installing Lighttpd With PHP5 And MySQL Support On OpenSUSE 11.40 komentar Sabtu, 30 April 2011Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on an OpenSUSE 11.4 server with PHP5 support (through FastCGI) and MySQL support. I do not issue any guarantee that this will work for you! In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. First we install MySQL 5 like this: yast2 -i mysql mysql-client mysql-community-serverThen we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: chkconfig -f --add mysql/etc/init.d/mysql start To secure the MySQL installation, run: mysql_secure_installationNow you will be asked several questions: server1:~ # mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL In order to log into MySQL to secure it, we'll need the current Enter current password for root (enter for none): <-- ENTER Setting the root password ensures that nobody can log into the MySQL Set root password? [Y/n] <-- Y By default, a MySQL installation has an anonymous user, allowing anyone Remove anonymous users? [Y/n] <-- Y Normally, root should only be allowed to connect from 'localhost'. This Disallow root login remotely? [Y/n] <-- Y By default, MySQL comes with a database named 'test' that anyone can Remove test database and access to it? [Y/n] <-- Y Reloading the privilege tables will ensure that all changes made so far Reload privilege tables now? [Y/n] <-- Y Cleaning up... All done! If you've completed all of the above steps, your MySQL Thanks for using MySQL! server1:~ # Now your MySQL setup should be secured. Lighttpd is available as an OpenSUSE package, therefore we can install it like this: yast2 -i lighttpdThen we create the system startup links for Lighttpd (so that Lighttpd starts automatically whenever the system boots) and start it: chkconfig -f --add lighttpd/etc/init.d/lighttpd start Now direct your browser to http://192.168.0.100, and you should see that Lighttpd delivers a page (well, it's a 404 page because there's no index file in Lighttpd's document root, but at least this means that Lighttpd is working ok): Lighttpd's default document root is /srv/www/htdocs on OpenSUSE, and the configuration file is /etc/lighttpd/lighttpd.conf. We can make PHP5 work in Lighttpd through FastCGI. There's a FastCGI package for PHP5 available on OpenSUSE, php5-fastcgi, which we install like this: yast2 -i php5-fastcgiInstalling Lighttpd With PHP5 And MySQL Support On OpenSUSE 11.4 - Page 2 How To Set Up A Serial Port Between Two Virtual Machines In VirtualBox0 komentarI needed to test serial communication between two VirtualBox guest machines on Linux. This tutorial describes what I did to set up a serial port between two virtual machines running on VirtualBox. My host operating system was Ubuntu 10.10My guest operating systems were Microsoft Windows XP and Debian Lenny.On the host machine you don't need to install or configure anything. On guest virtual machines you need to configure serial port settings. Enable Serial Port check box: checked (enabled) Enable Serial Port check box: checked (enabled) First you need to start a machine with checked "Create Pipe" check box (in my example this is the Debian VM). Afterwards you can start your second machine (in my example this is my Microsoft Windows XP VM). If you try to start the first machine with an unchecked "Create Pipe" check box then you will get one error message. Error message if you try to start VM with unchecked "Create Pipe" check box I have enabled serial console login in Debian Linux and I don't have any problem to connect to the Linux machine from the Windows terminal program. Figure 4. - Proof of working serial port connection Rudolf - http://www.bodocsi.net/ How To Integrate ClamAV Into PureFTPd For Virus Scanning On Ubuntu 10.100 komentarThis tutorial explains how you can integrate ClamAV into PureFTPd for virus scanning on an Ubuntu 10.10 system. In the end, whenever a file gets uploaded through PureFTPd, ClamAV will check the file and delete it if it is malware. I do not issue any guarantee that this will work for you! You should have a working PureFTPd setup on your Ubuntu 10.10 server, e.g. as shown in this tutorial: Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Ubuntu 10.10 (Maverick Meerkat). Make sure that you are logged in as root (type in sudo suto become root), because we must run all the steps from this tutorial as root user. ClamAV can be installed as follows: apt-get install clamav clamav-daemonStart the ClamAV daemon: /etc/init.d/clamav-daemon startFirst we create the file /etc/pure-ftpd/conf/CallUploadScript which simply contains the string yes: echo "yes" > /etc/pure-ftpd/conf/CallUploadScriptNext we create the file /etc/pure-ftpd/clamav_check.sh (which will call /usr/bin/clamdscan whenever a file is uploaded through PureFTPd)... vi /etc/pure-ftpd/clamav_check.sh#!/bin/sh/usr/bin/clamdscan --remove --quiet --no-summary "$1" ... and make it executable: chmod 755 /etc/pure-ftpd/clamav_check.shNow we edit /etc/default/pure-ftpd-common... vi /etc/default/pure-ftpd-common... and change the UPLOADSCRIPT line as follows: [...]# UPLOADSCRIPT: if this is set and the daemon is run in standalone mode,# pure-uploadscript will also be run to spawn the program given below# for handling uploads. see /usr/share/doc/pure-ftpd/README.gz or# pure-uploadscript(8)# example: UPLOADSCRIPT=/usr/local/sbin/uploadhandler.plUPLOADSCRIPT=/etc/pure-ftpd/clamav_check.sh[...]Finally we restart PureFTPd: /etc/init.d/pure-ftpd-mysql restartThat's it! Now whenever someone tries to upload malware to your server through PureFTPd, the "bad" file(s) will be silently deleted. Virtualization With KVM On An OpenSUSE 11.4 Server0 komentarThis guide explains how you can install and use KVM for creating and running virtual machines on an OpenSUSE 11.4 server. I will show how to create image-based virtual machines and also virtual machines that use a logical volume (LVM). KVM is short for Kernel-based Virtual Machine and makes use of hardware virtualization, i.e., you need a CPU that supports hardware virtualization, e.g. Intel VT or AMD-V. I do not issue any guarantee that this will work for you! I'm using an OpenSUSE 11.4 server with the hostname server1.example.com and the IP address 192.168.0.100 here as my KVM host. We also need a desktop system where we install virt-manager so that we can connect to the graphical console of the virtual machines that we install. I'm using an OpenSUSE 11.4 desktop here. OpenSUSE 11.4 KVM Host:First check if your CPU supports hardware virtualization - if this is the case, the command egrep '(vmx|svm)' --color=always /proc/cpuinfoshould display something, e.g. like this: server1:~ # egrep '(vmx|svm)' --color=always /proc/cpuinfoflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv server1:~ # If nothing is displayed, then your processor doesn't support hardware virtualization, and you must stop here. One of the dependencies that gets installed when we install KVM is Python 2.7, but Python 2.7 conflicts with the package patterns-openSUSE-minimal_base. Therefore we must uninstall that package first. To do so, start YaST: yast2In YaST, go to Software > Software Management: Type patterns-openSUSE-minimal_base in the Search field and press ENTER. The package should be listed as installed (i) in the main window. Mark the package and press the ENTER key until there's a minus (-) sign in front of the package (the minus stands for uninstall), then hit [Accept]: As a replacment for the package, some other packages need to be installed. Accept the selection by hitting [OK]: Leave YaST afterwards. To install KVM and virtinst (a tool to create virtual machines), we run yast2 -i kvm libvirt libvirt-python qemu virt-managerThen create the system startup links for libvirtd... chkconfig --add libvirtd... and start the libvirt daemon: /etc/init.d/libvirtd startTo check if KVM has successfully been installed, run virsh -c qemu:///system listIt should display something like this: server1:~ # virsh -c qemu:///system listId Name State ---------------------------------- server1:~ # If it displays an error instead, then something went wrong. Next we need to set up a network bridge on our server so that our virtual machines can be accessed from other hosts as if they were physical systems in the network. To do this, we install the package bridge-utils... yast2 -i bridge-utils... and configure a bridge. To configure the bridge, create the file /etc/sysconfig/network/ifcfg-br0 as follows (make sure you use the IPADDR setting from the /etc/sysconfig/network/ifcfg-eth0 file): vi /etc/sysconfig/network/ifcfg-br0STARTMODE='auto'BOOTPROTO='static'IPADDR='192.168.0.100/24'MTU=''NETMASK=''NETWORK=''BROADCAST=''USERCONTROL=noNAME='Bridge 0'NM_CONTROLLED=noBRIDGE='yes'BRIDGE_PORTS='eth0'BRIDGE_AGEINGTIME='300'BRIDGE_FORWARDDELAY='0'BRIDGE_HELLOTIME='2'BRIDGE_MAXAGE='20'BRIDGE_PATHCOSTS='19'BRIDGE_PORTPRIORITIES=BRIDGE_PRIORITY=BRIDGE_STP='on' (If you get the message You do not have a valid vim binary package installed. Please install either "vim", "vim-enhanced" or "gvim"., please run yast2 -i vimto install vi and try again. ) Modify /etc/sysconfig/network/ifcfg-eth0 as follows (set IPADDR to 0.0.0.0 and change STARTMODE to hotplug): vi /etc/sysconfig/network/ifcfg-eth0BOOTPROTO='static'BROADCAST=''ETHTOOL_OPTIONS=''IPADDR='0.0.0.0'MTU=''NAME='MCP77 Ethernet'NETMASK=''NETWORK=''REMOTE_IPADDR=''STARTMODE='hotplug'USERCONTROL='no' Then restart the network: /etc/init.d/network restartAfterwards, run ifconfigIt should now show the network bridge (br0): server1:~ # ifconfigbr0 Link encap:Ethernet HWaddr 00:1E:90:F3:F0:02 inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::21e:90ff:fef3:f002/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:45 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4499 (4.3 Kb) TX bytes:5703 (5.5 Kb) eth0 Link encap:Ethernet HWaddr 00:1E:90:F3:F0:02 lo Link encap:Local Loopback server1:~ # OpenSUSE 11.4 Desktop:We need a means of connecting to the graphical console of our guests - we can use virt-manager for this. I'm assuming that you're using an OpenSUSE 11.4 desktop. Become root... su... and run... yast2 -i virt-manager libvirt... to install virt-manager. (If you're using an Ubuntu 10.10 desktop, you can install virt-manager as follows: sudo aptitude install virt-manager) OpenSUSE 11.4 KVM Host: Now let's go back to our OpenSUSE 11.4 KVM host. Take a look at virt-install --helpto learn how to use it. We will create our image-based virtual machines in the directory /var/lib/libvirt/images/ which was created automatically when we installed KVM in chapter two. To create a Debian Squeeze guest (in bridging mode) with the name vm10, 512MB of RAM, two virtual CPUs, and the disk image /var/lib/libvirt/images/vm10.img (with a size of 12GB), insert the Debian Squeeze Netinstall CD into the CD drive and run virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/cdrom --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvmOf course, you can also create an ISO image of the Debian Squeeze Netinstall CD (please create it in the /var/lib/libvirt/images/ directory because later on I will show how to create virtual machines through virt-manager from your OpenSUSE 11.4 desktop, and virt-manager will look for ISO images in the /var/lib/libvirt/images/ directory)... dd if=/dev/cdrom of=/var/lib/libvirt/images/debian-6.0.0-amd64-netinst.iso... and use the ISO image in the virt-install command: virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /var/lib/libvirt/images/debian-6.0.0-amd64-netinst.iso --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvmThe output is as follows: server1:~ # virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /var/lib/libvirt/images/debian-6.0.0-amd64-netinst.iso --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvmStarting install... Tiny Web Proxy And Content Filtering Appliance (Version 1.2) With Debian Squeeze0 komentarThis small HOWTO will show you how to set up a small virtual machine to speed up and secure your home / small enterprise web surfing network using Debian 6, Squid 3.1 and QuintoLabs Content Security 1.2 applications deployed in a VMWare Virtual Player running on Windows 7 x64 as a host operating system. This howto is targeted at novice users and may sometimes seem too thorough for more advanced gurus. While preparing this howto I have tried several different Linux distributions to act as the base for the virtual appliance we are going to create and found out that the one easiest to deploy, having smallest memory footprint and latest packages available is Debian Linux 6. In case you disagree please adjust the instructions of this howto for your favorite distribution and mention the needed changes in comments. I will try to integrate them into the next version of the howto. Go to http://www.debian.org/ and get the smallest ISO image of the latest version of Debian 6 32-bit. The site says the recommended version for a modern server is x64 bit but as we are trying to create a small virtual machine the 32bit will suffice for our purposes. Start up the VMWare Virtual Player and create a new virtual machine with the following hardware parameters: name - virtual-proxy, hard disk - 8Gb. Press the "Customize the hardware" button and delete the floppy, USB controller, printer and sound card, set the amount of memory to 256Mb. Switch the network adapter from "NAT" mode into "Bridged". Point the virtual CDROM to the ISO image that you have downloaded earlier and start the virtual machine. Follow the steps of the Debian install wizard mostly accepting the defaults. Deselect all packages in the "Software Selection" wizard step except for "SSH server" and "Standard system utilities". Configure machine hostname as "proxy" and root password as "P@ssw0rd" (without quotation marks). Now wait a little until the installation is complete and then reboot the system. The following screenshots of the installation show most important steps of the installation process.
After reboot check the amount of free memory available and note that it is around 200Mb (kind of cool comparing to default CentOS 5 installation with 140Mb of free memory available after similar install).
The IP address of the network interface card of our freshly installed Debian server is set to DHCP. While it is possible to leave it like this it means that every time the server is restarted it may be assigned a different IP address so accessing this server later by IP address may become a little irritating. The easiest way is to set the IP address to static one. To do it we must change the file located at /etc/network/interfaces by typing the following in the terminal # nano /etc/network/interfacesFind the line with iface eth0 inet dhcp in the file, remove or comment it out and add the following: # iface eth0 inet dhcpiface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1NOTE: The provided above settings (IP addresses) are valid for my environment that connects to the ISP using the LinkSys Wireless N Broadband Router (with custom dd-wrt firmware) that has a DHCP server build in that gives out internal IP addresses from the 192.168.1.* private subnet. Your router may give other addresses so please beware :) ! One more thing left to do is adjust the DNS settings. Run the following command in the terminal and add the IP address of the DNS server that runs on router: # nano /etc/resolv.confnameserver 192.168.1.1 Now restart your networking by typing #/etc/init.d/networking in the root terminal or just restarting the virtual machine. After restart confirm that the networking functions correctly by typing in the terminal (there should not be any errors in the outputs on these commands): ping -c 3 192.168.1.1nslookup google.com Next small step prior to installing squid is to update the system to the latest version of packages. This will require disabling Debian repositories that refer to CDROM that we used to install the system from and enabling the online repositories. Type the following in the root terminal #nano /etc/apt/sources.list then find and comment all lines that start with deb cdrom:. Save the file by pressing CTRL+o followed by CTRL+x and exit nano. Then perform system update by typing # apt-get update && apt-get upgradein the root terminal. Wait until the system downloads all the updates. Next we need to install the latest version of the squid proxy server. In order to do that type the following in the root terminal: # apt-get install squid3The squid packages is downloaded from the Internet and installed automatically. The only thing to do is to let the external users from our network access the squid. Open the squid configuration file by typing # nano /etc/squid3/squid.confand uncomment the following lines: acl localnet src 192.168.0.0/16 (approximately line 651) and http_access allow localnet (approximately line 786). Save the file and restart the squid by typing # service squid3 restartTo verify that squid runs correctly point your browser to the IP address of the proxy server (192.168.1.2) and surf to some of your favorite websites. Tiny Web Proxy And Content Filtering Appliance (Version 1.2) With Debian Squeeze - Page 2Installing Cherokee With PHP5 And MySQL Support On Debian Squeeze0 komentar Jumat, 29 April 2011Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, TLS and SSL encrypted connections, virtual hosts, authentication, on the fly encoding, load balancing, Apache compatible log files, and much more. This tutorial shows how you can install Cherokee on a Debian Squeeze server with PHP5 support (through FastCGI) and MySQL support. I do not issue any guarantee that this will work for you! In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. First we install MySQL 5 like this: apt-get install mysql-server mysql-clientYou will be asked to provide a password for the MySQL root user - this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on: New password for the MySQL "root" user: <-- yourrootsqlpassword Cherokee is available as a Debian package, therefore we can install it like this: apt-get install cherokeeNow direct your browser to http://192.168.0.100, and you should see the Cherokee placeholder page: Cherokee can be configured through a web-based control panel which we can start as follows: cherokee-admin -b(By default cherokee-admin binds only to 127.0.0.1 (localhost), which means you can only connect to it from the same system. With the -b parameter you can specify the network address to listen to. If no IP is provided, it will bind to all interfaces.) Output should be similar to this one: root@server1:~# cherokee-admin -bLogin: Web Interface: [11/04/2011 12:14:18.622] (error) rrd_tools.c:120 - Could not find the rrdtool binary. You need the username and password to log into the web interface which can be found on http://192.168.0.100:9090/: This is how the web interface looks: To stop cherokee-admin, type CTRL+C on the shell. We can make PHP5 work in Cherokee through FastCGI. Fortunately, Debian provides a FastCGI-enabled PHP5 package which we install like this: apt-get install php5-cgiWe must modify /etc/php5/cgi/php.ini and uncomment the line cgi.fix_pathinfo=1: vi /etc/php5/cgi/php.ini[...]; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting; of zero causes PHP to behave as before. Default is 1. You should fix your scripts; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.; http://php.net/cgi.fix-pathinfocgi.fix_pathinfo=1[...] Then we restart Cherokee: /etc/init.d/cherokee restartInstalling Cherokee With PHP5 And MySQL Support On Debian Squeeze - Page 2 Ubuntu 10.10 LAN Torrent Seedbox With Avalanche-rt, Lighttpd, Rtorrent, Vsftpd And Samba0 komentarThis tutorial is based on a LAN setup, but it should also be applicable for an Internet seedbox (e.g. on a vps or rootds), but some additional steps may need to be performed (firewall, securing rpc-mount, generally hardening of the server). The best lightweight software combination for a seedbox is lighttpd with rtorrent/libtorrent and a nifty web interface. So we use avalanche-rt, an actively developed project which looks very promising. First step is to install the distribution of your choice on your box. Use a minimal installation if possible. The rest of the steps are Ubuntu specific. At the end of the installation choose the ssh-server as additional service which should be installed. After the reboot, first thing we need to do, is to connect to the Internet (if not already). If you, like me, use a laptop as your server, you may want or need to use a wireless connection to connect to the Internet. You can do this without a graphical interface with the neat tool wicd-curses, an ncurses frontend for wicd. Get it with (obviously you need to be connected to the Internet to perform this step, so in most cases you need a wired connection for at least this step): sudo apt-get install wicd-ncursesAfterwards, you may have to manually start the wicd-daemon: sudo /etc/init.d/wicd startThen you should be able to use wicd-curses and connect to your wireless network. If you are connected, perform a system update: sudo apt-get update && sudo apt-get upgradeNext, we install some software which makes live a bit more easy: sudo apt-get install htop mc pydfhtop lets you check you system, mc comes in kind handy when handling a lot of files and pydf gives you nice overview over the space left on your harddrive. Let’s set up the seedbox: First step is to install lighttpd and php: sudo apt-get install lighttpd php5-cgi php5-curlThen we create a file to test if php is working: sudo nano /var/www/phpinfo.phpFill it with: If you now go to you will just see a 403 (Forbidden) error So we have to set up php to work with lighttpd: sudo nano /etc/php5/cgi/php.iniSearch (strg + w)) for cgi.fix_pathinfoand uncomment the line. Save and exit (strg + x). Next, we configure lighttpd to use php5. Open lighttpd.conf... sudo nano /etc/lighttpd/lighttpd.confand add to the server.modulessection (right at the beginning of the file) "mod_fastcgi"and at the end of the file the following: fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php5-cgi", "socket" => "/tmp/php.socket" )))Then restart lighttpd: sudo /etc/init.d/lighttpd restartIf we now go to you should see some information about php. Now we install more rtorrent and other needed software: sudo apt-get install screen libtorrent11 rtorrentGet the default-config for rtorrent (we're in our home-directory now): wget "http://libtorrent.rakshasa.no/export/1135/trunk/rtorrent/doc/rtorrent.rc"and move it to the right location: mv rtorrent.rc .rtorrent.rcCreate needed folders: mkdir downloadsmkdir .session mkdir torrents-watch mkdir torrent-files Next, edit .rtorrent.rc: nano .rtorrent.rcLook for directory =and uncomment it and change it to your needs (in our case: directory = /home/downloads/). Next, search for sessionand uncomment it and change it to your needs (in our case: session = /home/.session/). Go to the end of .rtorrent.rc an insert the following: #SCGI Serverscgi_port = 127.0.0.1:5001Save & exit nano (strg + x). Now we can start rtorrent and check if scgi support is enabled: rtorrentYou should see something like "XMPLRPC initialized with 519 functions."Next step is to enable RPC with lighttpd: sudo nano /etc/lighttpd/lighttpd.confAdd to the server.modulessection the following: "mod_scgi"and at the end of the file the following: #SCGI Serverscgi.server = ("/RPC2" =>( "127.0.0.1" => ("host" => "127.0.0.1","port" => 5001,"check-local" => "disable")))and reload lighttpd: sudo /etc/init.d/lighttpd restartBecause this is a LAN setup, we do not protect the RPC-mount with a username / password combination. You will find it on almost every other tutorial out there and you really should protect the RPC-mount-directory with a strong password if you intend to use your seedbox on a server exposed to the Internet. But in our case it is not necessary and just an additional point of failure. So we now have rtorrent with xmlrpc enabled, and lighttpd with xmlrpc enabled. Now we need the avalanche-rt web interface. Ubuntu 10.10 LAN Torrent Seedbox With Avalanche-rt, Lighttpd, Rtorrent, Vsftpd And Samba - Page 2The Perfect Server - CentOS 5.6 x86_64 [ISPConfig 2]0 komentarThis tutorial shows how to set up a CentOS 5.6 server (x86_64) that offers all services needed by ISPs and web hosters: Apache web server (SSL-capable), Postfix mail server with SMTP-AUTH and TLS, BIND DNS server, Proftpd FTP server, MySQL server, Dovecot POP3/IMAP, Quota, Firewall, etc. This tutorial is written for the 64-bit version of CentOS 5.6, but should apply to the 32-bit version with very little modifications as well. In the end you should have a system that works reliably, and if you like you can install the free webhosting control panel ISPConfig 2 (i.e., ISPConfig runs on it out of the box). I will use the following software: Web Server: Apache 2.2 with PHP 5.1.6 Database Server: MySQL 5.0 Mail Server: PostfixDNS Server: BIND9 (chrooted) FTP Server: ProftpdPOP3/IMAP server: DovecotWebalizer for web site statisticsPlease note that this setup does not work for ISPConfig 3! It is valid for ISPConfig 2 only! I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! To install such a system you will need the following: In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate. Boot from your first CentOS 5.6 CD (CD 1) or the first CentOS 5.6 DVD. Press It can take a long time to test the installation media so we skip this test here: The welcome screen of the CentOS installer appears. Click on Next: Choose your language next: Select your keyboard layout: I'm installing CentOS 5.6 on a fresh system, so I answer Yes to the question Would you like to initialize this drive, erasing ALL DATA? Now we must select a partitioning scheme for our installation. For simplicity's sake I select Remove linux partitions on selected drives and create default layout. This will result in a small /boot and a large / partition as well as a swap partition. Of course, you're free to partition your hard drive however you like it. Then I hit Next: Answer the following question (Are you sure you want to do this?) with Yes: On to the network settings. The default setting here is to configure the network interfaces with DHCP, but we are installing a server, so static IP addresses are not a bad idea... Click on the Edit button at the top right. In the window that pops up uncheck Dynamic IP configuration (DHCP) and Enable IPv6 support and give your network card a static IP address (in this tutorial I'm using the IP address 192.168.0.100 for demonstration purposes) and a suitable netmask (e.g. 255.255.255.0; if you are not sure about the right values, http://www.subnetmask.info might help you): Set the hostname manually, e.g. server1.example.com, and enter a gateway (e.g. 192.168.0.1) and up to two DNS servers (e.g. 8.8.8.8 and 145.253.2.75): Choose your time zone Give root a password: The Perfect Server - CentOS 5.6 x86_64 [ISPConfig 2] - Page 2 How To Automatically Shut Down Your Computer After A Download Finishes0 komentarSometimes you want to download something but don't want to wait until it finishes so you can shut down the computer. In this case you can use Sentinella. Install it with the following command: sudo apt-get install sentinellaNow you can see Sentinella under the System menu of your desktop. Launch it and you will see something like this: Use the same settings as in the screenshot but make sure you choose your main network interface. Just press the Start button and that's it! Installing And Using OpenVZ On CentOS 5.60 komentarIn this HowTo I will describe how to prepare a CentOS 5.6 server for OpenVZ. With OpenVZ you can create multiple Virtual Private Servers (VPS) on the same hardware, similar to Xen and the Linux Vserver project. OpenVZ is the open-source branch of Virtuozzo, a commercial virtualization solution used by many providers that offer virtual servers. The OpenVZ kernel patch is licensed under the GPL license, and the user-level tools are under the QPL license. This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web. This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! In order to install OpenVZ, we need to add the OpenVZ repository to yum: cd /etc/yum.repos.dwget http://download.openvz.org/openvz.repo rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ The repository contains a few different OpenVZ kernels (you can find more details about them here: http://wiki.openvz.org/Kernel_flavors). The command yum search ovzkernelshows you the available kernels: [root@server1 yum.repos.d]# yum search ovzkernel... ovzkernel.i686 : Virtuozzo Linux kernel (the core of the Linux operating system) ovzkernel.x86_64 : Virtuozzo Linux kernel (the core of the Linux operating system) ovzkernel-PAE.i686 : The Linux kernel compiled for PAE capable machines. ovzkernel-PAE-debug.i686 : The Linux PAE kernel compiled with debug config ovzkernel-PAE-devel.i686 : Development package for building kernel modules to match the PAE kernel. ovzkernel-debug.i686 : The Linux kernel compiled with debug config ovzkernel-debug.x86_64 : The Linux kernel compiled with debug config ovzkernel-devel.i686 : Development package for building kernel modules to match the kernel. ovzkernel-devel.x86_64 : Development package for building kernel modules to match the kernel. ovzkernel-ent.i686 : The Linux kernel compiled for huge mem capable machines. ovzkernel-ent-debug.i686 : The Linux ent kernel compiled with debug config ovzkernel-ent-devel.i686 : Development package for building kernel modules to match the ent kernel. ovzkernel-xen.i686 : The Linux kernel compiled for Xen VM operations ovzkernel-xen.x86_64 : The Linux kernel compiled for Xen VM operations ovzkernel-xen-devel.i686 : Development package for building kernel modules to match the kernel. ovzkernel-xen-devel.x86_64 : Development package for building kernel modules to match the kernel. [root@server1 yum.repos.d]# Pick one of them and install it as follows: yum install ovzkernelThis should automatically update the GRUB bootloader as well. Anyway, we should open /boot/grub/menu.lst; the first kernel stanza should now contain the new OpenVZ kernel. The title of that kernel just reads "CentOS". I think it's a good idea to change that title and add something with "OpenVZ" to it so that you know that it's the OpenVZ kernel. Also make sure that the value of default is 0 so that the first kernel (the OpenVZ kernel) is booted automatically instead of the default CentOS kernel. vi /boot/grub/menu.lst# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE: You have a /boot partition. This means that# all kernel and initrd paths are relative to /boot/, eg.# root (hd0,0)# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00# initrd /initrd-version.img#boot=/dev/sdadefault=0timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle CentOS OpenVZ (2.6.18-238.5.1.el5.028stab085.5) root (hd0,0) kernel /vmlinuz-2.6.18-238.5.1.el5.028stab085.5 ro root=/dev/VolGroup00/LogVol00 initrd /initrd-2.6.18-238.5.1.el5.028stab085.5.imgtitle CentOS (2.6.18-238.el5) root (hd0,0) kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00 initrd /initrd-2.6.18-238.el5.img Now we install some OpenVZ user tools: yum install vzctl vzquotaOpen /etc/sysctl.conf and make sure that you have the following settings in it: vi /etc/sysctl.conf[...]net.ipv4.ip_forward = 1net.ipv4.conf.default.proxy_arp = 0net.ipv4.conf.all.rp_filter = 1kernel.sysrq = 1net.ipv4.conf.default.send_redirects = 1net.ipv4.conf.all.send_redirects = 0net.ipv4.icmp_echo_ignore_broadcasts=1net.ipv4.conf.default.forwarding=1[...] If you need to modify /etc/sysctl.conf, run sysctl -pafterwards. The following step is important if the IP addresses of your virtual machines are from a different subnet than the host system's IP address. If you don't do this, networking will not work in the virtual machines!Open /etc/vz/vz.conf and set NEIGHBOUR_DEVS to all: vi /etc/vz/vz.conf[...]NEIGHBOUR_DEVS=all[...] SELinux needs to be disabled if you want to use OpenVZ. Open /etc/sysconfig/selinux and set the value of SELINUX to disabled: vi /etc/sysconfig/selinux# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - SELinux is fully disabled.SELINUX=disabled# SELINUXTYPE= type of policy in use. Possible values are:# targeted - Only targeted network daemons are protected.# strict - Full SELinux protection.SELINUXTYPE=targeted Finally, reboot the system: rebootIf your system reboots without problems, then everything is fine! Run uname -rand your new OpenVZ kernel should show up: [root@server1 ~]# uname -r2.6.18-238.5.1.el5.028stab085.5 [root@server1 ~]# Installing And Using OpenVZ On CentOS 5.6 - Page 2 ISPConfig Monitor App For Android0 komentarThe ISPConfig Monitor App is for all servers, not only for servers running ISPConfig. With the ISPConfig Monitor App, you can check your server status and find out if all services are running as expected. You can check TCP and UDP ports and ping your servers. In addition to that you can use this app to request details from servers that have ISPConfig installed (please note that the minimum installed ISPConfig 3 version with support for the ISPConfig Monitor App is 3.0.3.3!); these details include everything you know from the Monitor module in the ISPConfig Control Panel (e.g. services, mail and system logs, mail queue, CPU and memory info, disk usage, quota, OS details, RKHunter log, etc.), and of course, as ISPConfig is multiserver-capable, you can check all servers that are controlled from your ISPConfig master server. For download and usage instructions, please visit http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/. Firefox 4 Downloaded Over 7 Million Times And Counting0 komentar Kamis, 28 April 2011
Mozilla team has released the latest version of its flagship product - Firefox 4.
Firefox 4 has been downloaded over 7 million times since its official release. This new avatar of the popular web browser from Mozilla stables makes extensive use of HTML 5 to render web pages. It also uses hardware acceleration when displaying HTML 5 pages - drawing on the power of a computer's graphics processor to improve the speed of complex visuals. Speed of rendering graphics, loading web pages faster, and better start up times. Less clutter - Firefox 4 has been re-designed to make it less intrusive, allowing for a much richer web browsing experience. Panorama - It is intelligent tab grouping at its best. You can group tabs containing similar web pages and switch between the groups. Just press "Ctrl + Alt + E" to move into Panorama mode. Synchronize your data - This includes your bookmarks, passwords, preferences, and history. In Firefox 3, this was made possible using an addon. However, in Firefox 4, this is an inbuilt feature. Private browsing - Now you can surf to your hearts content knowing that cookies are not stored on your machine thus giving you a semblance of privacy. Improved security - Firefox 4 is not vulnerable to cross site scripting attacks as it supports HTTP Strict Transport Security, or HSTS. Integrated Add-ons, Plugins, Appearance ,and Extensions dialog that opens in its own tab. You can install, uninstall, and manage all your extensions, plugins, and addons from this dialog. Head over to Mozilla website to download Firefox 4. Debian Is No Longer Just A Linux Distribution0 komentar
Debian stable version 6.0 code named "Squeeze" has been released. After 24 months of arduous testing, the Debian team has finally released v 6.0 which brings many firsts among its features. They are -
Technical previews of two new ports which runs on the FreeBSD kernel instead of the Linux kernel. This means FreeBSD will be powering the operating system while the users still get to use all the great tools in the Debian user-land.The Linux kernel has been scrubbed free of all the closed sourse firmware files. In other words, you get a completely Free as in Freedom Linux distribution in Debian 6.0 if you opt to download the package with Linux kernel instead of the FreeBSD kernel. Richard Stallman should definitely be pleased with this one.Boot times have improved drastically because of parallel execution of boot scripts.Most software has been updated to the more modern versions. Linux kernel 2.6.32 , KDE 4.4.5, GNOME 2.30, X.Org 7.5 and over 29,000 other ready to use software packages. Did you know that Debian supports diverse hardware ranging from Intel 32-bit and 64-bit architecture, Motorola/IBM PowerPC, Sun/Oracle Sparc, MIPS (big-endian & little-endian), Intel Itanium, IBM S/390, and ARM EABI ? That is a total of 9 architectures. Another really nice feature found in Debian 6.0 is the introduction of what is called "Debian Pure Blends". Debian pure blends are customized Debian images which cater to a specific user profile. For example, if you wish to install Debian for your kids, you could download Debian-Jr which is specifically customized with children in mind. Similarly there are other pure blends such as Debian Med, Debian Science, Skolelinux and so on. The Debian installer has also seen minor improvements in the form of easier language and keyboard selections, partitioning disk for RAID, Logical Volumes, and Encrypted systems. And the installer supports a whopping 70 languages. You can download Debian 6.0 via BitTorrent, jigdo, or HTTP. [Source : Debian News Release ] Pinguy OS - An Ubuntu Based Linux Distribution on Steroids0 komentar
Ubuntu has helped spawn umpteen Linux distributions. Pinguy OS is yet another Linux distribution based on Ubuntu (version 10.10 to be exact).
Pinguy OS is targeted at lay persons - people who are going to use Linux for the first time, or those who want an out-of-box working OS. I was visibly impressed with the screenshots of Pinguy OS desktop I chanced at various places on the Net that, I decided to download this Linux distribution (essentially built from Ubuntu Minimal CD) and take it for a spin. I tried out Pinguy OS on my two year old PC which has Intel Core 2 Duo processor, 2 GB RAM, 128 MB onboard Graphics memory, and a 320 GB hard disk. Put in one word - Fabulous! The Pinguy OS Desktop is awesome. Clearly, a lot of work has gone into building this distribution. When you first boot into the LiveDVD, you are presented with the super tweaked GNOME desktop in all its glory. Compiz is the default window manager. However, if your machine is not powerful enough, the Desktop falls back to the fail-safe mode by disabling many special effects. Pinguy OS comes with a plethora of software for almost any task you may wish to do using your computer. Each software that is included in Pinguy OS is choosen carefully. A lot of software which is aimed to enhance the user experience has made its way into the Pinguy OS distribution. The notable ones being Gloobus Preview, Cover Gloobus, Cover Thumbnailer, Global Menu (which turns the GNOME top panel into a dynamic 'Apple Mac OS X' style menu for applications), Conky (which displays live system stats on the Desktop), Docky (That provides a Mac OS X style panel), and GNOME Do. Another interesting utility that I found in Pinguy OS is the Webbilder applet. This applet downloads popular photos from online photo sharing sites - Webshots and Flickr; and sets them as the wallpaper on your Desktop. The Graphics tool collection is quite modest and GIMP hasn't made into the Pinguy OS graphics selection. However, Pinguy OS comes with another graphics editing tool called Pinta which is a decendent of Paint.NET. There are two tools for photo management namely Rapid Photo Downloader and Shotwell. And for taking screenshots, you have Shutter which can be favourably compared to the professionally used Techsmith product SnagIT. Firefox (3.6) - the defacto standard for Web browsing - is the default web browser in Pinguy OS. However, the developers have gone one step further in including over a dozen useful extensions in Firefox - which is really thoughtful. Other changes compared to Ubuntu are - Bittorent client Deluge replaces Transmission. Email client Thunderbird takes the place of Evolution. XChat is included as well. A notable feature of Pinguy OS is the inclusion of two popular, closed source albeit free software namely - Skype and Dropbox client. Fostwire which is a peer to peer program used to share files with others has also been included. Pinguy OS does not ship with any games. However, it comes with a wonderful application (software manager) called "PlayOnLinux". The first time you start "PlayOnLinux", it's wizard will start downloading updates. Once that is done, "PlayOnLinux" will present a collection of games (proprietary and otherwise). The collection is quite good. On the system side, Oracle VirtualBox is installed. Apart from that, Pinguy OS also comes with a dedicated backup tool in Dejapup; Wine and Winegame for installing Windows software and games; Ubuntu Tweak and Ailurus which allows you to tweak all the aspects of the Desktop and more. Ubuntu by default ships with a firewall called ufw. However, it is disabled by default. And because it is a command line tool, ordinary users may not be aware of it. Pinguy OS has included a GUI front-end for ufw called Gufw which makes it much easier to enable the ufw firewall and use it. Then there is Bum (Boot Up Manager) which is a graphical front-end to configure run-levels and start up services, which is also included in Pinguy OS. Gnome Activity Journal is another software which caught my fancy in Pinguy OS. Gnome Activity Journal is powered by Zeitgeist and provides a time line of all the files you have accessed in the past. This is another area where Pinguy OS shines quite well. I was able to play music and movies in almost all the audio and video formats. Anybody with a TV card that wants to watch tv on their PC will be able to do so in Pinguy OS. Some of the notable software in this section found in Pinguy OS are - Brasero and DeVeDe for burning CDs DVDs and BlueRay disks; HandBrake - a DVD transcoder, MPlayer, VLC Media player, Open Shot video editor which allows you to open and edit movies ... just to name a few. The amount of finetuning that has gone into this project is quite amazing. For instance, when I press the print screen key, Shutter pops up and takes a screenshot instead of the elementary screenshot tool found in GNOME. Conky has been spruced up with a custom configuration file which makes it a joy to display on the Desktop. The special effects are vivid without being garish. All the multimedia codecs are there. So is Oracle Java and Adobe Flash player. Pinguy OS also helps reduce your carbon footprint because it runs Granola in the background. Granola is a free tool that helps reduce the power consumption of your computer without affecting its performance. Pinguy OS is indeed an amazing work and a true user friendly Linux distribution. But that doesn't mean I didn't find any glitches (minor ones really). And this post won't be a complete review if I didn't write about it. There was a mismatch in some of keys on my keyboard. For instance, when I pressed the "|" key, I got a tilde (~) on the screen. This is because Pinguy OS uses a default keyboard layout for United Kingdom instead of USA. Changing the keyboard layout to "USA" solved this problem.Atleast when running the liveDVD, Conky overlaps all opened applications. Restarting Conky solved this problem as well.There is no e-book reader which could read ePUB and MOBI files. One such as FBReader would have been a nice fit. I found some applications which were too similar in their purpose. For instance, Shotwell and Rapid Music Downloader are photo management programs and does more or less the same stuff. I prefer Shotwell over the latter because the latest version 0.8 of Shotwell has support for videos, including uploading videos to social video sites such as YouTube. Similarly, I found 3 different movie players. I do agree that variety is the spice of life but ... too much variety could overwhelm the users as well.Call me old fashioned if you will, but I feel GIMP is a superior graphics editor than Pinta. Including GIMP would have made the Graphics package more complete in Pinguy OS. Of course you can always install GIMP from Synaptic package manager on your own. But then that defeats the USP of Pinguy OS namely - "an out-of-the-box working OS without doing all the tweaks and enhancements". Considering that Ubuntu 11.04 is all set to move towards Unity and GNOME Shell, and because Pinguy OS is based on Ubuntu, one wonders what is in store for this really cool Ubuntu cousin. Here is what the Pinguy OS developer has to say about this (and I quote) - I have no plans to use Gnome Shell or Unity for 11.04. Pinguy OS 11.04 desktop will stay mostly unchanged to how it is now. In this lengthy review, I have just scratched the surface of what Pinguy OS has to offer. What I really like about Pinguy OS is the amount of work that has gone into making it a truly user friendly Linux experience. Anyone who uses Pinguy OS will fall in love with Linux. Period. How To Create A Screencast In GNOME 30 komentar
GNOME 3 has an inbuilt software that allows you to record your desktop. This makes it very easy to create a screencast in GNOME 3. Here is how you do it ...
You can start/stop recording your GNOME 3 Desktop by pressing the Ctrl+Shift+Alt+R key combination. The first time when you press this key combination, GNOME 3 will start recording your Desktop and any movements that happen on it. A red circle is displayed in the bottom right corner of the screen when the recording is in progress. Pressing the same key combination a second time will stop the recording. After the recording is finished, a file named 'shell-%d%u-%c.webm' is saved in the home directory. In the filename, %d is the date, %u is a string that makes the filename unique, and %c is a counter that is incremented each time a recording is made within a single gnome-shell session. The recording is saved in the WebM format. WebM is an open media file format designed for the web. WebM files consist of video streams compressed with the VP8 video codec and audio streams compressed with the Vorbis audio codec. The WebM file structure is based on the Matroska media container. KDE Version 4.6.0 Released - Integrates Support For Mobile Devices0 komentar
KDE team has released version 4.6.0 of its flagship product - The KDE Desktop. This is a major release that brings lots of improvements, and which promises a far better user experience.
The notable enhancements you will find in KDE 4.6.0 are as follows - And if you are itching to try out KDE 4.6.0, I would strongly recommend a Linux distribution which has a rolling release because these Linux distributions bring changes far more quicker than traditional Linux distributions which follow a 6 month release schedule.Arch Linux, and PCLinuxOS support a rolling release. Switching To Linux - Tale Of A Former Mac User Who Is Also A Musician0 komentar Rabu, 27 April 2011However, if you rely on your computer for a living, then you need to do some preparations prior to making the switch. Kim Cascone, an experienced and gifted musician and composer had been using an Apple PowerBook to compose music. When his PowerBook G4 exhibited signs of age, he did a quick fact check and found that he could save as much as $3000 (which includes the machine and the software costs) if he switched to Linux. Read Kim Cascone's tale of Switching to Linux - Linux Music Workflow. Ubuntu Might Ship With Qt Libraries0 komentar
In future iterations of Ubuntu (Natty and onwards), Ubuntu CD might ship with Qt libraries - Mark Shuttleworth noted in one of his blog post.
The basic premise behind this announcement is that it is the quality and usability of the application (to be included) that is important; the choice of toolkit should be irrelevant. However, this is going to change in the future. Mark Shuttleworth further suggests a procedure (see flowchart below) to decide what applications will go into a default Ubuntu install. He further clarifies that Qt applications should not be confused with KDE apps. And if KDE applications are to be included in a default Ubuntu install, they should be able to interact with the dconf system configuration. Unfortunately, as of now, this is difficult as Gtk apps all use a centrally-manageable preferences store, and KDE apps do things differently.[Source : Mark Shuttleworth]
Langganan:
Komentar (Atom)
Blog Archive
Labels
|