--- wikisrc/pkgsrc/how_to_install_a_lamp_server.mdwn 2017/12/24 17:44:32 1.3 +++ wikisrc/pkgsrc/how_to_install_a_lamp_server.mdwn 2018/08/06 21:16:52 1.4 @@ -8,13 +8,13 @@ We will install all components using pkg # Installing the Apache webserver -The new Apache 2.2 server comes with two different threading models from which [prefork](http://httpd.apache.org/docs/2.2/mod/prefork.html) is installed by default. It is **not** recommended to use the Worker model, if you wish to use Apache and PHP. As that is the case, we will install a default Apache 2.2 server. +The new Apache 2.4 server comes with two different threading models from which [prefork](http://httpd.apache.org/docs/2.4/mod/prefork.html) is installed by default. It is **not** recommended to use the Worker model, if you wish to use Apache and PHP. As that is the case, we will install a default Apache 2.4 server. -# cd /usr/pkgsrc/www/apache22 +# cd /usr/pkgsrc/www/apache24 # make install clean clean-depends -This will install the Apache 2.2 server and all it's dependencies. The package currently depends on 10 other packages like perl, gmake and libtool to name a few. All dependencies are build before the Apache webserver is build, otherwise it wouldn't be dependencies. +This will install the Apache 2.4 server and all it's dependencies. The package currently depends on 10 other packages like perl, gmake and libtool to name a few. All dependencies are build before the Apache webserver is build, otherwise it wouldn't be dependencies. If your build was successful, you should now edit the Apache configuration file _`/usr/pkg/etc/httpd/httpd.conf`_ to fit your needs. At least set the `Listen` Attribute and your `ServerName`. Please ensure that if your machines hostname does not globally resolve, to put it into your `/etc/hosts` file, otherwise Apache will refuse to start. @@ -50,7 +50,7 @@ To stop the server, substitute start wit You can skip this part, if you don't want to install a MySQL Server. To install the MySQL Server enter: - # cd /usr/pkgsrc/databases/mysql5-server + # cd /usr/pkgsrc/databases/mysql56-server # make install clean clean-depends @@ -87,7 +87,7 @@ and restart your mysql server. To check, # sockstat -l -For much more Options, consider reading the MySQL [Documentation](http://dev.mysql.com/doc/refman/5.0/en/). +For much more Options, consider reading the MySQL [Documentation](http://dev.mysql.com/doc/refman/5.6/en/). # Installing the PHP Module for Apache @@ -96,7 +96,7 @@ For much more Options, consider reading # make install clean -This will install by default the latest Version of PHP 5.x and the PHP5 Module for Apache 2.2 +This will install by default the latest Version of PHP 7.x and the PHP7 Module for Apache 2.4 ## Configuring PHP @@ -104,7 +104,7 @@ You should now add the Module and the PH Add following lines: - LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so + LoadModule php7_module /usr/pkg/lib/httpd/mod_php7.so and @@ -137,7 +137,7 @@ Now restart your Apache webserver. To te -if you use php5 and wish to use short tags like ``, then edit your `/usr/pkg/etc/php.ini` file and change option `short_open_tag = Off `to `On` to make this line working. In PHP5 short_open_tag is off by default. +if you use php7 and wish to use short tags like ``, then edit your `/usr/pkg/etc/php.ini` file and change option `short_open_tag = Off `to `On` to make this line working. In PHP7 short_open_tag is off by default. Open your browser and point it to this url: