![]() In order to use it, we need to understand a few things about how the web server is configured by default. If everything went fine during installation you will now see the default apache web page: Figure 2-5-2: The default apache web page at localhostĬongratulations, you were able to successfully set up a Linux web server! Once the installation is over, open again Firefox and visitĪnd/or visit your Linux machine IP address from a remote computer. You may want to generate a 15 or more characters password for a good security. You can use a tool such as this one to generate a secure password. It is important that you enter a good password and then remember it or securely store it for eventual later usage. While MySQL is installed you will be required to input a password for the root user. Installing LAMP with a single sudo tasksel install lamp-server Here’s the short procedure required to install LAMP: Tasksel allows to install bundles of different programs grouped together to achieve a certain functionality such as for example a full desktop environment, a full mail server, a full web server etc., without having to install individual software packets. Let’s instead take advantage of the “ tasksel” shell command. ![]() You can find a more exhaustive description of the process with additional configuration details in this nice DigitalOcean tutorial. For information, thought, these are, in summary, the commands for the long sudo apt-get sudo apt-get install sudo apt-get install sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql There is a longer way, and a very short and easy way to install LAMP. The full bundle is known as LAMP ( Linux- Apache- PHP- MySQL) server. We will also install support for the PHP programming language and for MySQL databases. We will now install the apache2 web server software. Our linux machine is still not a web server, as it misses any web server software. If you try to visit the machine IP address from a remote computer, you will get the same. You should get a connection failed message. Open a web browser on your linux machine, for example Firefox, and type: I don't mind having to re-install PHP if I really have to, if somebody can demonstrate the proper way to configure/compile with MySQL support, so that I can get it to work under Apache, although ideally I'd simply prefer to get the existing installation working.Figure 2-5-1: The Apache Logo – Source: The Apache Incubator ![]() I've been trying on and off for months to solve this problem, and seem to have tried everything, but nothing seems to work. If I run a little PHP test script from the command line, to access the MySQL database, then it works with no problem, so PHP does know about MySQL, but when it runs under Apache it seems to have no clue that MySQL even exists. I've also disabled SELinux stopped/restarted Apache numerous times yummed MySQL-Devel, in case it made any difference and, it seems, every other possible thing. But then I'm not entirely certain whether that line is required to be un-commented or not. I've also tried un-commenting "extension=mysql.so" in php.ini, but PHP then complains with "PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so'." (even though the module does reside there). When I run php -i from the command line then sure enough it shows all the MySQL bits and pieces, but when I load a page displaying phpinfo() then there are no MySQL modules mentioned. PHP works okay on its own though, through Apache and at the command line. I thought that PHP was configured/compiled to work with MySQL, but when I try to load any PHP web page which makes a MySQL call then I get the above noted fatal error (in the Apache error log). I have MySQL (5.5.23 Community Server), Apache (2.2), and PHP (5.3.13) running on a Fedora 15 machine (64-bit). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |