zivan56 Posted August 15, 2002 Share Posted August 15, 2002 First of all download the following (These are the latest when I made this tutorial):Apache 1.3.26: http://www.apache.org/dist/httpd/apache_1.3.26.tar.gzPHP 4.2.2: http://ca.php.net/do_download.php?download...hp-4.2.2.tar.gzMySQL 3.23.51: http://www.mysql.com/Downloads/MySQL-3.23/...-3.23.51.tar.gzFirst of all you need to extract these (usually in /usr/src/, which requires root permission). Open a terminal in the directory where you have the files and type the following commands to extract them:tar -zxvf apache_1.3.26.tar.gztar -zxvf php-4.2.2.tar.gztar -zxvf mysql-3.23.51.tar.gzApache--------Now the first step is to compile apache, before doing anything, I like to make a place to store all the server files (/wwwroot), type:mkdir /wwwrootNow it is time to configure apache, go into the apache directory where you extracted the source code and do the following:./configure --prefix=/wwwroot --enable-module=soThis will configure apache to install in the /wwwroot folder (You can choose someplace else, or don’t type it in to install in default), and will also compile apxs (which allows you to build modules for Apache). You can also see more info by running: ./configure --helpnext type:makeThis will compile apache, next type:make installThis will install Apache in the /wwwroot folderPHP----First go to the directory where you extracted the PHP source, and type the following:./configure --prefix=/wwwroot/php --with-config-file-path=/wwwroot/php --with-apxs=/wwwroot/bin/apxs --with-xml --enable-bcmath --enable-calender --enable-ftp --with-gd --enable-magic-quotes --with-mysql --with-pear --enable-track-vars --with-ttf --with-zlib --with-mod_charset --with-iconv --enable-trans-sid --enable-socketsThis basically tells PHP where to install, and what to compile (this is what I use as a standard). You may need to compile or download packages for libgd and some other things which the configure script will tell you what is missing. Also, you can see all the other configure options here: http://www.php.net/manual/en/install.configure.phpNext do:makemake installNote: The make install will automatically update your httpd.conf to load the module.MySQL-----You first need to do a configure:./configure --prefix=/wwwrootThen compile and install:makemake installThis will take longer than PHP/Apache to compileAfter you do this, you need to go to the bin directory and run the:cd /wwwroot/bin/ ./mysql_install_db script, it will create the default users in the database. You can later use phpMyAdmin to change passwords and users.Setting up------------You will need to edit /wwwroot/conf/httpd.conf , and Add the following:AddType application/x-httpd-php .php .phtmland you can add whatever other files types you want to processStarting the servers--------------------To start Apache:cd /wwwroot/bin./apachectl startto start MySQLcd /wwwroot/mysql/libexecmysqld -u rootRunning at Startup------------------If you are using Debian, then you can do the following for Apache:ln -s /wwwroot/bin/apachectl /etc/init.d/apache If you also want MySQL to run at startup, read this: http://www.vbulletin.com/manual/mysql.htmlHope this helps anybody who want to set up a Linux server at home, you need to put the documents in /wwwroot/htdocs/ , If you have port 3306 opened to the internet, make sure that you edit the user root to have a password, you simply need to run mysqld and type the following:cd /wwwroot/mysql/bin./mysqladmin -u root password new_password_you_wantthen make sure you flush privilages or restart mysql, since the settings wont work until then. You can also make Apache users availiable by uncommenting everthing below somthing that looks like:<Directory /home/*/public_html/>...</directory>and also find the line that saysUserDir public_html and uncomment that line only.If you do this you need to create a directory in the users folder called public_html, and make sure it is readable by everybody, if you don’t want to chmod then by hand open a console in the users directory and type:chown -R nobody public_htmlchgrp -R users public_htmlNow users for the computer can access their page by going to:http://ip-or-domain.com/~usersname/If you need mail to work, I would reccomend downloading the exim package (on Debian it has 4 questions that it asks when it is being set up, don't know about other distro's). Also, for IMAP, the WU-IMAPD is a nice server, and I did not find any config files for it. Then, just install Squirrelmail or your favorite PHP/Perl/CGI mail client and everthing should work ok.If you have any questions ask them here If you want to post this on other forums, please leave some credit You can also just download the package, but dont you find this more fun ? Link to comment Share on other sites More sharing options...
Blackwar Posted August 15, 2002 Share Posted August 15, 2002 wow, this looks like a great Tutorial If i had Linux i'd definitely give it a tryThanks Link to comment Share on other sites More sharing options...
zivan56 Posted August 15, 2002 Author Share Posted August 15, 2002 No prob,I was basically struggling before setting up a server on Linux, then when I found out how to do it I though I might as well share it with others Link to comment Share on other sites More sharing options...
aKaFrEE Posted August 15, 2002 Share Posted August 15, 2002 thanks man, i was looking for something like this to use..I'm trying to set up a webserver using linux/apache. Now I'll definitly give this a try. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now