RSS

Monthly Archives: January 2010

Installing XAMPP in Linux

What is XAMPP ?

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. LAMPP (XAMPP for Linux) is very easy to install and to use – just download, extract and start.

Download XAMPP

http://sourceforge.net/projects/xampp/files/XAMPP Linux/

Installing XAMPP in Linux

Download XAMPP Latest version from the following link
http://sourceforge.net/projects/xampp/files/XAMPP Linux

Currently latest XAMPP version is 1.7.3a

$wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.7.3a/xampp-linux-1.7.3a.tar.gz?use_mirror=nchc

Now you should be having xampp-linux-1.7.3a.tar.gz in your downloaded location

Go to a Linux shell and login as root:
Perform these commands as root user

$ su -p
Extract the downloaded archive file to /opt

#tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

XAMPP is now installed below the /opt/lampp directory.

Start XAMPP Server

To start XAMPP simply call this command:

#/opt/lampp/lampp start

Starting XAMPP for 1.7.3a…
XAMPP: Starting Apache with SSL (and PHP5)…
XAMPP: Starting MySQL…
XAMPP: Starting ProFTPD…
XAMPP for Linux started.

Test Your XAMPP Installation

OK, that was easy but how can you check that everything really works? Just type in the following URL at your favourite web browser:

http://localhost

Starting LAMPP automatically on startup

Starting LAMPP automatically on startup

XAMPP Security Configuration

As mentioned before, XAMPP is not meant for production use but only for developers in a development environment. The way XAMPP is configured is to be open as possible and allowing the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.

Here a list of missing security in XAMPP:

The MySQL administrator (root) has no password.
The MySQL daemon is accessible via network.
ProFTPD uses the password “lampp” for user “nobody”.
PhpMyAdmin is accessible via network.
Examples are accessible via network.
MySQL and Apache running under the same user (nobody).
To fix most of the security weaknesses simply call the following command:

#/opt/lampp/lampp security

It starts a small security check and makes your XAMPP installation more secure.
Start And Stop Server Services

start
Starts XAMPP.

stop
Stops XAMPP.

restart
Stops and starts XAMPP.

startapache
Starts only the Apache.

startssl
Starts the Apache SSL support. This command activates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay activated.

startmysql
Starts only the MySQL database.

startftp
Starts the ProFTPD server. Via FTP you can upload files for your web server (user “nobody”, password “lampp”). This command activates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay activated.

stopapache
Stops the Apache.

stopssl
Stops the Apache SSL support. This command deactivates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay deactivated.

stopmysql
Stops the MySQL database.

stopftp
Stops the ProFTPD server. This command deactivates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay deactivated.

security
Starts a small security check programm.

For example: To start Apache with SSL support simply type in the following command (as root):

#/opt/lampp/lampp startssl

You can also access your Apache server via SSL under https://localhost.

Important Configuration Files And Directories

/opt/lampp/bin/ – The XAMPP commands home. /opt/lampp/bin/mysql calls for example the MySQL monitor.
/opt/lampp/htdocs/ – The Apache DocumentRoot directory.
/opt/lampp/etc/httpd.conf – The Apache configuration file.
/opt/lampp/etc/my.cnf – The MySQL configuration file.
/opt/lampp/etc/php.ini – The PHP configuration file.
/opt/lampp/etc/proftpd.conf – The ProFTPD configuration file. (since 0.9.5)
/opt/lampp/phpmyadmin/config.inc.php – The phpMyAdmin configuration file.

Stopping XAMPP

To stop XAMPP simply call this command:

#/opt/lampp/lampp stop

You should now see:

Stopping XAMPP 1.7.3a…
XAMPP: Stopping Apache…
XAMPP: Stopping MySQL…
XAMPP: Stopping ProFTPD…
XAMPP stopped.

And XAMPP for Linux is stopped.

Starting LAMPP automatically on startup

For starting LAMPP automatically on startup, add the following line to you /etc/rc.local file

# /opt/lampp/lampp start

where /opt/lampp is the location where XAMPP files are kept. You will have to substitute the path to your XAMPP in the above command.

Uninstall XAMPP From your Machine

To uninstall XAMPP just type in this command

#rm -rf /opt/lampp


Advertisements
 

Tags: , , , , , , , , , , , ,

Install RED5 with java tomcat on linux

Red5 is an Open Source Flash Server written in Java that supports:

  • Streaming Audio/Video (FLV, h264, AAC, and MP3)
  • Recording Client Streams (FLV only)
  • Shared Objects
  • Live Stream Publishing
  • Remoting (AMF)

export variables in /etc/bashrc to become available for every user login or for any terminal opens.

echo “export ANT_HOME=/usr/local/ant” >> /etc/bashrc
echo “export JAVA_HOME=/usr/lib/jvm/java” >> /etc/bashrc

set CLASS PATH for java

# vi /etc/profile

JAVA_HOME=/usr/java/jdk1.6
export JAVA_HOME

