Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,210
» Latest member: greg22
» Forum threads: 4,029
» Forum posts: 16,404

Full Statistics

Online Users
There are currently 490 online users.
» 0 Member(s) | 487 Guest(s)
Applebot, Bing, Google

Latest Threads
How to install Archboot i...
Forum: Network Problems
Last Post: Meup
2025-05-13, 01:41 PM
» Replies: 0
» Views: 366
clear logs in smoothwall
Forum: Security and Firewalls
Last Post: amanda63
2024-03-10, 03:27 PM
» Replies: 8
» Views: 83,473
I cannot install RedHat 8...
Forum: Redhat
Last Post: hybrid
2023-11-11, 01:01 PM
» Replies: 1
» Views: 38,300
How things are done, usin...
Forum: Xorg Problems
Last Post: ross
2023-09-04, 09:03 AM
» Replies: 0
» Views: 1,827
Im back.....
Forum: Hello
Last Post: anyweb
2021-01-17, 11:36 AM
» Replies: 1
» Views: 5,295
add mp3 plugin to xmms in...
Forum: Fedora
Last Post: anyweb
2021-01-17, 11:30 AM
» Replies: 11
» Views: 41,243
Configuring VSFTPd Server
Forum: FTP Server
Last Post: Johnbaca
2020-10-14, 10:25 AM
» Replies: 32
» Views: 113,355
Wolf won't play sound!
Forum: Game Problems
Last Post: Guest
2020-10-03, 05:51 PM
» Replies: 1
» Views: 51,936
Using git + python
Forum: How Do I?
Last Post: Clueless puppy
2020-08-21, 04:37 PM
» Replies: 0
» Views: 42,179
what does your nick mean ...
Forum: Hello
Last Post: volt
2020-08-06, 03:25 PM
» Replies: 28
» Views: 41,476

 
  Apache
Posted by: kernel2 - 2004-04-04, 11:37 PM - Forum: LAMP - Replies (2)


Hi

 

I have a question and can you please give me a example of how I can added a secibd vhosting under apache? The server domain name is cyberchatnet..com and the directory is located in the /home/www directory.

 

I am tyying tgo add a second domain as ecoads.net and I want everything to point to the /home/ecoads directory. I also need it to be www.ecoads.net and ecoads.net. I gave up oin trrying to do it with web admin, so I am doing this manualy.

 

I also need to define a different log file for each virtual host.

 

 

<VirtualHost 65.110.39.130>

DocumentRoot /home/www

ServerName cyberchatnet.com

</VirtualHost>

 

 

Thank you

Print this item

  how to vnc to another pc via SSH
Posted by: anyweb - 2004-04-04, 10:11 AM - Forum: Remote Access - Replies (6)


to VNC to another computer using ssh (secure) you can do as follows:-

 

why would you want to do this ? because the vnc protocol is not secure in itself and can be sniffed see this quote from the vnc FAQ

 

Quote:Q55 How secure is VNC? 

 

Print this item

  what do you run linux on ?
Posted by: anyweb - 2004-04-02, 10:45 PM - Forum: Polls - Replies (14)


i use mostly p4 desktops and p3 or banias based laptops

 

what do you use ?

 

if it's unusual tell us !

 

cheers

 

anyweb

Print this item

  How to Backup Mysql Databases Script
Posted by: Strabo - 2004-04-02, 07:13 PM - Forum: LAMP - Replies (1)


This script will backup your mysql databases, gzip them up, ftp them off site, email you confirmation. For emailing you you have to create a file with the text for the body of the email. The email file used in this script is

 

Quote:/usr/local/logs/sqlbackup
sqlbackup could have something like this in it. 

Quote:Mysql database backup was successfully completed. Your a demigod!
 

To do several databases just do like this to backup 4 databases named db1 - db4

 

Quote:databases="db1 db2 db3 db4"
The Actual Script!!! 

Quote:#!/bin/sh 

# This script will backup one or more mySQL databases

# and then optionally email them and/or FTP them

 

# This script will create a different backup file for each database by day of the week

# i.e. 1-dbname1.sql.gz for database=dbname1 on Monday (day=1)

# This is a trick so that you never have more than 7 days worth of backups on your FTP server.

# as the weeks rotate, the files from the same day of the prev week are overwritten.

 

############################################################

#===> site-specific variables - customize for your site

 

# List all of the MySQL databases that you want to backup in here,

# each seperated by a space

databases="<db name here>"

 

# Directory where you want the backup files to be placed

backupdir=/usr/local/backup

 

# MySQL dump command, use the full path name here

mysqldumpcmd=/usr/local/mysql/bin/mysqldump

 

# MySQL Username and password

userpassword=" --user=<username here> --password=<password here>"

 

# MySQL dump options

dumpoptions=" --quick --add-drop-table --add-locks --extended-insert --lock-tables"

 

# Unix Commands

gzip=/bin/gzip

uuencode=/usr/bin/uuencode

mail=/bin/mail

 

# Send Backup?  Would you like the backup emailed to you?

# Set to "y" if you do

sendbackup="y"

subject="mySQL Backup"

mailto="<email here>"

 

#===> site-specific variables for FTP

ftpbackup="n"

ftpserver="<ftp server here>"

ftpuser="<login here>"

ftppasswd="<pass here>"

# If you are keeping the backups in a subdir to your FTP root

ftpdir="forums"

 

#===> END site-specific variables - customize for your site

############################################################

 

# Get the Day of the Week (0-6)

# This allows to save one backup for each day of the week

# Just alter the date command if you want to use a timestamp

DOW=`date +%C%y%m%d`

 

# Create our backup directory if not already there

mkdir -p ${backupdir}

if [ ! -d ${backupdir} ]

then

echo "Not a directory: ${backupdir}"

exit 1

fi

 

# Dump all of our databases

echo "Dumping MySQL Databases"

for database in $databases

do

$mysqldumpcmd $userpassword $dumpoptions $database > ${backupdir}/${DOW}-${database}.sql

done

 

# Compress all of our backup files

echo "Compressing Dump Files"

for database in $databases

do

rm -f ${backupdir}/${DOW}-${database}.sql.gz

$gzip ${backupdir}/${DOW}-${database}.sql

done

 

# Send the backups via email

if [ $sendbackup = "y" ]

then

for database in $databases

do

#      $uuencode ${backupdir}/${DOW}-${database}.sql.gz > ${backupdir}/${database}.sql.gz.uu

#      $mail -s "$subject : $database" $mailto < ${backupdir}/${DOW}-${database}.sql.gz.uu

$mail -s "$subject : $database" $mailto </usr/local/logs/sqlbackup

  done

fi

 

# FTP it to the off-site server

echo "FTP file to $ftpserver FTP server"

if [ $ftpbackup = "y" ]

then

for database in $databases

do

      echo "==> ${backupdir}/${DOW}-${database}.sql.gz"

ftp -n $ftpserver <<EOF

user $ftpuser $ftppasswd

bin

prompt

cd $ftpdir

lcd ${backupdir}

put ${DOW}-${database}.sql.gz

quit

EOF

done

fi

 

# And we're done

ls -l ${backupdir}

echo "Dump Complete!"

exit
 

Note to attach a backup to your email you have to use "uuencode" which I personally do not do as I would rather not attach several megs or hundreds of megs to my email.

 

Strabo

Print this item

  How to install/configure phpMyAdmin
Posted by: square - 2004-04-02, 06:39 PM - Forum: LAMP - Replies (4)


INSTALLING phpMyAdmin

 

OK, lemme add a bit more for phpMyAdmin, nice little program written in PHP to admin your new mysql databases..

 

First things first, we need to get the latest version of phpMyAdmin, at the time this tutorial was written the latest stable version was 2.5.6, and you can get it at;

 

The phpMyAdmin Home page

 

OK open a terminal/console window..

 

Change to the directory where you saved the downloaded file , such as;

 



Code:
cd /home/square/downloads  <enter>




 

okay, now we need to move the file to the root directory of your Apache webserver, which is usually /usr/local/apache/htdocs, also, root usually owns the Apache directory structure so you'll need to do the rest as root, so;

 



Code:
su  <enter>




 

Note: no dash needed, THIS time only.

 

Enter your root pass then press enter.

 

Now, lets move the file to where we need it;

 



Code:
mv phpMyAdmin-2.5.6.tar.gz /usr/local/apache/htdocs <enter>




 

Note: you may want to su - now to grab roots profile, if you think you'll need it.

 

Now make the Apache root directory your working directory;

 



Code:
cd /usr/local/apache/htdocs  <enter>




 

Now lets unpack the file;

 



Code:
tar -zxvf phpMyAdmin-2.5.6.tar.gz  <enter>




 

That will take a second, then, when the machine returns the prompt, do a directory listing;

 



Code:
ls  <enter>




 

You should see a new directory which has been created called phpMyAdmin-2.5.6, assuming you do, go ahead and get rid of the original file;

 



Code:
rm phpMyAdmin-2.5.6.tar.gz <enter>




 

Now, the new directory name is a bit long, and definatley not something you want to type in all the time, so lets make it easier;

 



Code:
mv phpMyAdmin-2.5.6 phpmyadmin <enter>




 

Cool, now you've renamed the directory to something a little easier to remember, now make that your working directory;

 



Code:
cd phpmyadmin <enter>




 

 

CONFIGURING phpMyAdmin

 

Now, what we need to do is edit the config.inc.php file so it works with your setup. So using vi, or whatever your favorite editor happens to be, open config.inc.php, find the following lines, and edit them as appropriate for your setup;

 



Code:
...

$cfg['PmaAbsoluteUri'] = ''; (Default)
$cfg['PmaAbsoluteUri'] = 'http://www.yoursite.com/phpmyadmin/'; (Edited)

$cfg['Servers'][$i]['user'] = 'root'; (Default)
$cfg['Servers'][$i]['user'] = 'your_MySQL_root_user'; (Edited)

$cfg['Servers'][$i]['password'] = ''; (Default)
$cfg['Servers'][$i]['password'] = 'your_password'; (Edited)

...




 

Thats it, save the file and close it.

 

Now, lets see if it works, open a browser and point it to phpMyAdmin by using your site info such as www.yoursite.com/phpmyadmin, or, localhost/phpmyadmin if you are only working locally. If all is well you should see the welcome screen for phpMyAdmin !, if you don't, then check your logs and remember, Google is your friend. If you see a page full of PHP errors, make sure you used the correct username and password when you edited the lines mentioned above.

 

Now, knowing what this cool program is capable of, its probably not something you want just anyone to be able to access, luckily we can take care of that very easily using Apache 's authentication process, so lets do it !

 

Still as root make a directory to store the password file we will be creating;

 



Code:
mkdir /usr/local/apache/passwd <enter>




 

Now, lets create the file and add an allowed user;

 



Code:
/usr/local/apache/bin/htpasswd -c /usr/local/apache/passwd/authpass myphp <enter>




 

htpasswd will prompt you for the password you would like to assign to this user, once entered, it will create the file authpass and populate it with the information for the user called myphp. You can use whatever names you like, this is only an example.

 

Now the final step, change to your Apache configuration directory;

 



Code:
cd /usr/local/apache/conf <enter>




 

And again using your favorite editor, open the file named httpd.conf and find the following section;

 



Code:
<Directory />
  Options FollowSymLinks
  AllowOverride None
</Directory>




 

Directly under this section add the following (assuming you used the names from the example above);



Code:
<Directory "/usr/local/apache/htdocs/phpmyadmin">
  AuthType Basic
  AuthName "myphp"
  AuthUserFile /usr/local/apache/passwd/authpass
  Require user myphp
</Directory>




 

Thats it, save the file and close it, then restart Apache by issuing the following command;

 



Code:
/usr/local/apache/bin/apachectl restart <enter>




 

Perfect, now fire up your browser again and point it back to your phpMyAdmin site, this time you should be prompted for a username and password before being allowed access to the site. Enter the required information, and you are in business !.

 

That brings us to the end of this tutorial, hopefully you found this information helpful, and Good Luck !

 

 

Enjoy

 

Square@Efnet!#Redhat

Print this item

  how to compile apache/mysql/php
Posted by: anyweb - 2004-04-02, 08:43 AM - Forum: LAMP - Replies (11)


although the guide below is OLD, it still works (as of December 2007.

 

I've tested it with the following versions in Fedora 8

 

apache_1.3.39.tar.gz

mysql-5.0.51.tar.gz

php-5.2.5.tar

 

and apart from a small hiccup while configuring php, all was ok.

 

ok, on with the show...

 

Quote:PLEASE NOTE: THIS HOWTO WAS WRITTEN BEFORE THE VULNERABILITIES WERE FOUND IN APACHE 1.3.x - MAKE SURE TO USE APACHE 1.3.31 OR NEWER FOR THIS HOWTO. FOR DETAILS OF THE VULNERABILITIES AND TO DOWNLOAD THE APACHE 1.3.31 SOURCE PLEASE SEE <a href="http://httpd.apache.org/download.cgi" target="_blank"><a href="http://httpd.apache.org/download.cgi" target="_blank">http://httpd.apache.org/download.cgi</a></a> 

TO REPEAT, PLEASE SUBSTITUE ALL REFERENCES BELOW TO APACHE 1.3.29 with APACHE 1.3.31 or newer !
 

 

This document was inspired by this HOW-TO written by forum member [strabo]. I followed his document and with lots of help on IRC (irc://efnet.demon.co.uk/redhat) from many people, I got things up and running eventually, however there were lots of problems along the way so i'd like to clear things up a bit here and make this document more 'noob' friendly.

 

First off, I am assuming you are running either Redhat 8/9 or Fedora, if so then this should work well for you, if you already have your linux distro installed then you might be in for some problems, for example, during Redhat setup (and fedora) you have the chance to install apache and mysql amongst other things, however, if you go this root you may find that things just don't work later on.

 

 

 

Step ONE - Prepare your linux installation:-

 

I would suggest that you start with a clean slate and install Redhat/Fedora by choosing the CUSTOM option, making sure NOT to install apache (httpd), mysql or php, once done we will get the source for these components and compile them. If you have not compiled before don't worry, it's not that bad, I'll guide you through it. After I did my clean install, I installed apt-get and did the following to get my system up to date:

 



Code:
apt-get update && apt-get upgrade




 

if you don't want to use apt-get, then you can simply use yum

 



Code:
yum -y update




 

It took a while, but once done my system was more in tune with todays packages. Now all i needed was the latest kernel:

 



Code:
apt-get install kernel




 

doing the above will display an error telling you that you must specify a kernel to retrieve, so follow the instructions and install the latest kernel, I did by doing this

 



Code:
apt-get  install kernel#2.4.22-1.2174.nptl




 

Once done I rebooted and was ready for the next step.

 

 

 

 

Step TWO - Get the source for apache/mysql/php:-

 

I downloaded the three source files to the following directory

 

/home/anyweb/downloads/website

 

Apache:

 

I wanted to compile and install Apache 1.3.29 from source. I downloaded it from this mirror but you can go to apache's download page and take your pick.

 

MySQL:

 

I picked mysql 4.0.18 and picked the mirror from here

 

PHP:

 

Get over to php.net and download the latest php package, I downloaded php 4.3.5 from here

 

 

Step THREE:- uncompress the source and move it to /usr/local/src/

 

Now that you have the source lets start uncompressing it and copying it.

 

You should have three files similar to these ones below

 

apache_1.3.29.tar.gz

mysql-4.0.18.tar.gz

php-4.3.5.tar.gz

to uncompress the files do as follows:-

 

 



Code:
tar zxvf apache_1.3.29.tar.gz
tar zxvf mysql-4.0.18.tar.gz
tar zxvf php-4.3.5.tar.gz




 

Once done, you will now have three new directories with the source within. Now let's move those directories to their destination.

 

login as su - (root) and do as follows

 

cd to the directory where you saved and uncompressed your source (above)

 

 



Code:
cd /home/anyweb/downloads/website
mv apache_1.3.29 /usr/local/src/
mv mysql-4.0.18 /usr/local/src/
mv php-4.3.5 /usr/local/src/




 

 

Step FOUR - Compile MySQL

 

Be warned, compiling MySQL does take time, so be prepared to take a few coffee breaks.

 

Login as su - (root).

 

lets add the user/group mysql by doing this

 



Code:
groupadd mysql
useradd -g mysql mysql




 

Ok, now let's cd to the directory where we have the MySQL source,

 



Code:
cd /usr/local/src/mysql-4.0.18/




 

once there do as follows:-

 



Code:
./configure --prefix=/usr/local/mysql \--localstatedir=/usr/local/mysql/data \--disable-maintainer-mode \--with-mysqld-user=mysql \--enable-large-files \--without-comment \--without-debug \--without-docs \--without-bench




 

after a while.... and some scrolling you should finally see this:-

 

 

Quote:MySQL has a Web site at <a href="http://www.mysql.com/" target="_blank"><a href="http://www.mysql.com/" target="_blank">http://www.mysql.com/</a></a> which carries details on thelatest release, upcoming features, and other information to make your

work or play with MySQL more productive. There you can also find

information about mailing lists for MySQL discussion.

 

Remember to check the platform specific part of the reference manual for

hints about installing MySQL on your platform. Also have a look at the

files in the Docs directory.

 

Thank you for choosing MySQL!
 

Now let's continue !

 

type

 



Code:
make




 

(now is a good time to go and take a break, it takes time....)

 

ok once that is finished (it took a while didn't it !) you can do this

 



Code:
make install

./scripts/mysql_install_db
chown -R root:mysql  /usr/local/mysql
chown -R mysql:mysql /usr/local/mysql/data




 

If the above command fails (cant find the data dir) chances are you have had mysql installed already via rpm..., if so you could try removing it with apt-get remove mysql and start the whole compiling process again, or, start fresh at step ONE (preferred) or create the data directory manually and hope that nothing else fails...

 



Code:
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
ldconfig -v | grep libmysqlclient

echo "/usr/local/mysql/bin/mysqld_safe --user=mysql &" >> /etc/rc.d/rc.local

cd /usr/local/mysql/bin
./mysqld_safe --user=mysql &




 

If the above starts MYSQL and then abrubtly ends it like the following

 

Quote:Starting mysqld daemon with databases from /var/lib/mysql040527 14:33:45 mysqld ended
then check the owner of /var/lib/mysql 

if its root, then change it to mysql as follows

 



Code:
[root@localhost bin]# chown -R mysql:mysql /var/lib/mysql




 

 

 

at this point, you'll probably need to open a new console and login again as su - because the other console is running mysql...

 

 



Code:
cd /usr/local/mysql/bin
./mysqladmin version




 

doing the above should show you something like the following if all went ok:

 

 

Quote:[root@localhost bin]# ./mysqladmin version./mysqladmin Ver 8.40 Distrib 4.0.18, for pc-linux on i686

Copyright

Print this item

  Hi, I'm new!
Posted by: Katsohiro - 2004-04-02, 05:08 AM - Forum: Hello - Replies (1)

Yeah, i'm new...and a noob with linux... so hi!

Print this item

  moving
Posted by: enigma - 2004-04-01, 11:30 AM - Forum: General Chat - No Replies

Well today is the day I must move so I really hope to see you all in a few days, who knows how long it will take the ISP to hook up the connection :| anyways thanks for the help again :)see you soon...

Print this item

  server backup
Posted by: anyweb - 2004-04-01, 09:05 AM - Forum: Site News - No Replies


hi all, well the last few days have been interesting for me, the backup server for this site was running win2k3 180 time limited and it expired ! so, rather than reinstall i decided to learn some more linux and installed fedora on the backup server,

 

then with a lot of help from the following people i got the site up and running as a backup server, still needs tweaking but its there and working,

 

now that i have a fedora server working i am going to (when i get time) revamp the content and re-organise the content of my site, there's alot more there than forums, 9875 files in all and 1.9 gig of data which is quite a chunk. Once done i'll mirror the site on both machines...

 

I want to say thanks for helping me with setting up apache/mysql/php from scratch to:-

 

[strabo] for his good howto for compiling mysql/apache/php

 

you can read it here

 

Jy (hijinks) for his help with MySQL

 

z0ny for his help with importing/exporting SQL databases

 

Michael for his help with IPB/MySQL

 

Square for his donations to [/url][url=https://www.linux-noob.com]https://www.linux-noob.com

 

cheers

 

anyweb

Print this item

  Sound Problems with Fedora Core 1
Posted by: cizkaro - 2004-04-01, 03:49 AM - Forum: Fedora Core Release 1 - Replies (4)

Fedora saw and properly used my soundcard upon setup and first boot but as soon as I rebooted, it stopped working giving the error it cant initialize some module insmod or somehting in one of hte systems drivers folders. The cars is a Sound Blaster Audigy... if anyone can help it would be much appreciated.

Print this item