|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 848 Location: East Coast, West Coast? I know it's one of them. |
There's some helpful tips to upgrade your debian based system to Apache 2.0 on crazysquirrel.com
This assume you have mysql installed already: mysql-server-4.1 or mysql-server-5.0 and apache2 apache2-mpm-prefork so, to get running, let's say we're using mysql 5 and php5 here: :: Code :: apt-get update
# install mysql first so it's running so apache sees it. apt-get install mysql-server-5.0 # for basic installs, unless you know why you do otherwise, use this apache apt-get install apache2-mpm-prefork # add php5-pgsql if you're going to run postgre apt-get install libapache2-mod-php5 php5-mysql And that's it, it will be running. You may need to issue this command as root to get it started: :: Code :: apache2 -k restartthen visit: :: Code :: http://localhost/and you should see the default apache welcome message To make sure your php is working, make a test page here, called index.php, like this: /var/www/apache2-default/index.php Give it content: :: Code :: <?php echo 'hello world';?>Run this location: :: Code :: http://127.0.0.1/apache2-default/index.phpand it should show: hello world and nothing else. your php is running now. Legacy 1.3 conversion information, not required I believe for fresh Apache 2.x installs Key items are: :: Quote ::
1. When you upgrade Apache you have to install libapache2-mod-php4 2. The first gotcha is with register_globals which is set to on in the default php.ini for Apache 1.3 but off in the default php.ini for Apache 2. 3. when you install Apache 2 after Apache 1.3 it doesn't automatically update the php.ini files so that the related packages can be used with Apache 2. The result is that database access doesn't work and you get nasty error messages like this: Fatal error: Call to undefined function: pg_connect() in /usr/share/phpbb2/site/db/postgres7.php on line 79 The solution to this is to reconfigure the php4-pgsql and php4-mysql packages with: dpkg-reconfigure php4-pgsql php4-mysql Thanks for the info crazysquirrel. |
|||||
|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 848 Location: East Coast, West Coast? I know it's one of them. |
By the way, in the above, if you're using php5, just change the above apt-install and dpkg configure stuff to say php5 instead of php4, it works the same.
this is also assuming you've installed php on apache, you'll want mod_php4 or mod_php5, to suite your tastes and needs. Then to start your new webserver, read this how to :: Quote :: Then you can change the NO_START entry in /etc/default/apache2 to 0, and run /etc/init.d/apache2 start to start your shiny new Apache 2 Web server.I found NO_START to be already set to 0 in the latest apt-get install of apache2, but double check that anyway. And that's about it, just follow these steps and you're on your way. To get both mysql and apache2 to start as daemons, use this: :: Quote :: Another is to use the sysv-rc-conf run-level configuration editor. This is not installed on Debian systems by default, but can be installed using apt-get install sysv-rc-conf.Once installed, run sys-rc-conf as root, and you'll get a semi-gui console interface, you can check off or on services and runlevels for apache2 and mysql, or any other db you want. Since I don't know any better, I just made them start and run in runlevels 2 through 5, I'll change that iif it's wrong. Type 'q' to quit, then restart linux just to make sure it's all working. When it restarts, both apache2 and mysql, or postgre if you're using that, should be running as daemons, or services. You can make sure apache is running correctly by simply typing 'localhost' in a browser and hitting enter. You should see the default apache page, that has various advice and warnings on it. If you see that, your web server is now running. You'll want to create some dbs etc to test that your db is also running, then install something that uses a db and php to test the php/mysql end of things. If you go into your console, switch to su mode, then run this command: mysql that should drop you right into the mysql monitor, assuming you've installed mysql and its utility packages [debian:: apt-get install mysql-utils]. If you see that, you're mysql is ready to go. |
|||||
|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 848 Location: East Coast, West Coast? I know it's one of them. |
This thread covers the process of creating your SSL certificates etc. Well, actually, it links to a tutorial on that process.
|
|||||
|
All times are GMT - 8 Hours
|
||||||
Contact Us
Hosting: Pair Networks: 0.069
Forum Software © 2001–2006 phpBB
techForum Style © 2003–2006 techpatterns.com
info
Hosting: Pair Networks: 0.069
Forum Software © 2001–2006 phpBB
techForum Style © 2003–2006 techpatterns.com
info