Start/Stop Tomcat

# cd /usr/java/tomcat/bin
# ./shutdown.sh
# ./startup.sh

# cd ../webapps/
# netstat -ntlp|grep 1935

Install Tomcat

# wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
# tar xzf apache-tomcat-6.0.20.tar.gz
# ls
# mv apache-tomcat-6.0.20 tomcat
# mv tomcat /usr/java/
# cd /usr/java/tomcat/
# vi /etc/profile    (set class path)
# source /etc/profile
# /usr/java/tomcat/bin/startup.sh

Install Red 5

# wget http://dl.fancycode.com/red5/war/red5-0.6.2-java6.war
# ls
# cp red5-0.6.2-java6.war  /usr/java/tomcat/webapps/
# cd /usr/java/tomcat/bin
# ./shutdown.sh
# netstat -ntlp|grep 1935
# netstat -ntlp|grep 8080
# ./catalina.sh start

We are always hungry for TIME 😉


Lunarpages.com Web Hosting

 

Tags: , , , , , , , , ,

Linux Mail Servers

Manual Settings
~~~~~~~~~~~~

Mail Server Username: no-reply+domain.com
Incoming Mail Server: mail.domain.com
Incoming Mail Server: (SSL) host200.hostmonster.com
Outgoing Mail Server: mail.domain.com (server requires authentication) port 26
Outgoing Mail Server: (SSL) host200.hostmonster.com (server requires authentication) port 465
Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS)
Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)

Warning: Changing MX to something besides domain.com will prevent us from managing your mail. The email will no longer be sent to this server.

Increase RAM size
~~~~~~~~~~~~~~

Some time there is problem with kernel.. as rams physically is 8GB. The reason for 3GB RAM is kernel not updated, so the high volume memory is not recognized. Try this command to update ram size:

# yum install kernel-PAE

http://www.cyberciti.biz/tips/category/mail-server

 
1 Comment

Posted by on January 30, 2010 in Amazon Cloud EC2 S3, CentOS, Fedora, Linux, Tips, Tricks

 

Tags: , , , , , , , , , , , ,

Amazon EBS

Amazon Elastic Block Storage (EBS)

We can use Amazon EBS just like as the CD/DVD/Pen Drives on our PC/Laptops Servers for backup or data transfer…
EBS can attach to an EC2 instance, we can use EBS to save work files in it.. for it we have to mount it in the instance after backup we can unmount it, and detach it.
We can use the volume afterward by mounting it in another instance but different instances at the same time can not use same EBS volume.

Starting an Instance

# ec2-describe-images -o self -o amazon | grep machine
# ec2-add-keypair gsg-keypair (save this keypair for connecting instance via SSH)
# chmod 600 id_rsa-gsg-keypair ; ls -l id_rsa-gsg-keypair
# ec2-run-instances ami-235fba4a -k gsg-keypair
# ec2-describe-instances i-ae0bf0c7

Authorize ports to connect remotely…
# ec2-authorize default -p 22
# ec2-authorize default -p 80

Connect to instance
# ssh -i id_rsa-gsg-keypair root@ec2-67-202-51-223.compute-1.amazonaws.com

Create the Volume
# ec2-create-volume –size 1 -z us-east-1c
Create this volume in same availability zone

# ec2-describe-volumes vol-4771e479

Attaching the Volume
# ec2-attach-volume vol-4771e479 -i i-ae0bf0c7 -d /dev/sda

Formatting the Volume
# ssh -i id_rsa-gsg-keypair root@ec2-67-202-51-223.compute-1.amazonaws.com
# ls /dev
# yes | mkfs -t ext3 /dev/sda

Mounting the Volume
# mkdir /mnt/svnlabs-data
# mount /dev/sdh /mnt/svnlabs-data

Put a file on the volume
# vi /mnt/svnlabs-data/svnlabs.txt (put content here)

Unmounting the Volume
# cd ~
# umount /mnt/svnlabs-data

Detach the Volume
# ec2-detach-volume vol-4771e479 -i i-ae0bf0c7 -d /dev/sda

As we attach this volume to other instance we will get our svnlabs-data folder to new instance…

svnlabs will post some new articles on “Amazon Web Services” 😉 subscribe to svnlabs feeds

 
 

Tags: , , , , , , , , , , , , , , , ,

Crontab Command Line

crontab Crontab Command Line

1. dump the content of the existing crontab to a file
# crontab > /tmp/dump
2. echo “your lines” >> to the corntab file
# echo ” 00 1 * * * /monitor_file_system 2>/dev/null” >> /tmp/dump
3. import the new crontab
# crontab /tmp/dump

other option….
# crontab -e
It will open a editor, add job here like
00 1 * * * /monitor_file_system 2>/dev/null

Set cronjob from other server:
# crontab -e
0 0 * * * curl http://www.domain.com/svnlabs.php

here svnlabs.php file is located on different server…

and save this crontab files…. now cronjob successfully installed 🙂

 

Tags: , , , , , , , , ,